diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-09-17 20:54:02 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-09-17 20:54:02 +0000 |
commit | 21f87145aaefc6ebd8b661c70531a2c452dca1f5 (patch) | |
tree | d46c5edc6c824161a31171996627e5eac7031d29 /gdb/mips-tdep.c | |
parent | 6f1d84a5f0310e48c3a6b757da9526bba12a1e78 (diff) | |
download | gdb-21f87145aaefc6ebd8b661c70531a2c452dca1f5.zip gdb-21f87145aaefc6ebd8b661c70531a2c452dca1f5.tar.gz gdb-21f87145aaefc6ebd8b661c70531a2c452dca1f5.tar.bz2 |
2002-08-13 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_pop_frame): Read saved values of floating
point registers without sign extension.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 5071446..683faa4 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -3782,13 +3782,21 @@ mips_pop_frame (void) if (frame->saved_regs == NULL) FRAME_INIT_SAVED_REGS (frame); for (regnum = 0; regnum < NUM_REGS; regnum++) - { - if (regnum != SP_REGNUM && regnum != PC_REGNUM - && frame->saved_regs[regnum]) - write_register (regnum, - read_memory_integer (frame->saved_regs[regnum], - MIPS_SAVED_REGSIZE)); - } + if (regnum != SP_REGNUM && regnum != PC_REGNUM + && frame->saved_regs[regnum]) + { + /* Floating point registers must not be sign extended, + in case MIPS_SAVED_REGSIZE = 4 but sizeof (FP0_REGNUM) == 8. */ + + if (FP0_REGNUM <= regnum && regnum < FP0_REGNUM + 32) + write_register (regnum, + read_memory_unsigned_integer (frame->saved_regs[regnum], + MIPS_SAVED_REGSIZE)); + else + write_register (regnum, + read_memory_integer (frame->saved_regs[regnum], + MIPS_SAVED_REGSIZE)); + } write_register (SP_REGNUM, new_sp); flush_cached_frames (); |