OSDN Git Service

(output_function_prologue): Use m68k svr4 PIC format to
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Mar 1993 18:10:41 +0000 (18:10 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Mar 1993 18:10:41 +0000 (18:10 +0000)
load the address of _GLOBAL_OFFSET_TABLE_ into PIC_OFFSET_TABLE_REG
in function prologue when doing PIC.

(print_operand_address): Always add "@GOT" suffix for the
global object operand when doing PIC.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3595 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/m68k/m68k.c

index c7f3dc1..a5d210c 100644 (file)
@@ -216,10 +216,7 @@ output_function_prologue (stream, size)
   if (flag_pic && current_function_uses_pic_offset_table)
     {
 #ifdef MOTOROLA
-      asm_fprintf (stream, "\t%Omove.l %0I__GLOBAL_OFFSET_TABLE_, %s\n",
-                  reg_names[PIC_OFFSET_TABLE_REGNUM]);
-      asm_fprintf (stream, "\tlea.l (%Rpc,%s.l),%s\n",
-                  reg_names[PIC_OFFSET_TABLE_REGNUM],
+      asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
                   reg_names[PIC_OFFSET_TABLE_REGNUM]);
 #else
       asm_fprintf (stream, "\tmovel %0I__GLOBAL_OFFSET_TABLE_, %s\n",
@@ -1873,10 +1870,8 @@ print_operand_address (file, addr)
            if (addr != 0)
              {
                output_addr_const (file, addr);
-               if ((flag_pic == 1) && (breg == pic_offset_table_rtx))
-                 fprintf (file, ".w");
-               if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
-                 fprintf (file, ".l");
+               if (flag_pic && (breg == pic_offset_table_rtx))
+                 fprintf (file, "@GOT");
              }
            fprintf (file, "(%s", reg_names[REGNO (breg)]);
            if (ireg != 0)