+2015-09-29 James Bowman <james.bowman@ftdichip.com>
+
+ * config/ft32/predicates.md (ft32_imm_operand): New predicate.
+ * config/ft32/ft32.md (movmemsi, setmemsi): Use ft32_imm_operand
+ predicate, disallow register for operand 2.
+
2015-09-29 Aditya Kumar <aditya.k7@samsung.com>
* graphite-dependences.c (scop_get_dependences): Moved in down
)
(define_insn "movmemsi"
- [(set (match_operand:BLK 0 "memory_operand" "=W,W,BW")
- (match_operand:BLK 1 "memory_operand" "W,W,BW"))
- (use (match_operand:SI 2 "ft32_rimm_operand" "r,KA,rKA"))
+ [(set (match_operand:BLK 0 "memory_operand" "=W,BW")
+ (match_operand:BLK 1 "memory_operand" "W,BW"))
+ (use (match_operand:SI 2 "ft32_imm_operand" "KA,KA"))
(use (match_operand:SI 3))
]
""
- "memcpy.%d3 %b0,%b1,%2 # %3!"
+ "memcpy.%d3 %b0,%b1,%2 "
)
(define_insn "setmemsi"
- [(set (match_operand:BLK 0 "memory_operand" "=BW,BW") (unspec:BLK [
- (use (match_operand:QI 2 "register_operand" "r,r"))
- (use (match_operand:SI 1 "ft32_rimm_operand" "r,KA"))
+ [(set (match_operand:BLK 0 "memory_operand" "=BW") (unspec:BLK [
+ (use (match_operand:QI 2 "register_operand" "r"))
+ (use (match_operand:SI 1 "ft32_imm_operand" "KA"))
] UNSPEC_SETMEM))
(use (match_operand:SI 3))
]
(and (match_code "const_int")
(match_test "IN_RANGE (INTVAL (op), -512, 511)"))))
+(define_predicate "ft32_imm_operand"
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (INTVAL (op), -512, 511)")))
+
(define_predicate "ft32_bwidth_operand"
(and (match_code "const_int")
(match_test "IN_RANGE (INTVAL (op), 1, 16)")))