diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-25 15:44:03 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-25 15:44:03 +0000 |
commit | ef785e44304320877d36bea73faa8894aec37d62 (patch) | |
tree | ecb26b57f95f7e89167f34c2184d957f7f5f4ba6 | |
parent | a32003da58847a9dba1d4c9a31e5410764f72599 (diff) | |
download | gcc-ef785e44304320877d36bea73faa8894aec37d62.tar.gz |
* config/c6x/pr-support.c (__gnu_unwind_24bit): Correct logic for the
case where B3 isn't the return register.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180434 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libgcc/ChangeLog | 5 | ||||
-rw-r--r-- | libgcc/config/c6x/pr-support.c | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 91068ce1f50..e39fccc322c 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2011-10-25 Bernd Schmidt <bernds@codesourcery.com> + + * config/c6x/pr-support.c (__gnu_unwind_24bit): Correct logic for the + case where B3 isn't the return register. + 2011-10-25 Andreas Tobler <andreast@fgznet.ch> * config/rs6000/t-freebsd: Add wildcard. diff --git a/libgcc/config/c6x/pr-support.c b/libgcc/config/c6x/pr-support.c index 6375013cb66..e635a6033c2 100644 --- a/libgcc/config/c6x/pr-support.c +++ b/libgcc/config/c6x/pr-support.c @@ -273,6 +273,14 @@ __gnu_unwind_24bit (_Unwind_Context * context, _uw data, int compact) _uw mask; _uw *ptr; _uw tmp; + int ret_reg = unwind_frame_regs[data & 0xf]; + + if (ret_reg != R_B3) + { + _Unwind_VRS_Get (context, _UVRSC_CORE, unwind_frame_regs[data & 0xf], + _UVRSD_UINT32, &tmp); + _Unwind_VRS_Set (context, _UVRSC_CORE, R_B3, _UVRSD_UINT32, &tmp); + } mask = (data >> 4) & 0x1fff; @@ -291,8 +299,7 @@ __gnu_unwind_24bit (_Unwind_Context * context, _uw data, int compact) else pop_frame (context, mask, ptr, offset != 0x7f); - _Unwind_VRS_Get (context, _UVRSC_CORE, unwind_frame_regs[data & 0xf], - _UVRSD_UINT32, &tmp); + _Unwind_VRS_Get (context, _UVRSC_CORE, R_B3, _UVRSD_UINT32, &tmp); _Unwind_VRS_Set (context, _UVRSC_CORE, R_PC, _UVRSD_UINT32, &tmp); return _URC_OK; |