diff options
-rw-r--r-- | gcc/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 4 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 16 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 4 | ||||
-rw-r--r-- | gcc/config/i386/predicates.md | 4 | ||||
-rw-r--r-- | gcc/config/i386/sync.md | 4 | ||||
-rw-r--r-- | gcc/reg-stack.c | 2 |
7 files changed, 33 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index df571c8..1a822cb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,21 @@ +2012-08-25 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.h (FP_REG_P): Remove macro. + (FP_REGNO_P): Ditto. + (HARD_REGNO_NREGS): Use STACK_REGNO_P instead of FP_REGNO_P. + (HARD_REGNO_NREGS_HAS_PADDING): Ditto. + (ANY_FP_REGNO_P): Ditto. + (HARD_REGNO_RENAME_OK): Use STACK_REGNO_P. + * config/i386/i386.c (output_387_ffreep): Use STACK_REGNO_P + instead of FP_REGNO_P. + (ix86_hard_regno_mode_ok): Ditto. + * config/i386/predicates.md (fp_register_operand): Ditto. + (register_and_not_fp_reg_operand): Ditto. + * config/i386/sync.md (atomic_loaddi_fpu): Use STACK_REG_P instead + of FP_REG_P. + + * reg-stack.c (get_true_reg): Use STACK_REG_P instead of FP_REG_P. + 2012-08-24 Jason Merrill <jason@redhat.com> * print-tree.c (print_node): Don't check TREE_LANG_FLAG_* diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 72416c0..c7be001 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -15554,7 +15554,7 @@ output_387_ffreep (rtx *operands ATTRIBUTE_UNUSED, int opno) static char retval[32]; int regno = REGNO (operands[opno]); - gcc_assert (FP_REGNO_P (regno)); + gcc_assert (STACK_REGNO_P (regno)); regno -= FIRST_STACK_REG; @@ -32169,7 +32169,7 @@ ix86_hard_regno_mode_ok (int regno, enum machine_mode mode) || GET_MODE_CLASS (mode) == MODE_RANDOM || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT) return false; - if (FP_REGNO_P (regno)) + if (STACK_REGNO_P (regno)) return VALID_FP_MODE_P (mode); if (SSE_REGNO_P (regno)) { diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 3a41a43..53ca7a5 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1008,7 +1008,7 @@ enum target_cpu_default applied to them. */ #define HARD_REGNO_NREGS(REGNO, MODE) \ - (FP_REGNO_P (REGNO) || SSE_REGNO_P (REGNO) || MMX_REGNO_P (REGNO) \ + (STACK_REGNO_P (REGNO) || SSE_REGNO_P (REGNO) || MMX_REGNO_P (REGNO) \ ? (COMPLEX_MODE_P (MODE) ? 2 : 1) \ : ((MODE) == XFmode \ ? (TARGET_64BIT ? 2 : 3) \ @@ -1018,7 +1018,7 @@ enum target_cpu_default #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) \ ((TARGET_128BIT_LONG_DOUBLE && !TARGET_64BIT) \ - ? (FP_REGNO_P (REGNO) || SSE_REGNO_P (REGNO) || MMX_REGNO_P (REGNO) \ + ? (STACK_REGNO_P (REGNO) || SSE_REGNO_P (REGNO) || MMX_REGNO_P (REGNO) \ ? 0 \ : ((MODE) == XFmode || (MODE) == XCmode)) \ : 0) @@ -1337,11 +1337,11 @@ enum reg_class #define REX_INT_REGNO_P(N) \ IN_RANGE ((N), FIRST_REX_INT_REG, LAST_REX_INT_REG) -#define FP_REG_P(X) (REG_P (X) && FP_REGNO_P (REGNO (X))) -#define FP_REGNO_P(N) IN_RANGE ((N), FIRST_STACK_REG, LAST_STACK_REG) +#define STACK_REG_P(X) (REG_P (X) && STACK_REGNO_P (REGNO (X))) +#define STACK_REGNO_P(N) IN_RANGE ((N), FIRST_STACK_REG, LAST_STACK_REG) #define ANY_FP_REG_P(X) (REG_P (X) && ANY_FP_REGNO_P (REGNO (X))) -#define ANY_FP_REGNO_P(N) (FP_REGNO_P (N) || SSE_REGNO_P (N)) +#define ANY_FP_REGNO_P(N) (STACK_REGNO_P (N) || SSE_REGNO_P (N)) #define X87_FLOAT_MODE_P(MODE) \ (TARGET_80387 && ((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode)) @@ -1367,9 +1367,6 @@ enum reg_class #define MMX_REG_P(X) (REG_P (X) && MMX_REGNO_P (REGNO (X))) #define MMX_REGNO_P(N) IN_RANGE ((N), FIRST_MMX_REG, LAST_MMX_REG) -#define STACK_REG_P(X) (REG_P (X) && STACK_REGNO_P (REGNO (X))) -#define STACK_REGNO_P(N) IN_RANGE ((N), FIRST_STACK_REG, LAST_STACK_REG) - #define STACK_TOP_P(X) (REG_P (X) && REGNO (X) == FIRST_STACK_REG) #define CC_REG_P(X) (REG_P (X) && CC_REGNO_P (REGNO (X))) @@ -2204,8 +2201,7 @@ enum ix86_stack_slot ??? Maybe Pentium chips benefits from renaming, someone can try.... */ -#define HARD_REGNO_RENAME_OK(SRC, TARGET) \ - (! IN_RANGE ((SRC), FIRST_STACK_REG, LAST_STACK_REG)) +#define HARD_REGNO_RENAME_OK(SRC, TARGET) !STACK_REGNO_P (SRC) #define FASTCALL_PREFIX '@' diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 7756832..3300017 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -3388,7 +3388,7 @@ int r = REGNO (operands[0]); if ((SSE_REGNO_P (r) && !standard_sse_constant_p (c)) - || (FP_REGNO_P (r) && standard_80387_constant_p (c) < 1)) + || (STACK_REGNO_P (r) && standard_80387_constant_p (c) < 1)) FAIL; }) @@ -3406,7 +3406,7 @@ int r = REGNO (operands[0]); if ((SSE_REGNO_P (r) && !standard_sse_constant_p (c)) - || (FP_REGNO_P (r) && standard_80387_constant_p (c) < 1)) + || (STACK_REGNO_P (r) && standard_80387_constant_p (c) < 1)) FAIL; }) diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 3dbc6c0..43c15e4 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -26,7 +26,7 @@ ;; Return true if OP is an i387 fp register. (define_predicate "fp_register_operand" (and (match_code "reg") - (match_test "FP_REGNO_P (REGNO (op))"))) + (match_test "STACK_REGNO_P (REGNO (op))"))) ;; Return true if OP is a non-fp register_operand. (define_predicate "register_and_not_any_fp_reg_operand" @@ -36,7 +36,7 @@ ;; Return true if OP is a register operand other than an i387 fp register. (define_predicate "register_and_not_fp_reg_operand" (and (match_code "reg") - (not (match_test "FP_REGNO_P (REGNO (op))")))) + (not (match_test "STACK_REGNO_P (REGNO (op))")))) ;; True if the operand is an MMX register. (define_predicate "mmx_reg_operand" diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md index 95c130e..0b79bde 100644 --- a/gcc/config/i386/sync.md +++ b/gcc/config/i386/sync.md @@ -181,7 +181,7 @@ if (MEM_P (dst)) mem = dst; - if (FP_REG_P (tmp)) + if (STACK_REG_P (tmp)) { emit_insn (gen_loaddi_via_fpu (tmp, src)); emit_insn (gen_storedi_via_fpu (mem, tmp)); @@ -261,7 +261,7 @@ src = mem; } - if (FP_REG_P (tmp)) + if (STACK_REG_P (tmp)) { emit_insn (gen_loaddi_via_fpu (tmp, src)); emit_insn (gen_storedi_via_fpu (dst, tmp)); diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index dc7550a..7975865 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -413,7 +413,7 @@ get_true_reg (rtx *pat) actual FP register in use. */ { rtx subreg; - if (FP_REG_P (subreg = SUBREG_REG (*pat))) + if (STACK_REG_P (subreg = SUBREG_REG (*pat))) { int regno_off = subreg_regno_offset (REGNO (subreg), GET_MODE (subreg), |