;; Predicate definitions for Vitesse IQ2000.
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007 Free Software Foundation, Inc.
;;
;; This file is part of GCC.
;;
;; GCC is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; GCC is distributed in the hope that it will be useful,
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
-;; along with GCC; see the file COPYING. If not, write to
-;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
-;; Return 1 if OP can be used as an operand where a register or 16 bit
+;; Return 1 if OP can be used as an operand where a register or 16-bit
;; unsigned integer is needed.
(define_predicate "uns_arith_operand"
return register_operand (op, mode);
})
-;; Return 1 if OP can be used as an operand where a 16 bit integer is
+;; Return 1 if OP can be used as an operand where a 16-bit integer is
;; needed.
(define_predicate "arith_operand"
return register_operand (op, mode);
})
+;; Return 1 if OP is a register or a constant. gen_int_relational
+;; takes care of forcing out-of-range constants into a register.
+
+(define_predicate "reg_or_const_operand"
+ (ior (match_code "const_int")
+ (and (match_code "reg,subreg")
+ (match_operand 0 "register_operand"))))
+
;; Return 1 if OP is a integer which fits in 16 bits.
(define_predicate "small_int"
return (GET_CODE (op) == CONST_INT && SMALL_INT (op));
})
-;; Return 1 if OP is a 32 bit integer which is too big to be loaded
+;; Return 1 if OP is a 32-bit integer which is too big to be loaded
;; with one instruction.
(define_predicate "large_int"