From: Michael Snyder Date: Tue, 17 Sep 2002 20:54:02 +0000 (+0000) Subject: 2002-08-13 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21f87145aaefc6ebd8b661c70531a2c452dca1f5;p=binutils-gdb.git 2002-08-13 Michael Snyder * mips-tdep.c (mips_pop_frame): Read saved values of floating point registers without sign extension. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 14d09fb8744..f2c1116a9a8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-08-13 Michael Snyder + + * mips-tdep.c (mips_pop_frame): Read saved values of floating + point registers without sign extension. + 2002-09-17 Andrew Cagney * blockframe.c (deprecated_read_register_dummy): Rename diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 5071446d311..683faa4e4fb 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 ();