aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/constraints.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/avr/constraints.md')
-rw-r--r--gcc/config/avr/constraints.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/avr/constraints.md b/gcc/config/avr/constraints.md
index d26bff3ca19..50aae32b01a 100644
--- a/gcc/config/avr/constraints.md
+++ b/gcc/config/avr/constraints.md
@@ -103,6 +103,11 @@
(and (match_code "mem")
(match_test "extra_constraint_Q (op)")))
+(define_constraint "Cm2"
+ "Constant integer @minus{}2."
+ (and (match_code "const_int")
+ (match_test "ival == -2")))
+
(define_constraint "C03"
"Constant integer 3."
(and (match_code "const_int")
@@ -133,6 +138,11 @@
(and (match_code "const_int")
(match_test "avr_popcount_each_byte (op, 2, (1<<0) | (1<<7) | (1<<8))")))
+(define_constraint "Ca3"
+ "Constant 3-byte integer that allows AND without clobber register."
+ (and (match_code "const_int")
+ (match_test "avr_popcount_each_byte (op, 3, (1<<0) | (1<<7) | (1<<8))")))
+
(define_constraint "Ca4"
"Constant 4-byte integer that allows AND without clobber register."
(and (match_code "const_int")
@@ -143,6 +153,11 @@
(and (match_code "const_int")
(match_test "avr_popcount_each_byte (op, 2, (1<<0) | (1<<1) | (1<<8))")))
+(define_constraint "Co3"
+ "Constant 3-byte integer that allows OR without clobber register."
+ (and (match_code "const_int")
+ (match_test "avr_popcount_each_byte (op, 3, (1<<0) | (1<<1) | (1<<8))")))
+
(define_constraint "Co4"
"Constant 4-byte integer that allows OR without clobber register."
(and (match_code "const_int")
@@ -153,6 +168,11 @@
(and (match_code "const_int")
(match_test "avr_popcount_each_byte (op, 2, (1<<0) | (1<<8))")))
+(define_constraint "Cx3"
+ "Constant 3-byte integer that allows XOR without clobber register."
+ (and (match_code "const_int")
+ (match_test "avr_popcount_each_byte (op, 3, (1<<0) | (1<<8))")))
+
(define_constraint "Cx4"
"Constant 4-byte integer that allows XOR without clobber register."
(and (match_code "const_int")