Article View: comp.arch
Article #10987Re: branch-and-link
From: John G Dobnick
Date: Mon, 28 Dec 1992 01:35
Date: Mon, 28 Dec 1992 01:35
41 lines
2571 bytes
2571 bytes
From article <1hkqk3INNsns@transfer.stratus.com>, by dswartz@sw.stratus.com (Dan Swartzendruber):
> Here's a question for the hardware types: is there any reason either of
> design complexity or performance to not have *all* branches (conditional
> and unconditional) save their origin somewhere (probably in a fast
> dedicated register)?
Can't speak to the hardware complexity, but it _has_ been done.
The Unisys (formerly Univac) 1100 series machines did this. Various
models saved the last "n" jump locations ("n" being model dependent)
in part of the fast register stack. I believe the minimum value
of n was 4. Even this much "jump history" was quite useful in
debugging certain types of program failure. (What is saved is the
value of the program counter when the jump is executed -- this is
usually one past the actual jump. For conditional jumps, this
address is saved only if the jump is taken.)
I'm not quite sure what the specs are on the more recent models of the
2200 series machines (successors to the 1100's), but I think they
save at least 8 previous jump locations.
The Operating system also has the facility to detect "jump history
full" conditions and trap to a routine to save these values in main
memory. This allows the OS to maintain a much longer jump history --
useful for OS debugging -- at the cost of lessened system performance.
Except for the "special" use of this in OS debugging, there was _no_
performance hit for the feature. In fact, it was always "on" for
normal user code. When the jump history filled, it "wrapped". There
was a hardware status bit set to flag where the "oldest" of the
history entries was, so one could make sense of them.
All in all, a _quite_ useful feature. More machines should have it!
--
John G Dobnick ATTnet: (414) 229-5727
Computing Services Division INTERNET: jgd@uwm.edu
University of Wisconsin - Milwaukee UUCP: uunet!uwm!jgd
"Knowing how things work is the basis for appreciation,
and is thus a source of civilized delight." -- William Safire
Technical Details
Message-ID:
<1hlll9INNe0s@uwm.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!csd4.csd.uwm.edu!jgdReferences:
<1hkqk3INNsns@transfer.stratus.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!csd4.csd.uwm.edu!jgd From: jgd@csd4.csd.uwm.edu (John G Dobnick) Newsgroups: comp.arch Subject: Re: branch-and-link Date: 28 Dec 1992 01:35:37 GMT Organization: University of Wisconsin - Milwaukee Lines: 41 Message-ID: <1hlll9INNe0s@uwm.edu> References: <1hkqk3INNsns@transfer.stratus.com> Reply-To: jgd@csd4.csd.uwm.edu NNTP-Posting-Host: 129.89.7.4 Originator: jgd@csd4.csd.uwm.edu