Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!linus!decvax!decwrl!sun!gnu From: gnu@sun.uucp (John Gilmore) Newsgroups: net.lang.c Subject: Re: setjmp/longjmp, 68000 moveml instruction Message-ID: <1804@sun.uucp> Date: Thu, 22-Nov-84 02:32:12 EST Article-I.D.: sun.1804 Posted: Thu Nov 22 02:32:12 1984 Date-Received: Fri, 23-Nov-84 02:29:24 EST References: <1@imd.UUCP> <469@ncoast.UUCP> <5669@brl-tgr.ARPA> <214@desint.UUCP> Organization: Sun Microsystems, Inc. Lines: 23 > Here is the 68000 entry/exit sequence used by the MIT pcc: > > link a6,# > tstb sp@(132.) > moveml #mask,a6@(offset) > ... > moveml a6@(offset),#mask > unlk a6 > rts There is an awful lot of fat in the MIT pcc code. Above is some of it. For example, it generates the moveml's even when the mask is zero (no registers need to be saved). Also, the offset used is ALWAYS the same as the , thus they could have done: moveml #mask,sp@ saving another word of instructions & slowness. Now, we could add back in some fat by inserting movw #mask,sp@(someoffset) to make longjmp work, but if the average subroutine is 30 instructions long, that's a large price to pay. I don't want to dedicate 3% of my system to housekeeping for longjmp. Even if the average is 100, 1% for longjmp is still too much!