This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"Patch Mini" for -mdynamic-no-pic on 64-bit Darwin


This is a small tweak sufficient to make Darwin's dynamic-no-pic
mode work in 64-bit land, in conjunction with various fixes to
ld64. Pretty obvious, same change is in fully dynamic case (and
could be merged together during the next Stage 1).

Stan

2005-01-11 Stan Shebs <shebs@apple.com>

       * config/rs6000/rs6000.c (machopic_output_stub): Issue
       ldu instead of lwzu if 64-bit -mdynamic-no-pic.

Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.773
diff -p -r1.773 rs6000.c
*** config/rs6000/rs6000.c      7 Jan 2005 15:30:13 -0000       1.773
--- config/rs6000/rs6000.c      11 Jan 2005 20:17:56 -0000
*************** machopic_output_stub (FILE *file, const
*** 17611,17617 ****
       fprintf (file, "\t.indirect_symbol %s\n", symbol_name);

       fprintf (file, "\tlis r11,ha16(%s)\n", lazy_ptr_name);
!       fprintf (file, "\tlwzu r12,lo16(%s)(r11)\n", lazy_ptr_name);
       fprintf (file, "\tmtctr r12\n");
       fprintf (file, "\tbctr\n");
     }
--- 17611,17619 ----
       fprintf (file, "\t.indirect_symbol %s\n", symbol_name);

       fprintf (file, "\tlis r11,ha16(%s)\n", lazy_ptr_name);
!       fprintf (file, "\t%s r12,lo16(%s)(r11)\n",
!              (TARGET_64BIT ? "ldu" : "lwzu"),
!              lazy_ptr_name);
       fprintf (file, "\tmtctr r12\n");
       fprintf (file, "\tbctr\n");
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]