Path: 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 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