+2013-02-27 Edgar E. Iglesias <edgar.iglesias@gmail.com>
+
+ * config/microblaze/microblaze.c (microblaze_emit_compare):
+ Use xor for EQ/NE comparisions
+ * config/microblaze/microblaze.md (cstoresf4): Add constraints
+ (cbranchsf4): Adjust operator to comparison_operator
+
2013-02-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56461
if (code == EQ || code == NE)
{
- if (TARGET_PATTERN_COMPARE && GET_CODE(cmp_op1) == REG)
- {
- if (code == EQ)
- {
- emit_insn (gen_seq_internal_pat (comp_reg, cmp_op0, cmp_op1));
- *cmp_code = NE;
- }
- else
- {
- emit_insn (gen_sne_internal_pat (comp_reg, cmp_op0, cmp_op1));
- }
- }
- else
- /* Use xor for equal/not-equal comparison. */
- emit_insn (gen_xorsi3 (comp_reg, cmp_op0, cmp_op1));
+ /* Use xor for equal/not-equal comparison. */
+ emit_insn (gen_xorsi3 (comp_reg, cmp_op0, cmp_op1));
}
else if (code == GT || code == GTU || code == LE || code == LEU)
{
;; Setting a register from an floating point comparison.
;;----------------------------------------------------------------
(define_insn "cstoresf4"
- [(set (match_operand:SI 0 "register_operand")
- (match_operator:SI 1 "ordered_comparison_operator"
- [(match_operand:SF 2 "register_operand")
- (match_operand:SF 3 "register_operand")]))]
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (match_operator 1 "comparison_operator"
+ [(match_operand:SF 2 "register_operand" "r")
+ (match_operand:SF 3 "register_operand" "r")]))]
"TARGET_HARD_FLOAT"
"fcmp.%C1\t%0,%3,%2"
[(set_attr "type" "fcmp")
(define_expand "cbranchsf4"
[(set (pc)
- (if_then_else (match_operator:SI 0 "ordered_comparison_operator"
+ (if_then_else (match_operator 0 "comparison_operator"
[(match_operand:SF 1 "register_operand")
(match_operand:SF 2 "register_operand")])
(label_ref (match_operand 3 ""))