home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!decwrl!adobe!usenet
- From: zstern@adobe.com (Zalman Stern)
- Subject: Re: 32 => 64 Transition
- Message-ID: <1992Aug22.001234.10390@adobe.com>
- Sender: usenet@adobe.com (USENET NEWS)
- Organization: Adobe Systems Incorporated
- References: <id.X1JS.KFC@ferranti.com>
- Date: Sat, 22 Aug 1992 00:12:34 GMT
- Lines: 83
-
- In article <id.X1JS.KFC@ferranti.com> peter@ferranti.com (Peter da Silva)
- writes:
- > In article <MARC.92Aug19170300@marc.watson.ibm.com> marc@watson.ibm.com
- (Marc Auslander) writes:
- > > The intent of ANSI C appears to be that int is the "natural"
- > > arithmetic of the machine. This is reflected in the integer promotion
- > > rules, which promote to int but NOT to long.
- >
- > Well, is 64 bits the natural arithmetic of Alpha? The 68000 was a "32 bit"
- > processor, but the best code was generated with 16 bit ints. In any case,
- > making int larger than long is explicitly contrary to the standard.
- >
- > [long = int * int;]
- >
- > > is defined to do its arithmetic in int, producing an int result, and
- > > then convert to long at the assignment. If i+j overflows (as int) the
- > > results are undefined.
- >
- > This is true, and is the way existing C compilers on non-vaxian systems
- > behave. But [32 = 16 * 16] *is* the natural multiplication mode, and a
- > good compiler will use a single 16-32 multiply here.
- >
- > Personally, I think long should have been 64 bits all along, from the VAX
- > on, to allow [64 = 32 * 32], the natural VAX multiply.
- >
- > In any case:
- > PDP 68K 286 VAX VAX+
- > char 8 8 8 8 8
- > short 16 16 16 16 16
- > int 16 16 16 32 32
- > long 32 32 32 32 64
- > char* 16 32 16/32 32 32
- >
- > We have some people noting that long==32, and assuming that's the
- important
- > non-variant, giving this sort of model:
- >
- > VAXist
- > char 8
- > short 16
- > int 64
- > long 32
- > char* 64
- >
- > Another useful property is that all word sizes be available. This is what
- DEC
- > seems to have chosen:
- >
- > Alpha
- > char 8
- > short 16
- > int 32
- > long 64
- > char* 64
- >
- > So long as you don't want a single addressible object over 2 GB, this
- should
- > create no problems.
- >
- > I don't have the instruction set in front of me, but this would appear to
- > imply a [64 = 32 * 32] instruction exists, but not a [128 = 64 * 64] one.
- > If it did, then you'd want to do this:
- >
- > Beta
- > char 8
- > short 16 or 32
- > int 64
- > long 128
- > char* 64
- >
- > But what size should short be?
- > --
- > Peter da Silva `-_-'
- > $ EDIT/TECO LOVE 'U`
- > %TECO-W-OLDJOKE Not war? Have you hugged your wolf
- today?
- > Ferranti Intl. Ctls. Corp. Sugar Land, TX 77487-5012 +1 713
- 274 5180
-
- --
- Zalman Stern zalman@adobe.com (415) 962 3824
- Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900
- "Yeah. Ask 'em if they'll upgrade my shifters too." Bill Watterson
-