Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!husc6!uwvax!umn-d-ub!umn-cs!crayview!imp From: imp@crayview.msi.umn.edu (Chuck Lukaszewski) Newsgroups: comp.sys.mac.programmer Subject: Re: Register saving conventions Summary: No need for everything Message-ID: <6600@umn-cs.cs.umn.edu> Date: 9 Aug 88 16:23:20 GMT References: <664@iraun1.ira.uka.de> <1133@lzsc.ATT.COM> <15055@santra.UUCP> Sender: news@umn-cs.cs.umn.edu Lines: 15 In article <15055@santra.UUCP>, jmunkki@santra.HUT.FI (Juri Munkki) writes: > In article <1133@lzsc.ATT.COM> mkg@lzsc.ATT.COM (Marsh Gosnell) writes: > >When I patch traps I make it a point to save/restore everything (D0-D7/A0-A4) There really is no need for this. Juri is right about the cycle consumption of register saving. At a minimum, you can ignore D0-D2 and A0-A1 because Apple says you can trash them. Indeed, the ROM code makes no assumptions about these five registers. In point of fact, given the above about D0-D2/A0-A1, you need no register store code at all because the trap dispatcher handles the other registers for you, so you're just wasting stack space and CPU cycles. ---===---===---===---===--/* Chuck Lukaszewski */--===---===---===---===--- ARPAnet/NSFnet/MRnet: AppleLink: SnailMail: Ma Bell: imp@crayview.msi.umn.edu UG0138 Minneapolis MN 55418 612/789-0931