home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / arch / 9006 < prev    next >
Encoding:
Text File  |  1992-08-21  |  2.9 KB  |  95 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!decwrl!adobe!usenet
  3. From: zstern@adobe.com (Zalman Stern)
  4. Subject: Re: 32 => 64 Transition
  5. Message-ID: <1992Aug22.001234.10390@adobe.com>
  6. Sender: usenet@adobe.com (USENET NEWS)
  7. Organization: Adobe Systems Incorporated
  8. References: <id.X1JS.KFC@ferranti.com>
  9. Date: Sat, 22 Aug 1992 00:12:34 GMT
  10. Lines: 83
  11.  
  12. In article <id.X1JS.KFC@ferranti.com> peter@ferranti.com (Peter da Silva)  
  13. writes:
  14. > In article <MARC.92Aug19170300@marc.watson.ibm.com> marc@watson.ibm.com  
  15. (Marc Auslander) writes:
  16. > > The intent of ANSI C appears to be that int is the "natural"
  17. > > arithmetic of the machine.  This is reflected in the integer promotion
  18. > > rules, which promote to int but NOT to long.
  19. > Well, is 64 bits the natural arithmetic of Alpha? The 68000 was a "32 bit"
  20. > processor, but the best code was generated with 16 bit ints. In any case,
  21. > making int larger than long is explicitly contrary to the standard.
  22. >     [long = int * int;]
  23. > > is defined to do its arithmetic in int, producing an int result, and
  24. > > then convert to long at the assignment.  If i+j overflows (as int) the
  25. > > results are undefined.
  26. > This is true, and is the way existing C compilers on non-vaxian systems
  27. > behave. But [32 = 16 * 16] *is* the natural multiplication mode, and a
  28. > good compiler will use a single 16-32 multiply here.
  29. > Personally, I think long should have been 64 bits all along, from the VAX
  30. > on, to allow [64 = 32 * 32], the natural VAX multiply.
  31. > In any case:
  32. >         PDP    68K    286    VAX    VAX+
  33. >     char     8     8     8     8     8
  34. >     short    16    16    16    16    16
  35. >     int    16    16    16    32    32
  36. >     long    32    32    32    32    64
  37. >     char*    16    32    16/32    32    32
  38. > We have some people noting that long==32, and assuming that's the  
  39. important
  40. > non-variant, giving this sort of model:
  41. >         VAXist
  42. >     char     8
  43. >     short    16
  44. >     int    64
  45. >     long    32
  46. >     char*    64
  47. > Another useful property is that all word sizes be available. This is what  
  48. DEC
  49. > seems to have chosen:
  50. >         Alpha
  51. >     char     8
  52. >     short    16
  53. >     int    32
  54. >     long    64
  55. >     char*    64
  56. > So long as you don't want a single addressible object over 2 GB, this  
  57. should
  58. > create no problems.
  59. > I don't have the instruction set in front of me, but this would appear to
  60. > imply a [64 = 32 * 32] instruction exists, but not a [128 = 64 * 64] one.
  61. > If it did, then you'd want to do this:
  62. >         Beta
  63. >     char     8
  64. >     short    16 or 32
  65. >     int    64
  66. >     long    128
  67. >     char*    64
  68. > But what size should short be?
  69. > -- 
  70. > Peter da Silva                                               `-_-'
  71. > $ EDIT/TECO LOVE                                              'U` 
  72. > %TECO-W-OLDJOKE Not war?                        Have you hugged your wolf  
  73. today?
  74. > Ferranti Intl. Ctls. Corp.      Sugar Land, TX  77487-5012       +1 713  
  75. 274 5180
  76.  
  77. --
  78. Zalman Stern           zalman@adobe.com            (415) 962 3824
  79. Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900
  80.   "Yeah. Ask 'em if they'll upgrade my shifters too." Bill Watterson
  81.