]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/62038 (Out of range branch target in thunk)
authorJohn David Anglin <danglin@gcc.gnu.org>
Mon, 11 Aug 2014 19:13:46 +0000 (19:13 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 11 Aug 2014 19:13:46 +0000 (19:13 +0000)
PR target/62038
* config/pa/pa.c (pa_asm_output_mi_thunk): Use a branch with %r31 link
register.

From-SVN: r213831

gcc/ChangeLog
gcc/config/pa/pa.c

index a7f5cbe955ab9e7522c80c3681310ffcf35a232c..88fc92a09e0756ec4c6a4f38938a4545702e6bfa 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-11  John Dave Anglin  <danglin@gcc.gnu.org>
+
+       PR target/62038
+       * config/pa/pa.c (pa_asm_output_mi_thunk): Use a branch with %r31 link
+       register.
+
 2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        Backport from mainline
index 7603858340d60cf9b9d77aaefd71f0377f72a492..de8b21854fceeadc2885266cc49073ccd2eacc45 100644 (file)
@@ -8311,7 +8311,9 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
       if (!val_14)
        output_asm_insn ("addil L'%2,%%r26", xoperands);
 
-      output_asm_insn ("b %0", xoperands);
+      /* An absolute branch without a link register is not considered
+        a call by GAS.  We need a call to get a stub if necessary.  */
+      output_asm_insn ("bl %0,%%r31", xoperands);
 
       if (val_14)
        {