pa.h (TARGET_LONG_PIC_SDIFF_CALL): Conditionalize define on TARGET_HPUX.
* pa.h (TARGET_LONG_PIC_SDIFF_CALL): Conditionalize define on TARGET_HPUX. Revise comment. (TARGET_LONG_PIC_PCREL_CALL): Revise comment. * pa.c (output_call): Update for revised TARGET_LONG_PIC_SDIFF_CALL. Use sr4 variant of `be' instruction when not generating PIC code. (attr_length_call): Adjust for above change. From-SVN: r133123
This commit is contained in:
parent
76a7d3ca51
commit
9dbd54bebb
|
@ -1,3 +1,12 @@
|
||||||
|
2008-03-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||||
|
|
||||||
|
* pa.h (TARGET_LONG_PIC_SDIFF_CALL): Conditionalize define on
|
||||||
|
TARGET_HPUX. Revise comment.
|
||||||
|
(TARGET_LONG_PIC_PCREL_CALL): Revise comment.
|
||||||
|
* pa.c (output_call): Update for revised TARGET_LONG_PIC_SDIFF_CALL.
|
||||||
|
Use sr4 variant of `be' instruction when not generating PIC code.
|
||||||
|
(attr_length_call): Adjust for above change.
|
||||||
|
|
||||||
2008-03-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
|
2008-03-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
|
||||||
|
|
||||||
* ipa-reference.c (static_execute): Remove module_statics_const and
|
* ipa-reference.c (static_execute): Remove module_statics_const and
|
||||||
|
|
|
@ -7417,14 +7417,13 @@ attr_length_call (rtx insn, int sibcall)
|
||||||
length += 12;
|
length += 12;
|
||||||
|
|
||||||
/* long pc-relative branch sequence. */
|
/* long pc-relative branch sequence. */
|
||||||
else if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL)
|
else if (TARGET_LONG_PIC_SDIFF_CALL
|
||||||
|| (TARGET_64BIT && !TARGET_GAS)
|
|
||||||
|| (TARGET_GAS && !TARGET_SOM
|
|| (TARGET_GAS && !TARGET_SOM
|
||||||
&& (TARGET_LONG_PIC_PCREL_CALL || local_call)))
|
&& (TARGET_LONG_PIC_PCREL_CALL || local_call)))
|
||||||
{
|
{
|
||||||
length += 20;
|
length += 20;
|
||||||
|
|
||||||
if (!TARGET_PA_20 && !TARGET_NO_SPACE_REGS)
|
if (!TARGET_PA_20 && !TARGET_NO_SPACE_REGS && flag_pic)
|
||||||
length += 8;
|
length += 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7444,7 +7443,7 @@ attr_length_call (rtx insn, int sibcall)
|
||||||
if (!sibcall)
|
if (!sibcall)
|
||||||
length += 8;
|
length += 8;
|
||||||
|
|
||||||
if (!TARGET_NO_SPACE_REGS)
|
if (!TARGET_NO_SPACE_REGS && flag_pic)
|
||||||
length += 8;
|
length += 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7528,7 +7527,7 @@ output_call (rtx insn, rtx call_dest, int sibcall)
|
||||||
of increasing length and complexity. In most cases,
|
of increasing length and complexity. In most cases,
|
||||||
they don't allow an instruction in the delay slot. */
|
they don't allow an instruction in the delay slot. */
|
||||||
if (!((TARGET_LONG_ABS_CALL || local_call) && !flag_pic)
|
if (!((TARGET_LONG_ABS_CALL || local_call) && !flag_pic)
|
||||||
&& !(TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL)
|
&& !TARGET_LONG_PIC_SDIFF_CALL
|
||||||
&& !(TARGET_GAS && !TARGET_SOM
|
&& !(TARGET_GAS && !TARGET_SOM
|
||||||
&& (TARGET_LONG_PIC_PCREL_CALL || local_call))
|
&& (TARGET_LONG_PIC_PCREL_CALL || local_call))
|
||||||
&& !TARGET_64BIT)
|
&& !TARGET_64BIT)
|
||||||
|
@ -7574,13 +7573,12 @@ output_call (rtx insn, rtx call_dest, int sibcall)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL)
|
if (TARGET_LONG_PIC_SDIFF_CALL)
|
||||||
|| (TARGET_64BIT && !TARGET_GAS))
|
|
||||||
{
|
{
|
||||||
/* The HP assembler and linker can handle relocations
|
/* The HP assembler and linker can handle relocations
|
||||||
for the difference of two symbols. GAS and the HP
|
for the difference of two symbols. The HP assembler
|
||||||
linker can't do this when one of the symbols is
|
recognizes the sequence as a pc-relative call and
|
||||||
external. */
|
the linker provides stubs when needed. */
|
||||||
xoperands[1] = gen_label_rtx ();
|
xoperands[1] = gen_label_rtx ();
|
||||||
output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands);
|
output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands);
|
||||||
output_asm_insn ("addil L'%0-%l1,%%r1", xoperands);
|
output_asm_insn ("addil L'%0-%l1,%%r1", xoperands);
|
||||||
|
@ -7665,20 +7663,20 @@ output_call (rtx insn, rtx call_dest, int sibcall)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!TARGET_NO_SPACE_REGS)
|
if (!TARGET_NO_SPACE_REGS && flag_pic)
|
||||||
output_asm_insn ("ldsid (%%r1),%%r31\n\tmtsp %%r31,%%sr0",
|
output_asm_insn ("ldsid (%%r1),%%r31\n\tmtsp %%r31,%%sr0",
|
||||||
xoperands);
|
xoperands);
|
||||||
|
|
||||||
if (sibcall)
|
if (sibcall)
|
||||||
{
|
{
|
||||||
if (TARGET_NO_SPACE_REGS)
|
if (TARGET_NO_SPACE_REGS || !flag_pic)
|
||||||
output_asm_insn ("be 0(%%sr4,%%r1)", xoperands);
|
output_asm_insn ("be 0(%%sr4,%%r1)", xoperands);
|
||||||
else
|
else
|
||||||
output_asm_insn ("be 0(%%sr0,%%r1)", xoperands);
|
output_asm_insn ("be 0(%%sr0,%%r1)", xoperands);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (TARGET_NO_SPACE_REGS)
|
if (TARGET_NO_SPACE_REGS || !flag_pic)
|
||||||
output_asm_insn ("ble 0(%%sr4,%%r1)", xoperands);
|
output_asm_insn ("ble 0(%%sr4,%%r1)", xoperands);
|
||||||
else
|
else
|
||||||
output_asm_insn ("ble 0(%%sr0,%%r1)", xoperands);
|
output_asm_insn ("ble 0(%%sr0,%%r1)", xoperands);
|
||||||
|
|
|
@ -101,17 +101,18 @@ extern int flag_pa_unix;
|
||||||
calls. They are used only in non-pic code. */
|
calls. They are used only in non-pic code. */
|
||||||
#define TARGET_LONG_ABS_CALL (TARGET_SOM && !TARGET_GAS)
|
#define TARGET_LONG_ABS_CALL (TARGET_SOM && !TARGET_GAS)
|
||||||
|
|
||||||
/* Define to a C expression evaluating to true to use long pic symbol
|
/* Define to a C expression evaluating to true to use long PIC symbol
|
||||||
difference calls. This is a call variant similar to the long pic
|
difference calls. Long PIC symbol difference calls are only used with
|
||||||
pc-relative call. Long pic symbol difference calls are only used with
|
the HP assembler and linker. The HP assembler detects this instruction
|
||||||
the HP SOM linker. Currently, only the HP assembler supports these
|
sequence and treats it as long pc-relative call. Currently, GAS only
|
||||||
calls. GAS doesn't allow an arbitrary difference of two symbols. */
|
allows a difference of two symbols in the same subspace, and it doesn't
|
||||||
#define TARGET_LONG_PIC_SDIFF_CALL (!TARGET_GAS)
|
detect the sequence as a pc-relative call. */
|
||||||
|
#define TARGET_LONG_PIC_SDIFF_CALL (!TARGET_GAS && TARGET_HPUX)
|
||||||
|
|
||||||
/* Define to a C expression evaluating to true to use long pic
|
/* Define to a C expression evaluating to true to use long PIC
|
||||||
pc-relative calls. Long pic pc-relative calls are only used with
|
pc-relative calls. Long PIC pc-relative calls are only used with
|
||||||
GAS. Currently, they are usable for calls within a module but
|
GAS. Currently, they are usable for calls which bind local to a
|
||||||
not for external calls. */
|
module but not for external calls. */
|
||||||
#define TARGET_LONG_PIC_PCREL_CALL 0
|
#define TARGET_LONG_PIC_PCREL_CALL 0
|
||||||
|
|
||||||
/* Define to a C expression evaluating to true to use SOM secondary
|
/* Define to a C expression evaluating to true to use SOM secondary
|
||||||
|
|
Loading…
Reference in New Issue