Newsgroups: comp.arch
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: 80486 vs. 68040 code size [really: how many regs]
Message-ID: <1989May30.171335.473@utzoo.uucp>
Organization: U of Toronto Zoology
References: <948@aber-cs.UUCP> <8125@killer.Dallas.TX.US> <427@ssp2.idca.tds.philips.nl> <1989May20.223228.2456@utzoo.uucp> <3252@epimass.EPI.COM>
Date: Tue, 30 May 89 17:13:35 GMT

In article <3252@epimass.EPI.COM> jbuck@epimass.EPI.COM (Joe Buck) writes:
>Henry, why do you say that 32-bit ints are "generally better" on
>68000's and 68010's? ...

16-bit ints are a bit limiting at times.  Admittedly this is not common,
but it is a nuisance.  And then there are the sloppy programmers, the
ones who assume (as you mention) that pointers and ints are the same size,
or that ints are 32 bits, or that ints and longs are the same size and can
be used interchangeably (this is depressingly common in the Unix world today,
and last I looked, both Berkeley and AT&T were aiding and abetting this
disgusting practice).  Alas, one cannot just ignore the sloppy programmers;
sometimes one wants to run code they wrote without having to clean it up.

>... There isn't any way to get the more compact, efficient 16-bit
>int operations if your compiler makes the (IMnotsoHO) wrong choice.

Just to be heretical, one can observe that the same thing is true of
addresses.  You can run the 68k family with 16-bit addresses (although
they have to be *signed* 16-bit addresses!).  Furthermore, on the 68000
and 68010, there is a noticeable speed improvement to be had from doing
this.  And, as with ints, there isn't any way to get the more compact
and efficient 16-bit pointer operations if your compiler chooses 32 bits.
Hal Hardenbergh may be the only person on Earth who's made a serious try
at using "small model" :-) on the 68000, but it does work.
-- 
Van Allen, adj: pertaining to  |     Henry Spencer at U of Toronto Zoology
deadly hazards to spaceflight. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
