Commit 751d9855 by John David Anglin Committed by John David Anglin

pa.c (attr_length_call): Revise condition for long pc-relative branch.

	* pa.c (attr_length_call): Revise condition for long pc-relative branch.
	(output_call): Use "LONG_PIC_SDIFF" instruction sequence for long local
	calls on the SOM target.  Don't use "LONG_PIC_PCREL" call sequence on
	SOM target.

From-SVN: r122784
parent 48137d59
2007-03-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (attr_length_call): Revise condition for long pc-relative branch.
(output_call): Use "LONG_PIC_SDIFF" instruction sequence for long local
calls on the SOM target. Don't use "LONG_PIC_PCREL" call sequence on
SOM target.
2007-03-09 Geoffrey Keating <geoffk@apple.com> 2007-03-09 Geoffrey Keating <geoffk@apple.com>
* gcc.c: Document %{, in big comment at top. * gcc.c: Document %{, in big comment at top.
......
...@@ -7273,9 +7273,10 @@ attr_length_call (rtx insn, int sibcall) ...@@ -7273,9 +7273,10 @@ 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_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call))
|| (TARGET_64BIT && !TARGET_GAS) || (TARGET_64BIT && !TARGET_GAS)
|| (TARGET_GAS && (TARGET_LONG_PIC_PCREL_CALL || local_call))) || (TARGET_GAS && !TARGET_SOM
&& (TARGET_LONG_PIC_PCREL_CALL || local_call)))
{ {
length += 20; length += 20;
...@@ -7385,8 +7386,9 @@ output_call (rtx insn, rtx call_dest, int sibcall) ...@@ -7385,8 +7386,9 @@ 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_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call))
&& !(TARGET_GAS && (TARGET_LONG_PIC_PCREL_CALL || local_call)) && !(TARGET_GAS && !TARGET_SOM
&& (TARGET_LONG_PIC_PCREL_CALL || local_call))
&& !TARGET_64BIT) && !TARGET_64BIT)
indirect_call = 1; indirect_call = 1;
...@@ -7432,7 +7434,7 @@ output_call (rtx insn, rtx call_dest, int sibcall) ...@@ -7432,7 +7434,7 @@ output_call (rtx insn, rtx call_dest, int sibcall)
} }
else else
{ {
if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) if ((TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call))
|| (TARGET_64BIT && !TARGET_GAS)) || (TARGET_64BIT && !TARGET_GAS))
{ {
/* The HP assembler and linker can handle relocations /* The HP assembler and linker can handle relocations
...@@ -7446,7 +7448,8 @@ output_call (rtx insn, rtx call_dest, int sibcall) ...@@ -7446,7 +7448,8 @@ output_call (rtx insn, rtx call_dest, int sibcall)
CODE_LABEL_NUMBER (xoperands[1])); CODE_LABEL_NUMBER (xoperands[1]));
output_asm_insn ("ldo R'%0-%l1(%%r1),%%r1", xoperands); output_asm_insn ("ldo R'%0-%l1(%%r1),%%r1", xoperands);
} }
else if (TARGET_GAS && (TARGET_LONG_PIC_PCREL_CALL || local_call)) else if (TARGET_GAS && !TARGET_SOM
&& (TARGET_LONG_PIC_PCREL_CALL || local_call))
{ {
/* GAS currently can't generate the relocations that /* GAS currently can't generate the relocations that
are needed for the SOM linker under HP-UX using this are needed for the SOM linker under HP-UX using this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment