Re: Caller/Callee saved Registers

hbaker@netcom.com (Henry G. Baker)
Sat, 26 Mar 1994 17:04:23 GMT

          From comp.compilers

Related articles
[15 earlier articles]
Re: Caller/Callee saved Registers bart@cs.uoregon.edu (1994-03-25)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-25)
Re: Caller/Callee saved Registers pardo@cs.washington.edu (1994-03-25)
Re: Caller/Callee saved Registers zsh@cs.princeton.edu (1994-03-25)
Re: Caller/Callee saved Registers law@fast.cs.utah.edu (1994-03-26)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-26)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-26)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-26)
Re: Caller/Callee saved Registers anton@mips.complang.tuwien.ac.at (1994-03-28)
Re: Caller/Callee saved Registers zsh@cs.princeton.edu (1994-03-27)
Re: Caller/Callee saved Registers pardo@cs.washington.edu (1994-03-28)
Re: Caller/Callee saved Registers pardo@cs.washington.edu (1994-03-29)
Re: Caller/Callee saved Registers bart@cs.uoregon.edu (1994-03-29)
[8 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: hbaker@netcom.com (Henry G. Baker)
Keywords: registers, design, architecture
Organization: nil
References: 94-03-054 94-03-136
Date: Sat, 26 Mar 1994 17:04:23 GMT

pardo@cs.washington.edu (David Keppel) writes:
>it does tend to reinforce my feeling that it's sometimes hard to
>get multicycle memory operations right, esp. `load multiple', which can
>overwrite the register being loaded...


Boy, do I know this bug. The IBM 360 had this very convenient 'load
multiple' instruction which was used for restoring saved registers when
returning from a subroutine. I can't remember exactly, but I think that
the standard usage did _not_ touch the 'base' register being used to
address the memory where the registers were being loaded from. IBM
machines got this instruction right, so I proceeded to try to use it to
implement a combined CAR+CDR instruction on a Lisp. Of course, most CDR's
are used for accessing the next element of a list, so the previous CDR is
no longer needed, and can be overwritten -- LM car,cdr,4(cdr).


The RCA Spectra 70 machine emulated to the IBM 360 instruction set so that
they could utilize (some would say 'rip off') IBM software. Apparently
most of the code worked. Unfortunately, RCA got the load multiple
instruction wrong, and I spent _days_ proving that for once I had a real,
live hardware bug! (I never did isolate exactly what the RCA instruction
did.)
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.