This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed] Fix long local calls on PA HP-UX SOM target
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Mar 2007 19:23:40 -0400 (EDT)
- Subject: Re: [committed] Fix long local calls on PA HP-UX SOM target
> To fix this, we need to use the "LONG_PIC_SDIFF" sequence which uses
> a difference of labels. GAS does handle this correctly.
Sigh, I messed up on this one. GAS does *not* handle local calls using
this sequence.
Tested on hppa2.0w-hp-hpux11.11 and hppa-unknown-linux-gnu.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2007-03-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (attr_length_call): Partially revert change of 2007-03-09.
(output_call): Likewise.
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c (revision 122960)
+++ config/pa/pa.c (working copy)
@@ -7271,7 +7271,7 @@
length += 12;
/* long pc-relative branch sequence. */
- else if ((TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call))
+ else if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL)
|| (TARGET_64BIT && !TARGET_GAS)
|| (TARGET_GAS && !TARGET_SOM
&& (TARGET_LONG_PIC_PCREL_CALL || local_call)))
@@ -7384,7 +7384,7 @@
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 || local_call))
+ && !(TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL)
&& !(TARGET_GAS && !TARGET_SOM
&& (TARGET_LONG_PIC_PCREL_CALL || local_call))
&& !TARGET_64BIT)
@@ -7432,7 +7432,7 @@
}
else
{
- if ((TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call))
+ if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL)
|| (TARGET_64BIT && !TARGET_GAS))
{
/* The HP assembler and linker can handle relocations