pa.c: Use a register name, not a raw immediate in "bv" instructions.

* pa.c: Use a register name, not a raw immediate in "bv" instructions.
        * pa.md, pa.h, ee.asm, ee_fp.asm, lib2funcs.asm: Likewise.

From-SVN: r26403
This commit is contained in:
Jeffrey A Law 1999-04-13 11:31:35 +00:00 committed by Jeff Law
parent 4ac19b2c16
commit f24d52e1ab
7 changed files with 35 additions and 31 deletions

View File

@ -10,6 +10,9 @@ 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)
* pa.c: Use a register name, not a raw immediate in "bv" instructions.
* pa.md, pa.h, ee.asm, ee_fp.asm, lib2funcs.asm: Likewise.
* pa.c: Remove space register specification in memory addresses,
except where it is actually needed.
* pa.md, pa.h, ee.asm, ee_fp.asm, lib2funcs.asm: Likewise.

View File

@ -150,7 +150,7 @@ L$0000
nop
L$0001
; Return
bv,n 0(%r31)
bv,n %r0(%r31)
.EXIT
.PROCEND
@ -255,7 +255,7 @@ L$0004
nop
L$0005
; Return and deallocate our frame.
bv 0(%r31)
bv %r0(%r31)
sub %r30,%r21,%r30
.EXIT
.PROCEND

View File

@ -154,7 +154,7 @@ L$0002
nop
L$0003
; Return, setting up a frame pointer in the delay slot
bv 0(%r31)
bv %r0(%r31)
sub %r30,%r21,%r3
.EXIT
.PROCEND
@ -266,7 +266,7 @@ L$0006
nop
L$0007
; Return and deallocate our frame.
bv 0(%r31)
bv %r0(%r31)
copy %r21,%r30
.EXIT
.PROCEND

View File

@ -282,12 +282,12 @@ $$divU
ds %r1,divisor,%r1
addc dividend,dividend,quotient
ds %r1,divisor,%r1
bv 0(ret)
bv %r0(ret)
addc quotient,quotient,quotient
L$largedivisor
comclr,<< dividend,divisor,quotient
ldi 1,quotient
bv,n 0(ret)
bv,n %r0(ret)
.exit
.procend
#endif
@ -376,12 +376,12 @@ $$remU
ds %r1,divisor,%r1
comclr,>= %r1,%r0,%r0
addl %r1,divisor,%r1
bv 0(ret)
bv %r0(ret)
copy %r1,quotient
L$largedivisor
sub,>>= dividend,divisor,quotient
copy dividend,quotient
bv,n 0(ret)
bv,n %r0(ret)
.exit
.procend
#endif
@ -479,12 +479,12 @@ $$divI
addl %r1,divisor,%r1
comclr,>= quotient,%r0,%r0 ; skip of no need to negate
sub %r0,dividend,dividend
bv 0(ret)
bv %r0(ret)
copy dividend,quotient
L$largedivisor
comclr,<< dividend,divisor,quotient
ldi 1,quotient
bv,n 0(ret)
bv,n %r0(ret)
.exit
.procend
#endif
@ -582,12 +582,12 @@ $$remI
addl %r1,divisor,%r1
comclr,>= quotient,%r0,%r0 ; skip of no need to negate
sub %r0,%r1,%r1
bv 0(ret)
bv %r0(ret)
copy %r1,quotient
L$largedivisor
sub,>>= dividend,divisor,quotient
copy dividend,quotient
bv,n 0(ret)
bv,n %r0(ret)
.exit
.procend
#endif
@ -630,7 +630,7 @@ $$divU_3
sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend
shd %r1,%r29,31,%r29 ; r29 = hi(10 x r)
addc %r29,%r0,%r29
bv 0(ret)
bv %r0(ret)
extru %r29,30,31,result
.exit
.procend
@ -674,7 +674,7 @@ $$divU_5
sh2add %r29,%r26,%r0 ; r0 = lo(1000 x r) + dividend
shd %r1,%r29,30,%r29 ; r29 = hi(1000 x r)
addc %r29,%r0,%r29
bv 0(ret)
bv %r0(ret)
extru %r29,29,30,result
.exit
.procend
@ -718,7 +718,7 @@ $$divU_6
sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend
shd %r1,%r29,31,%r29 ; r29 = hi(10 x r)
addc %r29,%r0,%r29
bv 0(ret)
bv %r0(ret)
extru %r29,29,30,result
.exit
.procend
@ -762,7 +762,7 @@ $$divU_9
sh3add %r29,%r26,%r0
shd %r1,%r29,29,%r29
addc %r29,0,%r29 /* 111000111000111000111000111001 */
bv 0(ret)
bv %r0(ret)
extru %r29,30,31,result
.exit
.procend
@ -806,7 +806,7 @@ $$divU_10
sh2add %r29,%r26,%r0 ; r0 = lo(1000 x r) + dividend
shd %r1,%r29,30,%r29 ; r29 = hi(1000 x r)
addc %r29,%r0,%r29
bv 0(ret)
bv %r0(ret)
extru %r29,28,29,result
.exit
.procend
@ -850,7 +850,7 @@ $$divU_12
sh1add %r29,%r26,%r0 ; r0 = lo(10 x r) + dividend
shd %r1,%r29,31,%r29 ; r29 = hi(10 x r)
addc %r29,%r0,%r29
bv 0(ret)
bv %r0(ret)
extru %r29,28,29,result
.exit
.procend

