* config/epiphany/constraints.md (CnL): New constraint.
* config/epiphany/epiphany.md (addsi3_i): Add r/r/CnL alternative.
* config/epiphany/predicates.md (add_operand): Allow 1024.
From-SVN: r197588
* config/epiphany/epiphany.md (cmpsf_ord): Make pattern
unconditional.
+ * config/epiphany/constraints.md (CnL): New constraint.
+ * config/epiphany/epiphany.md (addsi3_i): Add r/r/CnL alternative.
+ * config/epiphany/predicates.md (add_operand): Allow 1024.
+
2013-04-08 Jakub Jelinek <jakub@redhat.com>
PR c++/34949
(and (match_code "const_int")
(match_test "SIMM11 (ival)")))
+(define_constraint "CnL"
+ "A negated signed 11-bit constant."
+ (and (match_code "const_int")
+ (match_test "SIMM11 (-ival)")))
+
(define_constraint "Cm1"
"A signed 11-bit constant added to -1"
(and (match_code "const_int")
DONE;
}")
+; The default case of epiphany_print_operand emits IMMEDIATE_PREFIX
+; where appropriate; however, 'n' is processed by output_asm_insn
+; which doesn't, so we have to explicitly emit the '# in the
+; r/r/CnL output template alternative.
(define_insn "addsi3_i"
- [(set (match_operand:SI 0 "add_reg_operand" "=r")
- (plus:SI (match_operand:SI 1 "add_reg_operand" "%r")
- (match_operand:SI 2 "add_operand" "rL")))
+ [(set (match_operand:SI 0 "add_reg_operand" "=r,r")
+ (plus:SI (match_operand:SI 1 "add_reg_operand" "%r,r")
+ (match_operand:SI 2 "add_operand" "rL,CnL")))
(clobber (reg:CC CC_REGNUM))]
""
- "add %0,%1,%2"
+ "@
+ add %0,%1,%2
+ sub %0,%1,#%n2"
[(set_attr "type" "misc")])
; We use a clobber of UNKNOWN_REGNUM here so that the peephole optimizers
{
if (GET_CODE (op) == REG || GET_CODE (op) == SUBREG)
return add_reg_operand (op, mode);
- return satisfies_constraint_L (op);
+ return satisfies_constraint_L (op) || satisfies_constraint_CnL (op);
})
;; Ordinary 3rd operand for arithmetic operations