diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-25 15:45:08 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-25 15:45:08 +0000 |
commit | 19b8522371c22f5f3edbf9b0e6f39c533d6ae3ef (patch) | |
tree | d9964adb72e57b741bb3225e2132a5b666ea22a0 /libgcc/config | |
parent | ef785e44304320877d36bea73faa8894aec37d62 (diff) | |
download | gcc-19b8522371c22f5f3edbf9b0e6f39c533d6ae3ef.tar.gz |
* config/c6x/pr-support.c (pop_compact_frame, pop_frame): Correct
logic for doubleword pops.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180435 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/config')
-rw-r--r-- | libgcc/config/c6x/pr-support.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/libgcc/config/c6x/pr-support.c b/libgcc/config/c6x/pr-support.c index e635a6033c2..2e0958c4a23 100644 --- a/libgcc/config/c6x/pr-support.c +++ b/libgcc/config/c6x/pr-support.c @@ -153,10 +153,7 @@ pop_compact_frame (_Unwind_Context * context, _uw mask, _uw *ptr, int inc_sp) { int size; _uw test; - int i; - int regno; - int regno2; - int nregs; + int i, regno, nregs; size = 0; nregs = __builtin_popcount (mask); @@ -167,13 +164,11 @@ pop_compact_frame (_Unwind_Context * context, _uw mask, _uw *ptr, int inc_sp) continue; regno = unwind_frame_regs[12 - i]; - /* The last slot is a sigle word, so cannot store a register pair. */ - if (nregs > 2) - regno2 = unwind_frame_regs[13 - i]; - else - regno2 = 0xff; - if ((mask & (test << 1)) != 0 && regno2 == regno + 1 && (regno & 1) == 0) + if (i < 12 && nregs > 2 + && (mask & (test << 1)) != 0 + && unwind_frame_regs[11 - i] == regno + 1 + && (regno & 1) == 0) { i++; nregs--; @@ -196,12 +191,11 @@ pop_compact_frame (_Unwind_Context * context, _uw mask, _uw *ptr, int inc_sp) continue; regno = unwind_frame_regs[12 - i]; - if (nregs > 2) - regno2 = unwind_frame_regs[13 - i]; - else - regno2 = 0xff; - if ((mask & (test << 1)) != 0 && regno2 == regno + 1 && (regno & 1) == 0) + if (i < 12 && nregs > 2 + && (mask & (test << 1)) != 0 + && unwind_frame_regs[11 - i] == regno + 1 + && (regno & 1) == 0) { /* Register pair. */ unwind_restore_pair (context, regno, ptr); @@ -243,7 +237,7 @@ pop_frame (_Unwind_Context * context, _uw mask, _uw *ptr, int inc_sp) if ((mask & (1 << i)) == 0) continue; regno = unwind_frame_regs[12 - i]; - if (i < 12 && unwind_frame_regs[13 - i] == (regno + 1) + if (i < 12 && unwind_frame_regs[11 - i] == (regno + 1) && (mask & (1 << (i + 1))) != 0 && (((_uw)ptr) & 4) == 0 && (regno & 1) == 0) |