home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 129,328 of 131,241   
   Anton Ertl to Lars Poulsen   
   Re: VAX   
   07 Aug 25 11:21:56   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   Lars Poulsen  writes:   
   >["Followup-To:" header set to comp.arch.]   
   >On 2025-08-06, John Levine  wrote:   
   >>>> AFAIK the Cray-1 (1976) was the first 64-bit machine, and C for the   
   >>>> Cray-1 and successors implemented, as far as I can determine   
   >>>>   
   >>>> type      bits   
   >>>> char        8   
   >>>> short int  64   
   >>>> int        64   
   >>>> long int   64   
   >>>> pointer    64   
   >>>   
   >>>Not having a 16-bit integer type and not having a 32-bit integer type   
   >>>would make it very hard to adapt portable code, such as TCP/IP protocol   
   >>>processing.   
   ...   
   >My concern is how do you express yopur desire for having e.g. an int16 ?   
   >All the portable code I know defines int8, int16, int32 by means of a   
   >typedef that adds an appropriate alias for each of these back to a   
   >native type. If "short" is 64 bits, how do you define a 16 bit?   
   >Or did the compiler have native types __int16 etc?   
      
   I doubt it.  If you want to implement TCP/IP protocol processing on a   
   Cray-1 or its successors, better use shifts for picking apart or   
   assembling the headers.  One might also think about using C's bit   
   fields, but, at least if you want the result to be portable, AFAIK bit   
   fields are too laxly defined to be usable for that.   
      
   - anton   
   --   
   'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'   
     Mitch Alsup,    
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca