Define x86 CALL_USED_REGISTERS_MASK
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Oct 2015 13:47:12 +0000 (13:47 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Oct 2015 13:47:12 +0000 (13:47 +0000)
Define x86 CALL_USED_REGISTERS_MASK used on x86 CALL_USED_REGISTERS.

* config/i386/i386.c (ix86_conditional_register_usage): Use
CALL_USED_REGISTERS_MASK.
* config/i386/i386.h (CALL_USED_REGISTERS_MASK): New macro.

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

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h

index 7d57879..ea7d416 100644 (file)
@@ -1,5 +1,11 @@
 2015-10-07  H.J. Lu  <hongjiu.lu@intel.com>
 
+       * config/i386/i386.c (ix86_conditional_register_usage): Use
+       CALL_USED_REGISTERS_MASK.
+       * config/i386/i386.h (CALL_USED_REGISTERS_MASK): New macro.
+
+2015-10-07  H.J. Lu  <hongjiu.lu@intel.com>
+
        PR bootstrap/67385
        * configure.ac (gcc_cv_readelf): Check $READELF_FOR_TARGET.
        * configure: Regenerated.
index c44f0af..c5ebff5 100644 (file)
@@ -5583,9 +5583,7 @@ ix86_conditional_register_usage (void)
     }
 
   /*  See the definition of CALL_USED_REGISTERS in i386.h.  */
-  c_mask = (TARGET_64BIT_MS_ABI ? (1 << 3)
-           : TARGET_64BIT ? (1 << 2)
-           : (1 << 1));
+  c_mask = CALL_USED_REGISTERS_MASK (TARGET_64BIT_MS_ABI);
   
   CLEAR_HARD_REG_SET (reg_class_contents[(int)CLOBBERED_REGS]);
 
index a24dea5..ad17460 100644 (file)
@@ -1018,6 +1018,9 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 
    Proper values are computed in TARGET_CONDITIONAL_REGISTER_USAGE.  */
 
+#define CALL_USED_REGISTERS_MASK(IS_64BIT_MS_ABI) \
+  ((IS_64BIT_MS_ABI) ? (1 << 3) : TARGET_64BIT ? (1 << 2) : (1 << 1))
+
 #define CALL_USED_REGISTERS                                    \
 /*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7*/     \
 {  1, 1, 1, 0, 4, 4, 0, 1, 1,  1,  1,  1,  1,  1,  1,  1,      \