summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-07 13:47:12 +0000
committerH.J. Lu <hjl.tools@gmail.com>2016-04-16 07:47:30 -0700
commit1a491570267ca590c0cd0d844ea5a5e5bd5f4bc2 (patch)
tree4d60624e52ecb74e3c578e9d0bcc1a41f3a2ba25
parent03a8ce01c6e530a02042d53d442a539aeeb86470 (diff)
downloadgcc-1a491570267ca590c0cd0d844ea5a5e5bd5f4bc2.tar.gz
Define x86 CALL_USED_REGISTERS_MASK
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
-rw-r--r--gcc/config/i386/i386.c4
-rw-r--r--gcc/config/i386/i386.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index f2d0e288aa5..97d964e7c53 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4531,9 +4531,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]);
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index f54cd2aa194..0d96c29b927 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1014,6 +1014,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, \