target/6869: G++ 3.1 generates incorrect assembler instructions for HPPA 2.0
John David Anglin
dave@hiauly1.hia.nrc.ca
Fri May 31 00:58:00 GMT 2002
> - ble R%$$dyncall(%sr4,%r2) <- for PA1.1
> + be,l R%$$dyncall(%sr4,%r2) <- for PA2.0
I have applied the following patch to the mainline. It has been tested
with a bootstrap under hppa2.0w-hp-hpux11.11 with "-mpa-risc-2-0".
It should fix your problem. Would you let me know if it does and
I will close the PR.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-05-31 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (output_millicode_call): Correct "be,l" insn for TARGET_PA_20.
(output_call): Likewise.
Index: config/pa/pa.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.165
diff -u -3 -p -r1.165 pa.c
--- config/pa/pa.c 31 May 2002 04:32:41 -0000 1.165
+++ config/pa/pa.c 31 May 2002 05:28:38 -0000
@@ -6099,7 +6099,10 @@ output_millicode_call (insn, call_dest)
{
xoperands[0] = call_dest;
output_asm_insn ("ldil L%%%0,%3", xoperands);
- output_asm_insn ("{ble|be,l} R%%%0(%%sr4,%3)", xoperands);
+ if (TARGET_PA_20)
+ output_asm_insn ("be,l R%%%0(%%sr4,%3),%sr0,%r31", xoperands);
+ else
+ output_asm_insn ("ble R%%%0(%%sr4,%3)", xoperands);
output_asm_insn ("nop", xoperands);
}
@@ -6355,8 +6358,11 @@ output_call (insn, call_dest, sibcall)
/* Get the high part of the address of $dyncall into %r2, then
add in the low part in the branch instruction. */
output_asm_insn ("ldil L%%$$dyncall,%%r2", xoperands);
- output_asm_insn ("{ble|be,l} R%%$$dyncall(%%sr4,%%r2)",
- xoperands);
+ if (TARGET_PA_20)
+ output_asm_insn ("be,l R%%$$dyncall(%%sr4,%%r2),%sr0,%r31",
+ xoperands);
+ else
+ output_asm_insn ("ble R%%$$dyncall(%%sr4,%%r2)", xoperands);
if (sibcall)
{
More information about the Gcc-patches
mailing list