diff options
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/config/pa/pa.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f2dfc3..e279678 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-11-02 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR optimization/12845 + * pa.c (output_cbranch): Use cmpb for DImode comparisons with 0. + 2003-11-02 Zack Weinberg <zack@codesourcery.com> * print-rtl.c (print_rtx): Call PRINT_REG with second argument -1. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 89bcd66..856e301 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -5579,6 +5579,12 @@ output_cbranch (rtx *operands, int nullify, int length, int negated, rtx insn) if (next_real_insn (JUMP_LABEL (insn)) == next_real_insn (insn)) return "nop"; + /* The doubleword form of the cmpib instruction doesn't have the LEU + and GTU conditions while the cmpb instruction does. Since we accept + zero for cmpb, we must ensure that we use cmpb for the comparison. */ + if (GET_MODE (operands[1]) == DImode && operands[2] == const0_rtx) + operands[2] = gen_rtx_REG (DImode, 0); + /* If this is a long branch with its delay slot unfilled, set `nullify' as it can nullify the delay slot and save a nop. */ if (length == 8 && dbr_sequence_length () == 0) |
