diff options
author | jsturm <jsturm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-17 23:16:28 +0000 |
---|---|---|
committer | jsturm <jsturm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-17 23:16:28 +0000 |
commit | 77918ba42f29c839be0a9a261842035984d18c3b (patch) | |
tree | dd7f6e080847210376fcad70b237cd3df3c4dce4 /gcc/except.c | |
parent | 9659201a5ff853ca1549f6859050c4ea3074d83b (diff) | |
download | ppe42-gcc-77918ba42f29c839be0a9a261842035984d18c3b.tar.gz ppe42-gcc-77918ba42f29c839be0a9a261842035984d18c3b.zip |
* except.c (dw2_build_landing_pads): New local
clobbers_hard_regs. Emit an ASM_INPUT as a scheduling
barrier after clobbers. Fixes c++/4012.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45667 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/except.c b/gcc/except.c index 90423a7752f..bc21b2c07e2 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1865,6 +1865,7 @@ dw2_build_landing_pads () { struct eh_region *region = cfun->eh->region_array[i]; rtx seq; + bool clobbers_hard_regs = false; /* Mind we don't process a region more than once. */ if (!region || region->region_number != i) @@ -1901,7 +1902,19 @@ dw2_build_landing_pads () if (r == INVALID_REGNUM) break; if (! call_used_regs[r]) - emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, r))); + { + emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, r))); + clobbers_hard_regs = true; + } + } + + if (clobbers_hard_regs) + { + /* @@@ This is a kludge. Not all machine descriptions define a + blockage insn, but we must not allow the code we just generated + to be reordered by scheduling. So emit an ASM_INPUT to act as + blockage insn. */ + emit_insn (gen_rtx_ASM_INPUT (VOIDmode, "")); } emit_move_insn (cfun->eh->exc_ptr, |