This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
exception-section patch, part 6
- To: egcs-patches at cygnus dot com
- Subject: exception-section patch, part 6
- From: Bruno Haible <haible at ilog dot fr>
- Date: Wed, 1 Jul 1998 00:21:07 +0200 (MET DST)
This patch fixes a small glitch in the jump optimization. When moving some
insn just before a jump to `label', in the following situation,
BARRIER ... some notes ... NOTE_INSN_EH_HANDLER_END ... other notes ... label
the insns would be inserted right after the BARRIER. But since
NOTE_INSN_EH_HANDLER_END represents a section switch, they would end up in
the wrong section. My fix is to choose the insertion point right before
`label'.
Sun Jun 28 19:49:33 1998 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* jump.c (jump_optimize): Insert moved insns immediately before target
label.
diff -c3p egcs-19980628/gcc/jump.c.bak egcs-19980628/gcc/jump.c
*** egcs-19980628/gcc/jump.c.bak Sun Jun 28 01:30:35 1998
--- egcs-19980628/gcc/jump.c Tue Jun 30 13:06:45 1998
*************** jump_optimize (f, cross_jump, noop_moves
*** 723,728 ****
--- 723,729 ----
{
if (GET_CODE (temp1) == BARRIER)
{
+ temp1 = PREV_INSN (JUMP_LABEL (insn));
emit_insn_after (PATTERN (temp), temp1);
temp1 = NEXT_INSN (temp1);
}