pa.c (pa_attr_length_indirect_call): Adjust length of portable runtime and PIC indirect calls.
* config/pa/pa.c (pa_attr_length_indirect_call): Adjust length of portable runtime and PIC indirect calls. (pa_output_indirect_call): Remove unnecessary nop from portable runtime and PIC call sequences. Use ldo instead of blr to set return register in PIC call sequence. From-SVN: r207120
This commit is contained in:
parent
1674321ac2
commit
cc5cec1053
|
@ -1,3 +1,11 @@
|
|||
2014-01-26 John David Anglin <danglin@gcc.gnu.org>
|
||||
|
||||
* config/pa/pa.c (pa_attr_length_indirect_call): Adjust length of
|
||||
portable runtime and PIC indirect calls.
|
||||
(pa_output_indirect_call): Remove unnecessary nop from portable runtime
|
||||
and PIC call sequences. Use ldo instead of blr to set return register
|
||||
in PIC call sequence.
|
||||
|
||||
2014-01-25 Walter Lee <walt@tilera.com>
|
||||
|
||||
* config/tilegx/sync.md (atomic_fetch_sub): Fix negation and
|
||||
|
|
|
@ -8106,10 +8106,10 @@ pa_attr_length_indirect_call (rtx insn)
|
|||
return 8;
|
||||
|
||||
if (flag_pic)
|
||||
return 24;
|
||||
return 20;
|
||||
|
||||
if (TARGET_PORTABLE_RUNTIME)
|
||||
return 20;
|
||||
return 16;
|
||||
|
||||
/* Out of reach, can use ble. */
|
||||
return 12;
|
||||
|
@ -8154,28 +8154,28 @@ pa_output_indirect_call (rtx insn, rtx call_dest)
|
|||
return ".CALL\tARGW0=GR\n\tldil L'$$dyncall,%%r2\n\tble R'$$dyncall(%%sr4,%%r2)\n\tcopy %%r31,%%r2";
|
||||
|
||||
/* Long millicode call for portable runtime. */
|
||||
if (pa_attr_length_indirect_call (insn) == 20)
|
||||
return "ldil L'$$dyncall,%%r31\n\tldo R'$$dyncall(%%r31),%%r31\n\tblr %%r0,%%r2\n\tbv,n %%r0(%%r31)\n\tnop";
|
||||
if (pa_attr_length_indirect_call (insn) == 16)
|
||||
return "ldil L'$$dyncall,%%r31\n\tldo R'$$dyncall(%%r31),%%r31\n\tblr %%r0,%%r2\n\tbv,n %%r0(%%r31)";
|
||||
|
||||
/* We need a long PIC call to $$dyncall. */
|
||||
xoperands[0] = NULL_RTX;
|
||||
output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands);
|
||||
output_asm_insn ("{bl|b,l} .+8,%%r2", xoperands);
|
||||
if (TARGET_SOM || !TARGET_GAS)
|
||||
{
|
||||
xoperands[0] = gen_label_rtx ();
|
||||
output_asm_insn ("addil L'$$dyncall-%0,%%r1", xoperands);
|
||||
output_asm_insn ("addil L'$$dyncall-%0,%%r2", xoperands);
|
||||
targetm.asm_out.internal_label (asm_out_file, "L",
|
||||
CODE_LABEL_NUMBER (xoperands[0]));
|
||||
output_asm_insn ("ldo R'$$dyncall-%0(%%r1),%%r1", xoperands);
|
||||
}
|
||||
else
|
||||
{
|
||||
output_asm_insn ("addil L'$$dyncall-$PIC_pcrel$0+4,%%r1", xoperands);
|
||||
output_asm_insn ("addil L'$$dyncall-$PIC_pcrel$0+4,%%r2", 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);
|
||||
output_asm_insn ("bv %%r0(%%r1)", xoperands);
|
||||
output_asm_insn ("ldo 12(%%r2),%%r2", xoperands);
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue