summaryrefslogtreecommitdiff
path: root/gcc/config/mips/predicates.md
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-03 10:57:46 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-03 10:57:46 +0000
commit159b58ddeefa62da79bd458d8d606509b37a7d7b (patch)
tree30c34b02b14ff9991fdc56cb67585061e9dff779 /gcc/config/mips/predicates.md
parent578512b16c7b69545b35e7547f28d7deeaf798f5 (diff)
downloadgcc-159b58ddeefa62da79bd458d8d606509b37a7d7b.tar.gz
2012-01-03 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 182833 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@182834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips/predicates.md')
-rw-r--r--gcc/config/mips/predicates.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/config/mips/predicates.md b/gcc/config/mips/predicates.md
index 5e9398e69f3..b6113739786 100644
--- a/gcc/config/mips/predicates.md
+++ b/gcc/config/mips/predicates.md
@@ -73,8 +73,15 @@
;; This is used for indexing into vectors, and hence only accepts const_int.
(define_predicate "const_0_or_1_operand"
(and (match_code "const_int")
- (ior (match_test "op == CONST0_RTX (GET_MODE (op))")
- (match_test "op == CONST1_RTX (GET_MODE (op))"))))
+ (match_test "IN_RANGE (INTVAL (op), 0, 1)")))
+
+(define_predicate "const_2_or_3_operand"
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (INTVAL (op), 2, 3)")))
+
+(define_predicate "const_0_to_3_operand"
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (INTVAL (op), 0, 3)")))
(define_predicate "qi_mask_operand"
(and (match_code "const_int")