aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-31 06:08:41 +0000
committerRichard Stallman <rms@gnu.org>1993-05-31 06:08:41 +0000
commit8d6f415e90f94dd0360c6f140744d92af3d3575f (patch)
tree3502c3e2db1ea7d72740f844c457347de8bd7e2d
parentd0ca05efa9a42742551531350bbef921e0a5a0b8 (diff)
downloadgcc-8d6f415e90f94dd0360c6f140744d92af3d3575f.zip
gcc-8d6f415e90f94dd0360c6f140744d92af3d3575f.tar.gz
gcc-8d6f415e90f94dd0360c6f140744d92af3d3575f.tar.bz2
(output_cbranch): In forward/long branch case...
(output_cbranch): In forward/long branch case, only nullify if the delay slot was empty or if the delay slot was explicitly nullified. (output_bb): Likewise. From-SVN: r4608
-rw-r--r--gcc/config/pa/pa.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 6ab86b7..ff04b05 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -3225,10 +3225,13 @@ output_cbranch (operands, nullify, length, negated, insn)
strcat (buf, "%S3");
else
strcat (buf, "%B3");
- /* Regardless of whether or not this branch got its slot
- filled we can nullify the following instruction and
- avoid emitting a nop. */
- strcat (buf, " %2,%1,0\n\tbl%* %0,0");
+ /* Nullify the delay slot if the delay slot was explicitly
+ nullified by the delay branch scheduler or if no insn
+ could be placed in the delay slot. */
+ if (nullify)
+ strcat (buf, " %2,%1,0\n\tbl,n %0,0");
+ else
+ strcat (buf, " %2,%1,0\n\tbl%* %0,0");
break;
/* Long backward conditional branch with nullification. */
@@ -3308,10 +3311,14 @@ output_bb (operands, nullify, length, negated, insn, which)
strcat (buf, "<");
else
strcat (buf, ">=");
- /* Regardless of whether or not this branch got its slot
- filled we can nullify the following instruction and
- avoid emitting a nop. */
- if (negated)
+ /* Nullify the delay slot if the delay slot was explicitly
+ nullified by the delay branch scheduler or if no insn
+ could be placed in the delay slot. */
+ if (nullify && negated)
+ strcat (buf, " %0,%1,1,0\n\tbl,n %3,0");
+ else if (nullify && ! negated)
+ strcat (buf, " %0,%1,1,0\n\tbl,n %2,0");
+ else if (negated)
strcat (buf, " %0,%1,1,0\n\tbl%* %3,0");
else
strcat (buf, " %0,%1,1,0\n\tbl%* %2,0");