Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!dkuug!diku!torbenm From: torbenm@diku.dk (Torben [gidius Mogensen) Newsgroups: comp.arch Subject: Re: register save Message-ID: <1991Mar8.134640.4337@odin.diku.dk> Date: 8 Mar 91 13:46:40 GMT References: <3219@crdos1.crd.ge.COM> <12234@pt.cs.cmu.edu> <7403@mentor.cc.purdue.edu> <1991Mar07.014907.11081@kithrup.COM> <3228@crdos1.crd.ge.COM> Sender: news@odin.diku.dk (Netnews System) Organization: Department of Computer Science, U of Copenhagen Lines: 21 davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes: > All this got me thinking that another bit of memory access which >could be saved on a call is the return address. By putting it into a >(dedicated) register at call time the leaf procedures would avoid >several memory accesses, and the CALL instruction would be simpler, >since the IC would just go into the RETADR register and the stack >pointer would not be changed. That, in turn, leaves the ALU free on the >instruction, which clever software might find useful. > We had this on the GE/Honeywell 36 bit machines. The common call >instruction was TSXn, which left the return address in index register n. >Another potential time saver. The ARM family of processors do this too: The BL (branch and link) instruction saves the PC (R15) in R14, which is called the Link register. There is no JSR instruction in the usual sense, so procedures save and restore the Link register on the stack when necessary. Return is just MOV R15,R14. Torben Mogensen (torbenm@diku.dk)