diff options
author | David S. Miller <davem@redhat.com> | 2002-04-24 13:48:39 +0000 |
---|---|---|
committer | David S. Miller <davem@redhat.com> | 2002-04-24 13:48:39 +0000 |
commit | 21d83aa55ad8543b4a732680302aba99cb89b8b7 (patch) | |
tree | e4165184393a4b317de2bb5ba50f56ac92695adc /gdb/i960-tdep.c | |
parent | c6ed57bdd2893634eca15d944347c9decf64d574 (diff) | |
download | gdb-21d83aa55ad8543b4a732680302aba99cb89b8b7.zip gdb-21d83aa55ad8543b4a732680302aba99cb89b8b7.tar.gz gdb-21d83aa55ad8543b4a732680302aba99cb89b8b7.tar.bz2 |
2002-04-24 David S. Miller <davem@redhat.com>
* i960-tdep.c (register_in_window_p): New function.
(i960_find_saved_register): Use it instead of
REGISTER_IN_WINDOW_P.
* config/i960/tm-i960.h (REGISTER_IN_WINDOW): Delete.
2002-04-24 David S. Miller <davem@redhat.com>
* gdbint.texinfo (REGISTER_IN_WINDOW): Delete definition.
Diffstat (limited to 'gdb/i960-tdep.c')
-rw-r--r-- | gdb/i960-tdep.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gdb/i960-tdep.c b/gdb/i960-tdep.c index 820e502..98718a3 100644 --- a/gdb/i960-tdep.c +++ b/gdb/i960-tdep.c @@ -122,6 +122,24 @@ check_host (void) } } +/* Is this register part of the register window system? A yes answer + implies that 1) The name of this register will not be the same in + other frames, and 2) This register is automatically "saved" upon + subroutine calls and thus there is no need to search more than one + stack frame for it. + + On the i960, in fact, the name of this register in another frame is + "mud" -- there is no overlap between the windows. Each window is + simply saved into the stack (true for our purposes, after having been + flushed; normally they reside on-chip and are restored from on-chip + without ever going to memory). */ + +static int +register_in_window_p (int regnum) +{ + return regnum <= R15_REGNUM; +} + /* i960_find_saved_register () Return the address in which frame FRAME's value of register REGNUM @@ -154,7 +172,7 @@ i960_find_saved_register (struct frame_info *frame, int regnum) stack pointer saved for *this* frame; this is returned from the next frame. */ - if (REGISTER_IN_WINDOW_P (regnum)) + if (register_in_window_p (regnum)) { frame1 = get_next_frame (frame); if (!frame1) |