Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pucc-h Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!inuxc!pur-ee!CS-Mordred!Pucc-H:ag4 From: ag4@pucc-h (Angus Greiswald the fourth) Newsgroups: net.lang.c Subject: Re: Potential optimisation? Message-ID: <1718@pucc-h> Date: Wed, 23-Jan-85 10:01:13 EST Article-I.D.: pucc-h.1718 Posted: Wed Jan 23 10:01:13 1985 Date-Received: Fri, 25-Jan-85 07:30:55 EST References: <763@sjuvax.UUCP> <4305@ucbvax.ARPA> Distribution: net Organization: your service Lines: 25 > > 2) In a UNIX C compiler (to the best of my knowledge) two assembly > > procedures CSV and CRET are used to save and restore the registers in > > the *called* procedure. I fail to see why this is desirable. The > > *calling* procedure has full knowledge of which registers are being > > used and can save them itself. This may not result in savings, but I > > don't see where it can result in a performance degradation. > ... Registers, by definition CANNOT change from original values after > a subroutine call returns. Not sure I follow you there. Which definition are you talking about? > [saving and restoring registers] is nessasary > considering you can have constructs such as 'register int charlie'. If the calling procedure saves all the registers that are being used, and restores them itself, then the called procedure can do anything it pleases with the registers, including, of course, use register variables. -- " ... " Jeff Lewis vvvvvvvvvvvv {decvax|ucbvax|allegra|seismo|harpo|teklabs|ihnp4}!pur-ee!lewie ^^^^^^^^^^^^