Use R15_REG for REAL_PIC_OFFSET_TABLE_REGNUM
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 27 Nov 2014 21:03:32 +0000 (21:03 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 27 Nov 2014 21:03:32 +0000 (13:03 -0800)
 PR target/63833
 * config/i386/i386.h (REAL_PIC_OFFSET_TABLE_REGNUM): Use
 R15_REG for 64-bit.
 * config/i386/rdos64.h (REAL_PIC_OFFSET_TABLE_REGNUM): Removed.

From-SVN: r218132

gcc/ChangeLog
gcc/config/i386/i386.h
gcc/config/i386/rdos64.h

index 262cc7482fdd72c11b5b040c55598395c3ffee24..05547424d8dc0626f2d24c0f1859ca09e37bf174 100644 (file)
@@ -1,3 +1,10 @@
+2014-11-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+        PR target/63833
+        * config/i386/i386.h (REAL_PIC_OFFSET_TABLE_REGNUM): Use
+        R15_REG for 64-bit.
+        * config/i386/rdos64.h (REAL_PIC_OFFSET_TABLE_REGNUM): Removed.
+
 2014-11-27  Martin Liska  <mliska@suse.cz>
            David Malcolm  <dmalcolm@redhat.com>
 
index 3f5f9794eb2c6fd184012de85cc3f2818f8c2ca0..bc766200df0caceb5d6b6dcb43750220d122747d 100644 (file)
@@ -1252,7 +1252,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
    the pic register when possible.  The change is visible after the
    prologue has been emitted.  */
 
-#define REAL_PIC_OFFSET_TABLE_REGNUM  BX_REG
+#define REAL_PIC_OFFSET_TABLE_REGNUM  (TARGET_64BIT ? R15_REG : BX_REG)
 
 #define PIC_OFFSET_TABLE_REGNUM                                                \
   ((TARGET_64BIT && (ix86_cmodel == CM_SMALL_PIC                       \
index e6f089a008c35bf71bffe1ca5d7a1d7e0394e00f..f902651039d833b3c223bb730c72cff6a26fc689 100644 (file)
@@ -17,8 +17,5 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#undef REAL_PIC_OFFSET_TABLE_REGNUM
-#define REAL_PIC_OFFSET_TABLE_REGNUM  R15_REG
-
 #undef DEFAULT_LARGE_SECTION_THRESHOLD
 #define DEFAULT_LARGE_SECTION_THRESHOLD 16