Path: utzoo!attcan!uunet!iscuva!jimc From: jimc@iscuva.ISCS.COM (Jim Cathey) Newsgroups: comp.sys.mac.programmer Subject: Re: Bug in MPW C 2.0.2 (PEA instead of PUSH.L) Keywords: mpw c bug Message-ID: <1657@iscuva.ISCS.COM> Date: 24 Jun 88 19:13:18 GMT References: <1988Jun22.112228.462@mntgfx.mentor.com> <16163@tut.cis.ohio-state.edu> Organization: ISC Systems Corporation, Spokane, WA Lines: 22 In article <16163@tut.cis.ohio-state.edu> elwell@saqqara.cis.ohio-state.edu (Clayton Elwell) writes: >Well, I wouldn't say you are being stupid, but a PEA of an absolute >address just pushes that address onto the stack. The PEA instruction >takes the same amount of space as a MOVE.L, but on at least the 68020 >it can take less time (1 clock less for worst case). I suspect that >this is a peephole optimiziation of some sort. Actually, a PEA of that particular address will be shorter than the MOVE.L because the address was <32K. The 68000 has a short absolute address format so the PEA turned out 4 bytes in length, versus the MOVE.L at 6 bytes. Smaller _and_ faster, not a bad trick, no? That's one reason the Mac OS's variables are all in low memory. All references to them end up shorter. This was particularly important when cramming all that OS into the original ROM. +----------------+ ! II CCCCCC ! Jim Cathey ! II SSSSCC ! ISC Systems Corp. ! II CC ! TAF-C8; Spokane, WA 99220 ! IISSSS CC ! UUCP: uunet!iscuva!jimc ! II CCCCCC ! (509) 927-5757 +----------------+ "With excitement like this, who is needing enemas?"