This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed 3.3/3.4/3.5] Fix hppa PR target/16459
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Jul 2004 17:32:47 -0400 (EDT)
- Subject: [committed 3.3/3.4/3.5] Fix hppa PR target/16459
This fixes a problem calling the millicode routine $$dyncall when generating
PA 2.0 code and the branch distance exceeds that reachable with a 17-bit
offset.
Tested on hppa-unknown-linux-gnu on 3.4 and 3.5. Committed to 3.3/3.4/3.5.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2004-07-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/16459
* pa.c (output_indirect_call): Use %r2 as the link register when
calling $$dyncall with a pc-relative branch.
Index: config/pa/pa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.255
diff -u -3 -p -r1.255 pa.c
--- config/pa/pa.c 7 Jul 2004 19:24:34 -0000 1.255
+++ config/pa/pa.c 8 Jul 2004 21:24:23 -0000
@@ -7574,7 +7574,7 @@ output_indirect_call (rtx insn, rtx call
No need to check target flags as the length uniquely identifies
the remaining cases. */
if (attr_length_indirect_call (insn) == 8)
- return ".CALL\tARGW0=GR\n\t{bl|b,l} $$dyncall,%%r31\n\tcopy %%r31,%%r2";
+ return ".CALL\tARGW0=GR\n\t{bl|b,l} $$dyncall,%%r2\n\tcopy %%r2,%%r31";
/* Long millicode call, but we are not generating PIC or portable runtime
code. */