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
3 changed files with 31 additions and 23 deletions
|
@ -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>
|
||||
|
||||
* ipa-reference.c (static_execute): Remove module_statics_const and
|
||||
|
|
|
@ -7417,14 +7417,13 @@ attr_length_call (rtx insn, int sibcall)
|
|||
length += 12;
|
||||
|
||||
/* long pc-relative branch sequence. */
|
||||
else if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL)
|
||||
|| (TARGET_64BIT && !TARGET_GAS)
|
||||
else if (TARGET_LONG_PIC_SDIFF_CALL
|
||||
|| (TARGET_GAS && !TARGET_SOM
|
||||
&& (TARGET_LONG_PIC_PCREL_CALL || local_call)))
|
||||
{
|
||||
length += 20;
|
||||
|
||||
if (!TARGET_PA_20 && !TARGET_NO_SPACE_REGS)
|
||||
if (!TARGET_PA_20 && !TARGET_NO_SPACE_REGS && flag_pic)
|
||||
length += 8;
|
||||
}
|
||||
|
||||
|
@ -7444,7 +7443,7 @@ attr_length_call (rtx insn, int sibcall)
|
|||
if (!sibcall)
|
||||
length += 8;
|
||||
|
||||
if (!TARGET_NO_SPACE_REGS)
|
||||
if (!TARGET_NO_SPACE_REGS && flag_pic)
|
||||
length += 8;
|
||||
}
|
||||
}
|
||||
|
@ -7528,7 +7527,7 @@ output_call (rtx insn, rtx call_dest, int sibcall)
|
|||
of increasing length and complexity. In most cases,
|
||||
they don't allow an instruction in the delay slot. */
|
||||
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_LONG_PIC_PCREL_CALL || local_call))
|
||||
&& !TARGET_64BIT)
|
||||
|
@ -7574,13 +7573,12 @@ output_call (rtx insn, rtx call_dest, int sibcall)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL)
|
||||
|| (TARGET_64BIT && !TARGET_GAS))
|
||||
if (TARGET_LONG_PIC_SDIFF_CALL)
|
||||
{
|
||||
/* The HP assembler and linker can handle relocations
|
||||
for the difference of two symbols. GAS and the HP
|
||||
linker can't do this when one of the symbols is
|
||||
external. */
|
||||
for the difference of two symbols. The HP assembler
|
||||
recognizes the sequence as a pc-relative call and
|
||||
the linker provides stubs when needed. */
|
||||
xoperands[1] = gen_label_rtx ();
|
||||
output_asm_insn ("{bl|b,l} .+8,%%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
|
||||
{
|
||||
if (!TARGET_NO_SPACE_REGS)
|
||||
if (!TARGET_NO_SPACE_REGS && flag_pic)
|
||||
output_asm_insn ("ldsid (%%r1),%%r31\n\tmtsp %%r31,%%sr0",
|
||||
xoperands);
|
||||
|
||||
if (sibcall)
|
||||
{
|
||||
if (TARGET_NO_SPACE_REGS)
|
||||
if (TARGET_NO_SPACE_REGS || !flag_pic)
|
||||
output_asm_insn ("be 0(%%sr4,%%r1)", xoperands);
|
||||
else
|
||||
output_asm_insn ("be 0(%%sr0,%%r1)", xoperands);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TARGET_NO_SPACE_REGS)
|
||||
if (TARGET_NO_SPACE_REGS || !flag_pic)
|
||||
output_asm_insn ("ble 0(%%sr4,%%r1)", xoperands);
|
||||
else
|
||||
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. */
|
||||
#define TARGET_LONG_ABS_CALL (TARGET_SOM && !TARGET_GAS)
|
||||
|
||||
/* 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
|
||||
pc-relative call. Long pic symbol difference calls are only used with
|
||||
the HP SOM linker. Currently, only the HP assembler supports these
|
||||
calls. GAS doesn't allow an arbitrary difference of two symbols. */
|
||||
#define TARGET_LONG_PIC_SDIFF_CALL (!TARGET_GAS)
|
||||
/* Define to a C expression evaluating to true to use long PIC symbol
|
||||
difference calls. Long PIC symbol difference calls are only used with
|
||||
the HP assembler and linker. The HP assembler detects this instruction
|
||||
sequence and treats it as long pc-relative call. Currently, GAS only
|
||||
allows a difference of two symbols in the same subspace, and it doesn't
|
||||
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
|
||||
pc-relative calls. Long pic pc-relative calls are only used with
|
||||
GAS. Currently, they are usable for calls within a module but
|
||||
not for external calls. */
|
||||
/* Define to a C expression evaluating to true to use long PIC
|
||||
pc-relative calls. Long PIC pc-relative calls are only used with
|
||||
GAS. Currently, they are usable for calls which bind local to a
|
||||
module but not for external calls. */
|
||||
#define TARGET_LONG_PIC_PCREL_CALL 0
|
||||
|
||||
/* Define to a C expression evaluating to true to use SOM secondary
|
||||
|
|
Loading…
Add table
Reference in a new issue