Article View: comp.arch
Article #21402Re: 80486 vs. 68040 code size [really: how many regs]
From: Richard Tobin
Date: Fri, 19 May 1989 16:06
Date: Fri, 19 May 1989 16:06
31 lines
1576 bytes
1576 bytes
In article <8125@killer.Dallas.TX.US> elg@killer.Dallas.TX.US (Eric Green) writes:
>But there's one problem: Types. On a 68000, shorts and ints are 16
>bits, longs are 32 bits. What this means is that if I declare a
>register int xyz, I can't put a long into it -- the "C" compiler
>generates a "move.w" instead of a "move.l". If I declare everything as
>register long xyz, the "C" compiler generates a "add.l" instead of an
>"add.w", i.e. I just lost all the time I'd saved.
Often you can get reasonable code out of a dumb compiler with code like
this:
{
register long t1;
.....
}
{
register short t2;
.....
}
(I.e. the compiler will use the same register for variables in different
blocks.)
But perhaps you already knew this.
-- Richard
--
Richard Tobin, JANET: R.Tobin@uk.ac.ed
AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk
Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin
Technical Details
Message-ID:
<459@skye.ed.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!ukc!etive!aiai!richardReferences:
<948@aber-cs.UUCP> <8125@killer.Dallas.TX.US>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!ukc!etive!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.arch Subject: Re: 80486 vs. 68040 code size [really: how many regs] Message-ID: <459@skye.ed.ac.uk> Date: 19 May 89 16:06:23 GMT References: <948@aber-cs.UUCP> <8125@killer.Dallas.TX.US> Reply-To: richard@aiai.UUCP (Richard Tobin) Distribution: eunet,world Organization: AIAI, University of Edinburgh, Scotland Lines: 31