From 265b1d82bf8873b177f849d79509a90b3e753dc3 Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Tue, 3 May 2011 16:50:30 +0000 Subject: [PATCH] 2011-05-03 Stuart Henderson From Bernd Schmidt: * config/bfin/bfin.md (MOVCC): New mode_macro. (movcc_insn1, movcc_insn2, movcc): Renamed from movsicc_insn1, movsicc_insn2 and movsicc and macroized. Remove comments from generated assembly. From-SVN: r173330 --- gcc/ChangeLog | 8 +++++++ gcc/config/bfin/bfin.md | 46 +++++++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8124e2289d7..76908e52813 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-05-03 Stuart Henderson + + From Bernd Schmidt: + * config/bfin/bfin.md (MOVCC): New mode_macro. + (movcc_insn1, movcc_insn2, movcc): Renamed from + movsicc_insn1, movsicc_insn2 and movsicc and macroized. Remove + comments from generated assembly. + 2011-05-03 Stuart Henderson From Bernd Schmidt diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index 6f2c7a6ee04..c4722d4b132 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -415,44 +415,46 @@ ;; Conditional moves -(define_expand "movsicc" - [(set (match_operand:SI 0 "register_operand" "") - (if_then_else:SI (match_operand 1 "comparison_operator" "") - (match_operand:SI 2 "register_operand" "") - (match_operand:SI 3 "register_operand" "")))] +(define_mode_iterator CCMOV [QI HI SI]) + +(define_expand "movcc" + [(set (match_operand:CCMOV 0 "register_operand" "") + (if_then_else:CCMOV (match_operand 1 "comparison_operator" "") + (match_operand:CCMOV 2 "register_operand" "") + (match_operand:CCMOV 3 "register_operand" "")))] "" { - operands[1] = bfin_gen_compare (operands[1], SImode); + operands[1] = bfin_gen_compare (operands[1], mode); }) -(define_insn "*movsicc_insn1" - [(set (match_operand:SI 0 "register_operand" "=da,da,da") - (if_then_else:SI +(define_insn "*movcc_insn1" + [(set (match_operand:CCMOV 0 "register_operand" "=da,da,da") + (if_then_else:CCMOV (eq:BI (match_operand:BI 3 "register_operand" "C,C,C") (const_int 0)) - (match_operand:SI 1 "register_operand" "da,0,da") - (match_operand:SI 2 "register_operand" "0,da,da")))] + (match_operand:CCMOV 1 "register_operand" "da,0,da") + (match_operand:CCMOV 2 "register_operand" "0,da,da")))] "" "@ - if !cc %0 =%1; /* movsicc-1a */ - if cc %0 =%2; /* movsicc-1b */ - if !cc %0 =%1; if cc %0=%2; /* movsicc-1 */" + if !cc %0 = %1; + if cc %0 = %2; + if !cc %0 = %1; if cc %0 = %2;" [(set_attr "length" "2,2,4") (set_attr "type" "movcc") (set_attr "seq_insns" "*,*,multi")]) -(define_insn "*movsicc_insn2" - [(set (match_operand:SI 0 "register_operand" "=da,da,da") - (if_then_else:SI +(define_insn "*movcc_insn2" + [(set (match_operand:CCMOV 0 "register_operand" "=da,da,da") + (if_then_else:CCMOV (ne:BI (match_operand:BI 3 "register_operand" "C,C,C") (const_int 0)) - (match_operand:SI 1 "register_operand" "0,da,da") - (match_operand:SI 2 "register_operand" "da,0,da")))] + (match_operand:CCMOV 1 "register_operand" "0,da,da") + (match_operand:CCMOV 2 "register_operand" "da,0,da")))] "" "@ - if !cc %0 =%2; /* movsicc-2b */ - if cc %0 =%1; /* movsicc-2a */ - if cc %0 =%1; if !cc %0=%2; /* movsicc-1 */" + if !cc %0 = %2; + if cc %0 = %1; + if cc %0 = %1; if !cc %0 = %2;" [(set_attr "length" "2,2,4") (set_attr "type" "movcc") (set_attr "seq_insns" "*,*,multi")]) -- 2.30.2