View File

@ -4580,7 +4580,8 @@ output_cbranch (operands, nullify, length, negated, insn)
output_asm_insn ("bl .+8,%%r1\n\taddil L'%l0-%l4,%%r1", xoperands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
CODE_LABEL_NUMBER (xoperands[4]));
output_asm_insn ("ldo R'%l0-%l4(%%r1),%%r1\n\tbv 0(%%r1)", xoperands);
output_asm_insn ("ldo R'%l0-%l4(%%r1),%%r1\n\tbv %%r0(%%r1)",
xoperands);
}
/* Now restore the value of %r1 in the delay slot. We're not
@ -5159,7 +5160,7 @@ output_millicode_call (insn, call_dest)
output_asm_insn ("blr 0,%%r31", xoperands);
/* Jump to our target address in %r29. */
output_asm_insn ("bv,n 0(%%r29)", xoperands);
output_asm_insn ("bv,n %%r0(%%r29)", xoperands);
/* Empty delay slot. Note this insn gets fetched twice and
executed once. To be safe we use a nop. */
@ -5184,7 +5185,7 @@ output_millicode_call (insn, call_dest)
output_asm_insn ("blr 0,%%r31", xoperands);
/* Branch to our target which is in %r1. */
output_asm_insn ("bv,n 0(%%r1)", xoperands);
output_asm_insn ("bv,n %%r0(%%r1)", xoperands);
/* Empty delay slot. Note this insn gets fetched twice and
executed once. To be safe we use a nop. */
@ -5417,7 +5418,7 @@ output_call (insn, call_dest)
output_asm_insn ("blr 0,%%r31", xoperands);
/* Branch to our target which is in %r1. */
output_asm_insn ("bv 0(%%r1)", xoperands);
output_asm_insn ("bv %%r0(%%r1)", xoperands);
/* Copy the return address into %r2 also. */
output_asm_insn ("copy %%r31,%%r2", xoperands);

View File

@ -2342,7 +2342,7 @@ DTORS_SECTION_FUNCTION
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
if (TARGET_BIG_SWITCH) \
fprintf (FILE, "\tstw %%r1,-16(%%r30)\n\tldw T'L$%04d(%%r19),%%r1\n\tbv 0(%%r1)\n\tldw -16(%%r30),%%r1\n", VALUE); \
fprintf (FILE, "\tstw %%r1,-16(%%r30)\n\tldw T'L$%04d(%%r19),%%r1\n\tbv %%r0(%%r1)\n\tldw -16(%%r30),%%r1\n", VALUE); \
else \
fprintf (FILE, "\tb L$%04d\n\tnop\n", VALUE)

View File

@ -3975,7 +3975,7 @@
(define_insn "return"
[(return)]
"hppa_can_use_return_insn_p ()"
"bv%* 0(%%r2)"
"bv%* %%r0(%%r2)"
[(set_attr "type" "branch")
(set_attr "length" "4")])
@ -3985,7 +3985,7 @@
[(use (reg:SI 2))
(return)]
""
"bv%* 0(%%r2)"
"bv%* %%r0(%%r2)"
[(set_attr "type" "branch")
(set_attr "length" "4")])
@ -4079,7 +4079,7 @@
output_asm_insn (\"bl .+8,%%r1\\n\\taddil L'%l0-%l1,%%r1\", xoperands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn (\"ldo R'%l0-%l1(%%r1),%%r1\\n\\tbv 0(%%r1)\",
output_asm_insn (\"ldo R'%l0-%l1(%%r1),%%r1\\n\\tbv %%r0(%%r1)\",
xoperands);
}
else
@ -4276,7 +4276,7 @@
/* Long millicode call for portable runtime. */
if (get_attr_length (insn) == 20)
return \"ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n 0(%%r31)\;nop\";
return \"ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n %%r0(%%r31)\;nop\";
/* If we're generating PIC code. */
xoperands[0] = operands[0];
@ -4287,7 +4287,7 @@
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn (\"ldo R%%$$dyncall-%1(%%r1),%%r1\", xoperands);
output_asm_insn (\"blr 0,%%r2\", xoperands);
output_asm_insn (\"bv,n 0(%%r1)\\n\\tnop\", xoperands);
output_asm_insn (\"bv,n %%r0(%%r1)\\n\\tnop\", xoperands);
return \"\";
}"
[(set_attr "type" "dyncall")
@ -4436,7 +4436,7 @@
/* Long millicode call for portable runtime. */
if (get_attr_length (insn) == 20)
return \"ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n 0(%%r31)\;nop\";
return \"ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n %%r0(%%r31)\;nop\";
/* If we're generating PIC code. */
xoperands[0] = operands[1];
@ -4447,7 +4447,7 @@
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn (\"ldo R%%$$dyncall-%1(%%r1),%%r1\", xoperands);
output_asm_insn (\"blr 0,%%r2\", xoperands);
output_asm_insn (\"bv,n 0(%%r1)\\n\\tnop\", xoperands);
output_asm_insn (\"bv,n %%r0(%%r1)\\n\\tnop\", xoperands);
return \"\";
}"
[(set_attr "type" "dyncall")
@ -4548,7 +4548,7 @@
(define_insn "indirect_jump"
[(set (pc) (match_operand:SI 0 "register_operand" "r"))]
""
"bv%* 0(%0)"
"bv%* %%r0(%0)"
[(set_attr "type" "branch")
(set_attr "length" "4")])