pa.md (call_internal_reg, [...]): If TARGET_GAS and not TARGET_SOM...

* pa.md (call_internal_reg, call_value_internal_reg): If TARGET_GAS and
	not TARGET_SOM, use $PIC_pcrel$0 rather than symbol difference for long
	PIC calls to $$dyncall.
	* pa.c (output_call): Likewise.

From-SVN: r61699
This commit is contained in:
John David Anglin 2003-01-24 15:51:25 +00:00 committed by John David Anglin
parent 1cfd1ab021
commit 57aaa09ab6
3 changed files with 49 additions and 14 deletions

View File

@ -1,3 +1,10 @@
2003-01-24 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.md (call_internal_reg, call_value_internal_reg): If TARGET_GAS and
not TARGET_SOM, use $PIC_pcrel$0 rather than symbol difference for long
PIC calls to $$dyncall.
* pa.c (output_call): Likewise.
2003-01-23 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
PR java/6748

View File

@ -6153,10 +6153,20 @@ output_call (insn, call_dest, sibcall)
output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands);
/* Add %r1 to the offset of dyncall from the next insn. */
output_asm_insn ("addil L%%$$dyncall-%1,%%r1", xoperands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn ("ldo R%%$$dyncall-%1(%%r1),%%r1", xoperands);
if (TARGET_SOM || !TARGET_GAS)
{
output_asm_insn ("addil L%%$$dyncall-%1,%%r1", xoperands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn ("ldo R%%$$dyncall-%1(%%r1),%%r1", xoperands);
}
else
{
output_asm_insn ("addil L%%$$dyncall-$PIC_pcrel$0+4,%%r1",
xoperands);
output_asm_insn ("ldo R%%$$dyncall-$PIC_pcrel$0+8(%%r1),%%r1",
xoperands);
}
/* Get the return address into %r31. */
output_asm_insn ("blr %%r0,%%r31", xoperands);

View File

@ -5909,12 +5909,21 @@
/* If we're generating PIC code. */
xoperands[0] = operands[0];
xoperands[1] = gen_label_rtx ();
output_asm_insn (\"{bl|b,l} .+8,%%r1\", xoperands);
output_asm_insn (\"addil L%%$$dyncall-%1,%%r1\", xoperands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn (\"ldo R%%$$dyncall-%1(%%r1),%%r1\", xoperands);
if (TARGET_SOM || !TARGET_GAS)
{
xoperands[1] = gen_label_rtx ();
output_asm_insn (\"addil L%%$$dyncall-%1,%%r1\", xoperands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn (\"ldo R%%$$dyncall-%1(%%r1),%%r1\", xoperands);
}
else
{
output_asm_insn (\"addil L%%$$dyncall-$PIC_pcrel$0+4,%%r1\", xoperands);
output_asm_insn (\"ldo R%%$$dyncall-$PIC_pcrel$0+8(%%r1),%%r1\",
xoperands);
}
output_asm_insn (\"blr %%r0,%%r2\", xoperands);
output_asm_insn (\"bv,n %%r0(%%r1)\\n\\tnop\", xoperands);
return \"\";
@ -6084,12 +6093,21 @@
/* If we're generating PIC code. */
xoperands[0] = operands[1];
xoperands[1] = gen_label_rtx ();
output_asm_insn (\"{bl|b,l} .+8,%%r1\", xoperands);
output_asm_insn (\"addil L%%$$dyncall-%1,%%r1\", xoperands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn (\"ldo R%%$$dyncall-%1(%%r1),%%r1\", xoperands);
if (TARGET_SOM || !TARGET_GAS)
{
xoperands[1] = gen_label_rtx ();
output_asm_insn (\"addil L%%$$dyncall-%1,%%r1\", xoperands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn (\"ldo R%%$$dyncall-%1(%%r1),%%r1\", xoperands);
}
else
{
output_asm_insn (\"addil L%%$$dyncall-$PIC_pcrel$0+4,%%r1\", xoperands);
output_asm_insn (\"ldo R%%$$dyncall-$PIC_pcrel$0+8(%%r1),%%r1\",
xoperands);
}
output_asm_insn (\"blr %%r0,%%r2\", xoperands);
output_asm_insn (\"bv,n %%r0(%%r1)\\n\\tnop\", xoperands);
return \"\";