summaryrefslogtreecommitdiff
path: root/gcc/config/s390/predicates.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/s390/predicates.md')
-rw-r--r--gcc/config/s390/predicates.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/config/s390/predicates.md b/gcc/config/s390/predicates.md
index 9ba85bf387c..d5e185d5ac7 100644
--- a/gcc/config/s390/predicates.md
+++ b/gcc/config/s390/predicates.md
@@ -101,6 +101,10 @@
return true;
})
+(define_predicate "nonzero_shift_count_operand"
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (INTVAL (op), 1, GET_MODE_BITSIZE (mode) - 1)")))
+
;; Return true if OP a valid operand for the LARL instruction.
(define_predicate "larl_operand"
@@ -154,6 +158,12 @@
return false;
})
+(define_predicate "contiguous_bitmask_operand"
+ (match_code "const_int")
+{
+ return s390_contiguous_bitmask_p (INTVAL (op), GET_MODE_BITSIZE (mode), NULL, NULL);
+})
+
;; operators --------------------------------------------------------------
;; Return nonzero if OP is a valid comparison operator