diff options
author | David Daney <ddaney@avtrex.com> | 2007-10-18 16:43:52 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-10-18 16:43:52 +0000 |
commit | 251270426a6dbb650f4dca6f2cb10924957e5f53 (patch) | |
tree | 382d1f4d4e5bc84c1acd081ac18baba20b0c4fbe /gcc | |
parent | e63637ea90863f9e06bda21f80c4c4c49d99c9ce (diff) | |
download | gcc-251270426a6dbb650f4dca6f2cb10924957e5f53.zip gcc-251270426a6dbb650f4dca6f2cb10924957e5f53.tar.gz gcc-251270426a6dbb650f4dca6f2cb10924957e5f53.tar.bz2 |
linux-unwind.h (mips_fallback_frame_state): Use new reg_offset variable to calculate register locations.
gcc/
2007-10-17 David Daney <ddaney@avtrex.com>
* config/mips/linux-unwind.h (mips_fallback_frame_state): Use new
reg_offset variable to calculate register locations.
From-SVN: r129446
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/linux-unwind.h | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e93e4cb..125ae45 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-10-18 David Daney <ddaney@avtrex.com> + + * config/mips/linux-unwind.h (mips_fallback_frame_state): Use new + reg_offset variable to calculate register locations. + 2007-10-18 Richard Guenther <rguenther@suse.de> * tree-ssa.c (uid_ssaname_map_eq): New function. diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h index dee7703..ed0a84b 100644 --- a/gcc/config/mips/linux-unwind.h +++ b/gcc/config/mips/linux-unwind.h @@ -52,7 +52,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context, { u_int32_t *pc = (u_int32_t *) context->ra; struct sigcontext *sc; - _Unwind_Ptr new_cfa; + _Unwind_Ptr new_cfa, reg_offset; int i; /* 24021061 li v0, 0x1061 (rt_sigreturn)*/ @@ -85,22 +85,24 @@ mips_fallback_frame_state (struct _Unwind_Context *context, else return _URC_END_OF_STACK; - new_cfa = (_Unwind_Ptr)sc; + new_cfa = (_Unwind_Ptr) sc; fs->regs.cfa_how = CFA_REG_OFFSET; fs->regs.cfa_reg = STACK_POINTER_REGNUM; fs->regs.cfa_offset = new_cfa - (_Unwind_Ptr) context->cfa; -#if _MIPS_SIM == _ABIO32 && defined __MIPSEB__ /* On o32 Linux, the register save slots in the sigcontext are eight bytes. We need the lower half of each register slot, so slide our view of the structure back four bytes. */ - new_cfa -= 4; +#if _MIPS_SIM == _ABIO32 && defined __MIPSEB__ + reg_offset = 4; +#else + reg_offset = 0; #endif for (i = 0; i < 32; i++) { fs->regs.reg[i].how = REG_SAVED_OFFSET; fs->regs.reg[i].loc.offset - = (_Unwind_Ptr)&(sc->sc_regs[i]) - new_cfa; + = (_Unwind_Ptr)&(sc->sc_regs[i]) + reg_offset - new_cfa; } /* The PC points to the faulting instruction, but the unwind tables expect it point to the following instruction. We compensate by |