🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #21492

Re: 80486 vs. 68040 code size [really: how many regs]

#21492
From: Joe Buck
Date: Tue, 30 May 1989 22:05
25 lines
1594 bytes
I write:
>>With the 16-bit-int choice,
>>32-bit integers can be obtained where required by declaring variables
>>"long".  There isn't any way to get the more compact, efficient 16-bit
>>int operations if your compiler makes the (IMnotsoHO) wrong choice.

Wendy Thrash replies:
>Uh, Joe, can't you turn that argument around to say that 16-bit integers
>can be obtained where required by declaring variables "short" (or am
>I being C-chauvinistic)?

Sorry, Wendy, it doesn't work.  The reason it doesn't is because C
promotes shorts to ints before doing any arithmetic or function calls.
The choice is not symmetric (using short, int for the two sizes vs
int, long) because of the requirement to promote all smaller integer
sizes to int.  It does work to save space in array storage, but not
for scalar operations.  That's why I said what I did: There isn't any
way to get the more compact, efficient 16-bit int operations if your
compiler makes the wrong choice.

Why do we always get into these C discussions on comp.arch?  Why am I
complaining about something I am engaging in? :-)

-- 
-- Joe Buck	jbuck@epimass.epi.com, uunet!epimass.epi.com!jbuck
Technical Details
Message-ID: <3256@epimass.EPI.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!epimass!jbuck
References: <72136@pyramid.pyramid.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!epimass!jbuck
From: jbuck@epimass.EPI.COM (Joe Buck)
Newsgroups: comp.arch
Subject: Re: 80486 vs. 68040 code size [really: how many regs]
Message-ID: <3256@epimass.EPI.COM>
Date: 30 May 89 22:05:01 GMT
References: <72136@pyramid.pyramid.com>
Reply-To: jbuck@epimass.EPI.COM (Joe Buck)
Organization: Entropic Processing, Inc., Cupertino, CA
Lines: 25