pa.c (output_cbranch, [...]): Output nop for conditional branch to the following instruction.

* pa.c (output_cbranch, output_bb, output_bvb): Output nop for
	conditional branch to the following instruction.

From-SVN: r64725
This commit is contained in:
John David Anglin 2003-03-22 19:25:06 +00:00 committed by John David Anglin
parent 2c0e6cf3a9
commit f7723f2296
2 changed files with 16 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2003-03-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (output_cbranch, output_bb, output_bvb): Output nop for
conditional branch to the following instruction.
2003-03-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR doc-bug/9813

View File

@ -5159,13 +5159,18 @@ output_cbranch (operands, nullify, length, negated, insn)
static char buf[100];
int useskip = 0;
/* A conditional branch to the following instruction (eg the delay slot) is
asking for a disaster. This can happen when not optimizing.
/* A conditional branch to the following instruction (eg the delay slot)
is asking for a disaster. This can happen when not optimizing and
when jump optimization fails.
In such cases it is safe to emit nothing. */
While it usually safe to emit nothing, this can fail if the preceding
instruction is a nullified branch with an empty delay slot and the
same branch target as this branch. We could check for this but
jump optimization should eliminate these jumps. It is always
safe to emit a nop. */
if (next_active_insn (JUMP_LABEL (insn)) == next_active_insn (insn))
return "";
return "nop";
/* If this is a long branch with its delay slot unfilled, set `nullify'
as it can nullify the delay slot and save a nop. */
@ -5369,7 +5374,7 @@ output_bb (operands, nullify, length, negated, insn, which)
jump. But be prepared just in case. */
if (next_active_insn (JUMP_LABEL (insn)) == next_active_insn (insn))
return "";
return "nop";
/* If this is a long branch with its delay slot unfilled, set `nullify'
as it can nullify the delay slot and save a nop. */
@ -5517,7 +5522,7 @@ output_bvb (operands, nullify, length, negated, insn, which)
jump. But be prepared just in case. */
if (next_active_insn (JUMP_LABEL (insn)) == next_active_insn (insn))
return "";
return "nop";
/* If this is a long branch with its delay slot unfilled, set `nullify'
as it can nullify the delay slot and save a nop. */