Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site uthub.UUCP Path: utzoo!utcsrgv!utai!uthub!thomson From: thomson@uthub.UUCP (Brian Thomson) Newsgroups: net.lang.c Subject: Re: setjmp/longjmp Message-ID: <190@uthub.UUCP> Date: Fri, 2-Nov-84 16:30:55 EST Article-I.D.: uthub.190 Posted: Fri Nov 2 16:30:55 1984 Date-Received: Fri, 2-Nov-84 20:42:40 EST References: <1@imd.UUCP> Organization: CSRG, University of Toronto Lines: 18 While I agree that setjmp/longjmp SHOULD behave according to Gospel, I have a great deal of sympathy for the implementation designer who doesn't want to sacrifice the efficiency of his calling sequence for the sake of longjmp. There is a similar issue of whether to use a stack frame pointer. Your call/return sequence will be faster if you don't, and you can address everything relative to the sp. All the frame pointer buys you is the ability to get a calling trace from your favourite core image debugger. Is it worth it? Some 780 instruction timings I did years ago indicated that the CALLS/RET pair take ~15 microseconds minimum, while JSR/RTS execute in 3. That's a big penalty for the sake of setjmp(), calling traces, and, oh yes, the infamous nargs(). -- Brian Thomson, CSRI Univ. of Toronto {linus,ihnp4,uw-beaver,floyd,utzoo}!utcsrgv!uthub!thomson