aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2004-07-10 20:15:44 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2004-07-10 20:15:44 +0000
commit2c774817bd0ad2c1b7ca16fd0310b567bab5b9c6 (patch)
tree8e482a3be3843bc6fe0e821fd9cd5229bbcc7637 /gcc
parent3326f4101aab4be3befedda3eb52a7d58746aa97 (diff)
downloadgcc-2c774817bd0ad2c1b7ca16fd0310b567bab5b9c6.zip
gcc-2c774817bd0ad2c1b7ca16fd0310b567bab5b9c6.tar.gz
gcc-2c774817bd0ad2c1b7ca16fd0310b567bab5b9c6.tar.bz2
pa.c (output_indirect_call): Only use %r2 as the link register in indirect calls with the long PA 2.0...
* pa.c (output_indirect_call): Only use %r2 as the link register in indirect calls with the long PA 2.0 pc-relative branch. From-SVN: r84471
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/pa.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3ce75e9..8089a55 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * pa.c (output_indirect_call): Only use %r2 as the link register in
+ indirect calls with the long PA 2.0 pc-relative branch.
+
2004-07-10 Daniel Jacobowitz <dan@debian.org>
* config/i386/i386.c (override_options): Pick a 64-bit CPU
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index da065ce..ee781af 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -7545,7 +7545,15 @@ output_indirect_call (rtx insn, rtx call_dest)
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,%%r2\n\tcopy %%r2,%%r31";
+ {
+ /* The HP linker substitutes a BLE for millicode calls using
+ the short PIC PCREL form. Thus, we must use %r31 as the
+ link register when generating PA 1.x code. */
+ if (TARGET_PA_20)
+ return ".CALL\tARGW0=GR\n\tb,l $$dyncall,%%r2\n\tcopy %%r2,%%r31";
+ else
+ return ".CALL\tARGW0=GR\n\tbl $$dyncall,%%r31\n\tcopy %%r31,%%r2";
+ }
/* Long millicode call, but we are not generating PIC or portable runtime
code. */