]> gcc.gnu.org Git - gcc.git/commitdiff
pa.c (pa_attr_length_indirect_call): Adjust length of portable runtime and PIC indire...
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 26 Jan 2014 16:07:28 +0000 (16:07 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 26 Jan 2014 16:07:28 +0000 (16:07 +0000)
* config/pa/pa.c (pa_attr_length_indirect_call): Adjust length of
portable runtime and PIC indirect calls.
(pa_output_indirect_call): Remove unnecessary nop from portable runtime
and PIC call sequences.  Use ldo instead of blr to set return register
in PIC call sequence.

From-SVN: r207120

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

index ccbea0f715876b5a001b4e37d3a29ba0404fa9f2..460af5b2ea544960c3edc9cfc387e82910529a70 100644 (file)
@@ -1,3 +1,11 @@
+2014-01-26  John David Anglin  <danglin@gcc.gnu.org>
+
+       * config/pa/pa.c (pa_attr_length_indirect_call): Adjust length of
+       portable runtime and PIC indirect calls.
+       (pa_output_indirect_call): Remove unnecessary nop from portable runtime
+       and PIC call sequences.  Use ldo instead of blr to set return register
+       in PIC call sequence.
+
 2014-01-25  Walter Lee  <walt@tilera.com>
 
        * config/tilegx/sync.md (atomic_fetch_sub): Fix negation and
index d17a1af43c40dea7749a5118b592fef26e679d5d..c5f87eab5d21a7b38b6f3fc12514ac42cb898280 100644 (file)
@@ -8106,10 +8106,10 @@ pa_attr_length_indirect_call (rtx insn)
     return 8;
 
   if (flag_pic)
-    return 24;
+    return 20;
 
   if (TARGET_PORTABLE_RUNTIME)
-    return 20;
+    return 16;
 
   /* Out of reach, can use ble.  */
   return 12;
@@ -8154,28 +8154,28 @@ pa_output_indirect_call (rtx insn, rtx call_dest)
     return ".CALL\tARGW0=GR\n\tldil L'$$dyncall,%%r2\n\tble R'$$dyncall(%%sr4,%%r2)\n\tcopy %%r31,%%r2";
 
   /* Long millicode call for portable runtime.  */
-  if (pa_attr_length_indirect_call (insn) == 20)
-    return "ldil L'$$dyncall,%%r31\n\tldo R'$$dyncall(%%r31),%%r31\n\tblr %%r0,%%r2\n\tbv,n %%r0(%%r31)\n\tnop";
+  if (pa_attr_length_indirect_call (insn) == 16)
+    return "ldil L'$$dyncall,%%r31\n\tldo R'$$dyncall(%%r31),%%r31\n\tblr %%r0,%%r2\n\tbv,n %%r0(%%r31)";
 
   /* We need a long PIC call to $$dyncall.  */
   xoperands[0] = NULL_RTX;
-  output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands);
+  output_asm_insn ("{bl|b,l} .+8,%%r2", xoperands);
   if (TARGET_SOM || !TARGET_GAS)
     {
       xoperands[0] = gen_label_rtx ();
-      output_asm_insn ("addil L'$$dyncall-%0,%%r1", xoperands);
+      output_asm_insn ("addil L'$$dyncall-%0,%%r2", xoperands);
       targetm.asm_out.internal_label (asm_out_file, "L",
                                      CODE_LABEL_NUMBER (xoperands[0]));
       output_asm_insn ("ldo R'$$dyncall-%0(%%r1),%%r1", xoperands);
     }
   else
     {
-      output_asm_insn ("addil L'$$dyncall-$PIC_pcrel$0+4,%%r1", xoperands);
+      output_asm_insn ("addil L'$$dyncall-$PIC_pcrel$0+4,%%r2", xoperands);
       output_asm_insn ("ldo R'$$dyncall-$PIC_pcrel$0+8(%%r1),%%r1",
                       xoperands);
     }
-  output_asm_insn ("blr %%r0,%%r2", xoperands);
-  output_asm_insn ("bv,n %%r0(%%r1)\n\tnop", xoperands);
+  output_asm_insn ("bv %%r0(%%r1)", xoperands);
+  output_asm_insn ("ldo 12(%%r2),%%r2", xoperands);
   return "";
 }
 
This page took 0.080061 seconds and 5 git commands to generate.