Commit 55abf18a by Jeffrey A Law Committed by Jeff Law

pa.c: Avoid Using immediate zero for register zero.

        * pa.c: Avoid Using immediate zero for register zero.
        * pa.md: Likewise.

From-SVN: r26409
parent f72b27a5
...@@ -20,6 +20,13 @@ Tue Apr 13 05:04:59 1999 Richard Earnshaw (rearnsha@arm.com) ...@@ -20,6 +20,13 @@ Tue Apr 13 05:04:59 1999 Richard Earnshaw (rearnsha@arm.com)
Tue Apr 13 02:11:11 1999 Jeffrey A Law (law@cygnus.com) Tue Apr 13 02:11:11 1999 Jeffrey A Law (law@cygnus.com)
* pa.c: Avoid Using immediate zero for register zero.
* pa.md: Likewise.
* pa.c (print_operand, case 'f'): New case for FP register or 0.0.
(print_operand, case 'r'): Use %r0 for zero value.
* pa.md (move patterns, fcmp patterns): Use new %f output arg.
* pa.c: Use a register name, not a raw immediate in branch, * pa.c: Use a register name, not a raw immediate in branch,
compare/clear, sub, subb, uaddcm and vshd instructions. compare/clear, sub, subb, uaddcm and vshd instructions.
* pa.md: Likewise. * pa.md: Likewise.
......
...@@ -1881,7 +1881,7 @@ output_fp_move_double (operands) ...@@ -1881,7 +1881,7 @@ output_fp_move_double (operands)
{ {
if (FP_REG_P (operands[1]) if (FP_REG_P (operands[1])
|| operands[1] == CONST0_RTX (GET_MODE (operands[0]))) || operands[1] == CONST0_RTX (GET_MODE (operands[0])))
output_asm_insn ("fcpy,dbl %r1,%0", operands); output_asm_insn ("fcpy,dbl %f1,%0", operands);
else else
output_asm_insn ("fldd%F1 %1,%0", operands); output_asm_insn ("fldd%F1 %1,%0", operands);
} }
...@@ -3659,7 +3659,18 @@ print_operand (file, x, code) ...@@ -3659,7 +3659,18 @@ print_operand (file, x, code)
|| (x == CONST0_RTX (DFmode)) || (x == CONST0_RTX (DFmode))
|| (x == CONST0_RTX (SFmode))) || (x == CONST0_RTX (SFmode)))
{ {
fputs ("0", file); fputs ("%r0", file);
return;
}
else
break;
case 'f':
/* A register or zero (floating point). */
if (x == const0_rtx
|| (x == CONST0_RTX (DFmode))
|| (x == CONST0_RTX (SFmode)))
{
fputs ("%fr0", file);
return; return;
} }
else else
...@@ -4715,9 +4726,9 @@ output_bb (operands, nullify, length, negated, insn, which) ...@@ -4715,9 +4726,9 @@ output_bb (operands, nullify, length, negated, insn, which)
else else
strcat (buf, ">="); strcat (buf, ">=");
if (nullify && negated) if (nullify && negated)
strcat (buf, " %0,%1,1,%%r0\n\tbn %3"); strcat (buf, " %0,%1,1,%%r0\n\tb,n %3");
else if (nullify && ! negated) else if (nullify && ! negated)
strcat (buf, " %0,%1,1,%%r0\n\tbn %2"); strcat (buf, " %0,%1,1,%%r0\n\tb,n %2");
else if (negated) else if (negated)
strcat (buf, " %0,%1,1,%%r0\n\tb %3"); strcat (buf, " %0,%1,1,%%r0\n\tb %3");
else else
...@@ -4853,9 +4864,9 @@ output_bvb (operands, nullify, length, negated, insn, which) ...@@ -4853,9 +4864,9 @@ output_bvb (operands, nullify, length, negated, insn, which)
else else
strcat (buf, ">="); strcat (buf, ">=");
if (nullify && negated) if (nullify && negated)
strcat (buf, " %0,1,%%r0\n\tbn %3"); strcat (buf, " %0,1,%%r0\n\tb,n %3");
else if (nullify && ! negated) else if (nullify && ! negated)
strcat (buf, " %0,1,%%r0\n\tbn %2"); strcat (buf, " %0,1,%%r0\n\tb,n %2");
else if (negated) else if (negated)
strcat (buf, " %0,1,%%r0\n\tb %3"); strcat (buf, " %0,1,%%r0\n\tb %3");
else else
...@@ -5226,7 +5237,7 @@ output_millicode_call (insn, call_dest) ...@@ -5226,7 +5237,7 @@ output_millicode_call (insn, call_dest)
xoperands[0] = call_dest; xoperands[0] = call_dest;
xoperands[1] = XEXP (PATTERN (NEXT_INSN (insn)), 1); xoperands[1] = XEXP (PATTERN (NEXT_INSN (insn)), 1);
if (! VAL_14_BITS_P (distance)) if (! VAL_14_BITS_P (distance))
output_asm_insn ("bl %0,%%r31\n\tnop\n\tbl,n %1,%%r0", xoperands); output_asm_insn ("bl %0,%%r31\n\tnop\n\tb,n %1", xoperands);
else else
{ {
xoperands[3] = gen_label_rtx (); xoperands[3] = gen_label_rtx ();
...@@ -5475,7 +5486,7 @@ output_call (insn, call_dest) ...@@ -5475,7 +5486,7 @@ output_call (insn, call_dest)
xoperands[0] = call_dest; xoperands[0] = call_dest;
xoperands[1] = XEXP (PATTERN (NEXT_INSN (insn)), 1); xoperands[1] = XEXP (PATTERN (NEXT_INSN (insn)), 1);
if (! VAL_14_BITS_P (distance)) if (! VAL_14_BITS_P (distance))
output_asm_insn ("bl %0,%%r2\n\tnop\n\tbl,n %1,%%r0", xoperands); output_asm_insn ("bl %0,%%r2\n\tnop\n\tb,n %1", xoperands);
else else
{ {
xoperands[3] = gen_label_rtx (); xoperands[3] = gen_label_rtx ();
......
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