+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
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. */
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. */
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. */