reg-stack.c (replace_reg): Use IN_RANGE macro in gcc_assert().
* reg-stack.c (replace_reg): Use IN_RANGE macro in gcc_assert(). * config/i386/constraints.md (define_constraint "I"): Use IN_RANGE macro. (define_constraint "J"): Ditto. (define_constraint "K"): Ditto. (define_constraint "M"): Ditto. (define_constraint "N"): Ditto. (define_constraint "O"): Ditto. * config/i386/predicates.md (define_predicate "register_no_elim_operand"): Use IN_RANGE macro. (define_predicate "const_0_to_3_operand"): Ditto. (define_predicate "const_0_to_7_operand"): Ditto. (define_predicate "const_0_to_15_operand"): Ditto. (define_predicate "const_0_to_63_operand"): Ditto. (define_predicate "const_0_to_255_operand"): Ditto. (define_predicate "const_1_to_31_operand"): Ditto. (define_predicate "const_2_to_3_operand"): Ditto. (define_predicate "const_4_to_7_operand"): Ditto. From-SVN: r123210
This commit is contained in:
parent
04375334a4
commit
8dde5924c6
4 changed files with 38 additions and 18 deletions
|
@ -1,3 +1,24 @@
|
|||
2007-03-26 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* reg-stack.c (replace_reg): Use IN_RANGE macro in gcc_assert().
|
||||
* config/i386/constraints.md
|
||||
(define_constraint "I"): Use IN_RANGE macro.
|
||||
(define_constraint "J"): Ditto.
|
||||
(define_constraint "K"): Ditto.
|
||||
(define_constraint "M"): Ditto.
|
||||
(define_constraint "N"): Ditto.
|
||||
(define_constraint "O"): Ditto.
|
||||
* config/i386/predicates.md
|
||||
(define_predicate "register_no_elim_operand"): Use IN_RANGE macro.
|
||||
(define_predicate "const_0_to_3_operand"): Ditto.
|
||||
(define_predicate "const_0_to_7_operand"): Ditto.
|
||||
(define_predicate "const_0_to_15_operand"): Ditto.
|
||||
(define_predicate "const_0_to_63_operand"): Ditto.
|
||||
(define_predicate "const_0_to_255_operand"): Ditto.
|
||||
(define_predicate "const_1_to_31_operand"): Ditto.
|
||||
(define_predicate "const_2_to_3_operand"): Ditto.
|
||||
(define_predicate "const_4_to_7_operand"): Ditto.
|
||||
|
||||
2007-03-25 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_emit_prologue): Always clobber LR
|
||||
|
|
|
@ -103,17 +103,17 @@
|
|||
(define_constraint "I"
|
||||
"Integer constant in the range 0 @dots{} 31, for 32-bit shifts."
|
||||
(and (match_code "const_int")
|
||||
(match_test "ival >= 0 && ival <= 31")))
|
||||
(match_test "IN_RANGE (ival, 0, 31)")))
|
||||
|
||||
(define_constraint "J"
|
||||
"Integer constant in the range 0 @dots{} 63, for 64-bit shifts."
|
||||
(and (match_code "const_int")
|
||||
(match_test "ival >= 0 && ival <= 63")))
|
||||
(match_test "IN_RANGE (ival, 0, 63)")))
|
||||
|
||||
(define_constraint "K"
|
||||
"Signed 8-bit integer constant."
|
||||
(and (match_code "const_int")
|
||||
(match_test "ival >= -128 && ival <= 127")))
|
||||
(match_test "IN_RANGE (ival, -128, 127)")))
|
||||
|
||||
(define_constraint "L"
|
||||
"@code{0xFF} or @code{0xFFFF}, for andsi as a zero-extending move."
|
||||
|
@ -123,18 +123,18 @@
|
|||
(define_constraint "M"
|
||||
"0, 1, 2, or 3 (shifts for the @code{lea} instruction)."
|
||||
(and (match_code "const_int")
|
||||
(match_test "ival >= 0 && ival <= 3")))
|
||||
(match_test "IN_RANGE (ival, 0, 3)")))
|
||||
|
||||
(define_constraint "N"
|
||||
"Unsigned 8-bit integer constant (for @code{in} and @code{out}
|
||||
instructions)."
|
||||
(and (match_code "const_int")
|
||||
(match_test "ival >= 0 && ival <= 255")))
|
||||
(match_test "IN_RANGE (ival, 0, 255)")))
|
||||
|
||||
(define_constraint "O"
|
||||
"@internal Integer constant in the range 0 @dots{} 127, for 128-bit shifts."
|
||||
(and (match_code "const_int")
|
||||
(match_test "ival >= 0 && ival <= 127")))
|
||||
(match_test "IN_RANGE (ival, 0, 127)")))
|
||||
|
||||
;; Floating-point constant constraints.
|
||||
;; We allow constants even if TARGET_80387 isn't set, because the
|
||||
|
|
|
@ -497,8 +497,8 @@
|
|||
op = SUBREG_REG (op);
|
||||
return !(op == arg_pointer_rtx
|
||||
|| op == frame_pointer_rtx
|
||||
|| (REGNO (op) >= FIRST_PSEUDO_REGISTER
|
||||
&& REGNO (op) <= LAST_VIRTUAL_REGISTER));
|
||||
|| IN_RANGE (REGNO (op),
|
||||
FIRST_PSEUDO_REGISTER, LAST_VIRTUAL_REGISTER));
|
||||
})
|
||||
|
||||
;; Similarly, but include the stack pointer. This is used to prevent esp
|
||||
|
@ -572,27 +572,27 @@
|
|||
;; Match 0 to 3.
|
||||
(define_predicate "const_0_to_3_operand"
|
||||
(and (match_code "const_int")
|
||||
(match_test "INTVAL (op) >= 0 && INTVAL (op) <= 3")))
|
||||
(match_test "IN_RANGE (INTVAL (op), 0, 3)")))
|
||||
|
||||
;; Match 0 to 7.
|
||||
(define_predicate "const_0_to_7_operand"
|
||||
(and (match_code "const_int")
|
||||
(match_test "INTVAL (op) >= 0 && INTVAL (op) <= 7")))
|
||||
(match_test "IN_RANGE (INTVAL (op), 0, 7)")))
|
||||
|
||||
;; Match 0 to 15.
|
||||
(define_predicate "const_0_to_15_operand"
|
||||
(and (match_code "const_int")
|
||||
(match_test "INTVAL (op) >= 0 && INTVAL (op) <= 15")))
|
||||
(match_test "IN_RANGE (INTVAL (op), 0, 15)")))
|
||||
|
||||
;; Match 0 to 63.
|
||||
(define_predicate "const_0_to_63_operand"
|
||||
(and (match_code "const_int")
|
||||
(match_test "INTVAL (op) >= 0 && INTVAL (op) <= 63")))
|
||||
(match_test "IN_RANGE (INTVAL (op), 0, 63)")))
|
||||
|
||||
;; Match 0 to 255.
|
||||
(define_predicate "const_0_to_255_operand"
|
||||
(and (match_code "const_int")
|
||||
(match_test "INTVAL (op) >= 0 && INTVAL (op) <= 255")))
|
||||
(match_test "IN_RANGE (INTVAL (op), 0, 255)")))
|
||||
|
||||
;; Match (0 to 255) * 8
|
||||
(define_predicate "const_0_to_255_mul_8_operand"
|
||||
|
@ -606,17 +606,17 @@
|
|||
;; for shift & compare patterns, as shifting by 0 does not change flags).
|
||||
(define_predicate "const_1_to_31_operand"
|
||||
(and (match_code "const_int")
|
||||
(match_test "INTVAL (op) >= 1 && INTVAL (op) <= 31")))
|
||||
(match_test "IN_RANGE (INTVAL (op), 1, 31)")))
|
||||
|
||||
;; Match 2 or 3.
|
||||
(define_predicate "const_2_to_3_operand"
|
||||
(and (match_code "const_int")
|
||||
(match_test "INTVAL (op) == 2 || INTVAL (op) == 3")))
|
||||
(match_test "IN_RANGE (INTVAL (op), 2, 3)")))
|
||||
|
||||
;; Match 4 to 7.
|
||||
(define_predicate "const_4_to_7_operand"
|
||||
(and (match_code "const_int")
|
||||
(match_test "INTVAL (op) >= 4 && INTVAL (op) <= 7")))
|
||||
(match_test "IN_RANGE (INTVAL (op), 4, 7)")))
|
||||
|
||||
;; Match exactly one bit in 4-bit mask.
|
||||
(define_predicate "const_pow2_1_to_8_operand"
|
||||
|
|
|
@ -695,8 +695,7 @@ stack_result (tree decl)
|
|||
static void
|
||||
replace_reg (rtx *reg, int regno)
|
||||
{
|
||||
gcc_assert (regno >= FIRST_STACK_REG);
|
||||
gcc_assert (regno <= LAST_STACK_REG);
|
||||
gcc_assert (IN_RANGE (regno, FIRST_STACK_REG, LAST_STACK_REG));
|
||||
gcc_assert (STACK_REG_P (*reg));
|
||||
|
||||
gcc_assert (SCALAR_FLOAT_MODE_P (GET_MODE (*reg))
|
||||
|
|
Loading…
Add table
Reference in a new issue