From e8b5eb2553d71bb6820a7123544e179911bbd138 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 27 Nov 2014 21:03:32 +0000 Subject: [PATCH] Use R15_REG for REAL_PIC_OFFSET_TABLE_REGNUM 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 | 7 +++++++ gcc/config/i386/i386.h | 2 +- gcc/config/i386/rdos64.h | 3 --- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 262cc7482fd..05547424d8d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-11-27 H.J. Lu + + 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 David Malcolm diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 3f5f9794eb2..bc766200df0 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -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 \ diff --git a/gcc/config/i386/rdos64.h b/gcc/config/i386/rdos64.h index e6f089a008c..f902651039d 100644 --- a/gcc/config/i386/rdos64.h +++ b/gcc/config/i386/rdos64.h @@ -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 . */ -#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 -- 2.30.2