OSDN Git Service

2005-08-10 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Aug 2005 17:53:52 +0000 (17:53 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Aug 2005 17:53:52 +0000 (17:53 +0000)
        * config/darwin.c (machopic_indirect_data_reference): Use a new register
        for the high part when generating dynamic-no-pic code.

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

gcc/ChangeLog
gcc/config/darwin.c

index 4de14de..6a6159b 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-10  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * config/darwin.c (machopic_indirect_data_reference): Use a new register
+       for the high part when generating dynamic-no-pic code.
+
 2005-08-10  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config.gcc (i[34567]86-*-linux*): Add i386/t-crtfm to tm-file.
index cac61e4..fd503ef 100644 (file)
@@ -419,8 +419,10 @@ machopic_indirect_data_reference (rtx orig, rtx reg)
       if (defined && MACHO_DYNAMIC_NO_PIC_P)
        {
 #if defined (TARGET_TOC)
-         emit_insn (gen_macho_high (reg, orig));
-         emit_insn (gen_macho_low (reg, reg, orig));
+         /* Create a new register for CSE opportunities.  */
+         rtx hi_reg = (no_new_pseudos ? reg : gen_reg_rtx (Pmode));
+         emit_insn (gen_macho_high (hi_reg, orig));
+         emit_insn (gen_macho_low (reg, hi_reg, orig));
 #else
           /* some other cpu -- writeme!  */
           gcc_unreachable ();