Commit dcaeffef by Jeffrey A Law Committed by Jeff Law

pa.md (branch, [...]): Handle (const_int 0) as first source operand.

        * pa.md (branch, negated branch): Handle (const_int 0) as first
        source operand.
        * pa.c (output_cbranch): Likewise.
Should fix unrolling aborts on the PA.

From-SVN: r24465
parent ae3de8b7
Sun Jan 3 20:40:34 1999 Jeffrey A Law (law@cygnus.com)
* pa.md (branch, negated branch): Handle (const_int 0) as first
source operand.
* pa.c (output_cbranch): Likewise.
Sun Jan 3 03:20:38 1999 David Edelsohn <edelsohn@mhpcc.edu> Sun Jan 3 03:20:38 1999 David Edelsohn <edelsohn@mhpcc.edu>
* rs6000.c (rs6000_stack_info): Undo spurious part of last * rs6000.c (rs6000_stack_info): Undo spurious part of last
......
...@@ -4461,11 +4461,11 @@ output_cbranch (operands, nullify, length, negated, insn) ...@@ -4461,11 +4461,11 @@ output_cbranch (operands, nullify, length, negated, insn)
else else
strcat (buf, "%S3"); strcat (buf, "%S3");
if (useskip) if (useskip)
strcat (buf, " %2,%1,0"); strcat (buf, " %2,%r1,0");
else if (nullify) else if (nullify)
strcat (buf, ",n %2,%1,%0"); strcat (buf, ",n %2,%r1,%0");
else else
strcat (buf, " %2,%1,%0"); strcat (buf, " %2,%r1,%0");
break; break;
/* All long conditionals. Note an short backward branch with an /* All long conditionals. Note an short backward branch with an
...@@ -4483,7 +4483,7 @@ output_cbranch (operands, nullify, length, negated, insn) ...@@ -4483,7 +4483,7 @@ output_cbranch (operands, nullify, length, negated, insn)
strcat (buf, "%S3"); strcat (buf, "%S3");
else else
strcat (buf, "%B3"); strcat (buf, "%B3");
strcat (buf, ",n %2,%1,.+12\n\tbl %0,0"); strcat (buf, ",n %2,%r1,.+12\n\tbl %0,0");
} }
/* Handle short backwards branch with an unfilled delay slot. /* Handle short backwards branch with an unfilled delay slot.
Using a comb;nop rather than comiclr;bl saves 1 cycle for both Using a comb;nop rather than comiclr;bl saves 1 cycle for both
...@@ -4496,9 +4496,9 @@ output_cbranch (operands, nullify, length, negated, insn) ...@@ -4496,9 +4496,9 @@ output_cbranch (operands, nullify, length, negated, insn)
{ {
strcpy (buf, "com%I2b,"); strcpy (buf, "com%I2b,");
if (negated) if (negated)
strcat (buf, "%B3 %2,%1,%0%#"); strcat (buf, "%B3 %2,%r1,%0%#");
else else
strcat (buf, "%S3 %2,%1,%0%#"); strcat (buf, "%S3 %2,%r1,%0%#");
} }
else else
{ {
...@@ -4508,9 +4508,9 @@ output_cbranch (operands, nullify, length, negated, insn) ...@@ -4508,9 +4508,9 @@ output_cbranch (operands, nullify, length, negated, insn)
else else
strcat (buf, "%B3"); strcat (buf, "%B3");
if (nullify) if (nullify)
strcat (buf, " %2,%1,0\n\tbl,n %0,0"); strcat (buf, " %2,%r1,0\n\tbl,n %0,0");
else else
strcat (buf, " %2,%1,0\n\tbl %0,0"); strcat (buf, " %2,%r1,0\n\tbl %0,0");
} }
break; break;
...@@ -4523,9 +4523,9 @@ output_cbranch (operands, nullify, length, negated, insn) ...@@ -4523,9 +4523,9 @@ output_cbranch (operands, nullify, length, negated, insn)
/* Create a reversed conditional branch which branches around /* Create a reversed conditional branch which branches around
the following insns. */ the following insns. */
if (negated) if (negated)
strcpy (buf, "com%I2b,%S3,n %2,%1,.+20"); strcpy (buf, "com%I2b,%S3,n %2,%r1,.+20");
else else
strcpy (buf, "com%I2b,%B3,n %2,%1,.+20"); strcpy (buf, "com%I2b,%B3,n %2,%r1,.+20");
output_asm_insn (buf, operands); output_asm_insn (buf, operands);
/* Output an insn to save %r1. */ /* Output an insn to save %r1. */
...@@ -4548,9 +4548,9 @@ output_cbranch (operands, nullify, length, negated, insn) ...@@ -4548,9 +4548,9 @@ output_cbranch (operands, nullify, length, negated, insn)
/* Create a reversed conditional branch which branches around /* Create a reversed conditional branch which branches around
the following insns. */ the following insns. */
if (negated) if (negated)
strcpy (buf, "com%I2b,%S3,n %2,%1,.+28"); strcpy (buf, "com%I2b,%S3,n %2,%r1,.+28");
else else
strcpy (buf, "com%I2b,%B3,n %2,%1,.+28"); strcpy (buf, "com%I2b,%B3,n %2,%r1,.+28");
output_asm_insn (buf, operands); output_asm_insn (buf, operands);
/* Output an insn to save %r1. */ /* Output an insn to save %r1. */
......
...@@ -1031,7 +1031,7 @@ ...@@ -1031,7 +1031,7 @@
[(set (pc) [(set (pc)
(if_then_else (if_then_else
(match_operator 3 "comparison_operator" (match_operator 3 "comparison_operator"
[(match_operand:SI 1 "register_operand" "r") [(match_operand:SI 1 "reg_or_0_operand" "rM")
(match_operand:SI 2 "arith5_operand" "rL")]) (match_operand:SI 2 "arith5_operand" "rL")])
(label_ref (match_operand 0 "" "")) (label_ref (match_operand 0 "" ""))
(pc)))] (pc)))]
...@@ -1059,7 +1059,7 @@ ...@@ -1059,7 +1059,7 @@
[(set (pc) [(set (pc)
(if_then_else (if_then_else
(match_operator 3 "comparison_operator" (match_operator 3 "comparison_operator"
[(match_operand:SI 1 "register_operand" "r") [(match_operand:SI 1 "reg_or_0_operand" "rM")
(match_operand:SI 2 "arith5_operand" "rL")]) (match_operand:SI 2 "arith5_operand" "rL")])
(pc) (pc)
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment