]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pa.c (output_millicode_call): Use $PIC_pcrel$0 for long PIC millicode calls when...
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fri, 7 Feb 2003 22:59:30 +0000 (22:59 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 7 Feb 2003 22:59:30 +0000 (22:59 +0000)
* pa.c (output_millicode_call): Use $PIC_pcrel$0 for long PIC
millicode calls when !TARGET_SOM and TARGET_GAS is true.
* pa.md (jump): Likewise.

From-SVN: r62556

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

index a458046d03b028499731b25dab7a9be30e2626f7..257001738cb34c807934fa23fa460ae658875948 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * pa.c (output_millicode_call): Use $PIC_pcrel$0 for long PIC
+       millicode calls when !TARGET_SOM and TARGET_GAS is true.
+       * pa.md (jump): Likewise.
+
 2003-02-06  Eric Botcazou <ebotcazou@libertysurf.fr>
             Richard Henderson <rth@redhat.com>
     
index 18c7fbdb278924cc9ca64dc6c22905c73f57c203..0e17b4e34a91ab22e876ad651005afaa554cdc60 100644 (file)
@@ -5926,10 +5926,19 @@ output_millicode_call (insn, call_dest)
          output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands);
 
          /* Add %r1 to the offset of our target from the next insn.  */
-         output_asm_insn ("addil L%%%0-%1,%%r1", xoperands);
-         ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
-                                    CODE_LABEL_NUMBER (xoperands[1]));
-         output_asm_insn ("ldo R%%%0-%1(%%r1),%%r1", xoperands);
+         if (TARGET_SOM || !TARGET_GAS)
+           {
+             output_asm_insn ("addil L%%%0-%1,%%r1", xoperands);
+             ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
+                                        CODE_LABEL_NUMBER (xoperands[1]));
+             output_asm_insn ("ldo R%%%0-%1(%%r1),%%r1", xoperands);
+           }
+         else
+           {
+             output_asm_insn ("addil L'%0-$PIC_pcrel$0+8,%%r1", xoperands);
+             output_asm_insn ("ldo R'%0-$PIC_pcrel$0+12(%%r1),%%r1",
+                              xoperands);
+           }
 
          /* Get the return address into %r31.  */
          output_asm_insn ("blr 0,%3", xoperands);
index e1a5364dd50b9f043704dd41db289aca69c142e1..df26bdfc14d0f1f7fdf587d6e4fcf48887f3ac9e 100644 (file)
       xoperands[0] = operands[0];
       xoperands[1] = gen_label_rtx ();
 
-      output_asm_insn (\"{bl|b,l} .+8,%%r1\\n\\taddil L'%l0-%l1,%%r1\",
-                      xoperands);
-      ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
-                                 CODE_LABEL_NUMBER (xoperands[1]));
-      output_asm_insn (\"ldo R'%l0-%l1(%%r1),%%r1\\n\\tbv %%r0(%%r1)\",
-                      xoperands);
+      if (TARGET_SOM || !TARGET_GAS)
+        {
+          output_asm_insn (\"{bl|b,l} .+8,%%r1\\n\\taddil L'%l0-%l1,%%r1\",
+                          xoperands);
+          ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
+                                    CODE_LABEL_NUMBER (xoperands[1]));
+          output_asm_insn (\"ldo R'%l0-%l1(%%r1),%%r1\\n\\tbv %%r0(%%r1)\",
+                          xoperands);
+       }
+      else
+        {
+         output_asm_insn (\"{bl|b,l} .+8,%%r1\", xoperands);
+         output_asm_insn (\"addil L'%l0-$PIC_pcrel$0+4,%%r1\", xoperands);
+         output_asm_insn (\"ldo R'%l0-$PIC_pcrel$0+8(%%r1),%%r1\", xoperands);
+       }
     }
   else
     output_asm_insn (\"ldil L'%l0,%%r1\\n\\tbe R'%l0(%%sr4,%%r1)\", operands);;