Modified: trunk/gcc-3.4/gcc/config/bfin/bfin.h (1609 => 1610)
--- trunk/gcc-3.4/gcc/config/bfin/bfin.h 2007-04-29 11:43:28 UTC (rev 1609)
+++ trunk/gcc-3.4/gcc/config/bfin/bfin.h 2007-04-30 09:04:52 UTC (rev 1610)
@@ -1192,6 +1192,7 @@
{CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, LABEL_REF}}, \
{"scale_by_operand", {CONST_INT}}, \
{"pos_scale_operand", {CONST_INT}}, \
+ {"reg_or_const_int_operand", {SUBREG, REG, ADDRESSOF, CONST_INT}}, \
{"positive_immediate_operand", {CONST_INT}}, \
{"reg_or_7bit_operand", {CONST_INT, SUBREG, REG, ADDRESSOF}}, \
{"reg_or_neg7bit_operand", {CONST_INT, SUBREG, REG, ADDRESSOF}}, \
Modified: trunk/gcc-3.4/gcc/config/bfin/bfin.md (1609 => 1610)
--- trunk/gcc-3.4/gcc/config/bfin/bfin.md 2007-04-29 11:43:28 UTC (rev 1609)
+++ trunk/gcc-3.4/gcc/config/bfin/bfin.md 2007-04-30 09:04:52 UTC (rev 1610)
@@ -2132,70 +2132,6 @@
operands[1], const0_rtx);
})
-;; Same as above, but and CC with the overflow bit generated by the first
-;; multiplication.
-(define_insn "flag_mul_macv2hi_parts_acconly_andcc0"
- [(set (match_operand:PDI 0 "register_operand" "=B,e,e")
- (unspec:PDI [(vec_select:HI
- (match_operand:V2HI 2 "register_operand" "d,d,d")
- (parallel [(match_operand 4 "const01_operand" "P0P1,P0P1,P0P1")]))
- (vec_select:HI
- (match_operand:V2HI 3 "register_operand" "d,d,d")
- (parallel [(match_operand 6 "const01_operand" "P0P1,P0P1,P0P1")]))
- (match_operand 10 "const_int_operand" "PB,PA,PA")]
- UNSPEC_MUL_WITH_FLAG))
- (set (match_operand:PDI 1 "register_operand" "=B,e,e")
- (unspec:PDI [(vec_select:HI
- (match_dup 2)
- (parallel [(match_operand 5 "const01_operand" "P0P1,P0P1,P0P1")]))
- (vec_select:HI
- (match_dup 3)
- (parallel [(match_operand 7 "const01_operand" "P0P1,P0P1,P0P1")]))
- (match_operand:PDI 8 "register_operand" "1,1,1")
- (match_operand 9 "const01_operand" "P0P1,P0P1,P0P1")
- (match_operand 11 "const_int_operand" "PA,PB,PA")]
- UNSPEC_MAC_WITH_FLAG))
- (set (reg:BI REG_CC)
- (and:BI (reg:BI REG_CC)
- (unspec:BI [(vec_select:HI (match_dup 2) (parallel [(match_dup 4)]))
- (vec_select:HI (match_dup 3) (parallel [(match_dup 6)]))
- (match_dup 10)]
- UNSPEC_MUL_WITH_FLAG)))]
- "MACFLAGS_MATCH_P (INTVAL (operands[10]), INTVAL (operands[11]))"
-{
- rtx xops[6];
- const char *templates[] = {
- "%0 = %h2 * %h3, %1 %b4 %h2 * %h3 %M5;\n\tCC &= %v0;",
- "%0 = %d2 * %h3, %1 %b4 %h2 * %h3 %M5;\n\tCC &= %v0;",
- "%0 = %h2 * %h3, %1 %b4 %d2 * %h3 %M5;\n\tCC &= %v0;",
- "%0 = %d2 * %h3, %1 %b4 %d2 * %h3 %M5;\n\tCC &= %v0;",
- "%0 = %h2 * %d3, %1 %b4 %h2 * %h3 %M5;\n\tCC &= %v0;",
- "%0 = %d2 * %d3, %1 %b4 %h2 * %h3 %M5;\n\tCC &= %v0;",
- "%0 = %h2 * %d3, %1 %b4 %d2 * %h3 %M5;\n\tCC &= %v0;",
- "%0 = %d2 * %d3, %1 %b4 %d2 * %h3 %M5;\n\tCC &= %v0;",
- "%0 = %h2 * %h3, %1 %b4 %h2 * %d3 %M5;\n\tCC &= %v0;",
- "%0 = %d2 * %h3, %1 %b4 %h2 * %d3 %M5;\n\tCC &= %v0;",
- "%0 = %h2 * %h3, %1 %b4 %d2 * %d3 %M5;\n\tCC &= %v0;",
- "%0 = %d2 * %h3, %1 %b4 %d2 * %d3 %M5;\n\tCC &= %v0;",
- "%0 = %h2 * %d3, %1 %b4 %h2 * %d3 %M5;\n\tCC &= %v0;",
- "%0 = %d2 * %d3, %1 %b4 %h2 * %d3 %M5;\n\tCC &= %v0;",
- "%0 = %h2 * %d3, %1 %b4 %d2 * %d3 %M5;\n\tCC &= %v0;",
- "%0 = %d2 * %d3, %1 %b4 %d2 * %d3 %M5;\n\tCC &= %v0;" };
- int alt = (INTVAL (operands[4]) + (INTVAL (operands[5]) << 1)
- + (INTVAL (operands[6]) << 2) + (INTVAL (operands[7]) << 3));
- xops[0] = operands[0];
- xops[1] = operands[1];
- xops[2] = operands[2];
- xops[3] = operands[3];
- xops[4] = operands[9];
- xops[5] = which_alternative == 0 ? operands[10] : operands[11];
- output_asm_insn (templates[alt], xops);
- return "";
-}
- [(set_attr "type" "misc")
- (set_attr "length" "6")
- (set_attr "seq_insns" "multi")])
-
(define_expand "bge"
[(set (match_dup 1) (match_dup 2))
(set (pc)
@@ -3334,6 +3270,68 @@
}
[(set_attr "type" "dsp32")])
+;; Same as above, but and CC with the overflow bit generated by the first
+;; multiplication.
+(define_insn "flag_mul_macv2hi_parts_acconly_andcc0"
+ [(set (match_operand:PDI 0 "register_operand" "=B,e,e")
+ (unspec:PDI [(vec_select:HI
+ (match_operand:V2HI 2 "register_operand" "d,d,d")
+ (parallel [(match_operand 4 "const01_operand" "P0P1,P0P1,P0P1")]))
+ (vec_select:HI
+ (match_operand:V2HI 3 "register_operand" "d,d,d")
+ (parallel [(match_operand 6 "const01_operand" "P0P1,P0P1,P0P1")]))
+ (match_operand 10 "const_int_operand" "PB,PA,PA")]
+ UNSPEC_MUL_WITH_FLAG))
+ (set (match_operand:PDI 1 "register_operand" "=B,e,e")
+ (unspec:PDI [(vec_select:HI
+ (match_dup 2)
+ (parallel [(match_operand 5 "const01_operand" "P0P1,P0P1,P0P1")]))
+ (vec_select:HI
+ (match_dup 3)
+ (parallel [(match_operand 7 "const01_operand" "P0P1,P0P1,P0P1")]))
+ (match_operand:PDI 8 "register_operand" "1,1,1")
+ (match_operand 9 "const01_operand" "P0P1,P0P1,P0P1")
+ (match_operand 11 "const_int_operand" "PA,PB,PA")]
+ UNSPEC_MAC_WITH_FLAG))
+ (set (reg:BI REG_CC)
+ (and:BI (reg:BI REG_CC)
+ (unspec:BI [(vec_select:HI (match_dup 2) (parallel [(match_dup 4)]))
+ (vec_select:HI (match_dup 3) (parallel [(match_dup 6)]))
+ (match_dup 10)]
+ UNSPEC_MUL_WITH_FLAG)))]
+ "MACFLAGS_MATCH_P (INTVAL (operands[10]), INTVAL (operands[11]))"
+{
+ rtx xops[6];
+ const char *templates[] = {
+ "%0 = %h2 * %h3, %1 %b4 %h2 * %h3 %M5;\n\tCC &= %v0;",
+ "%0 = %d2 * %h3, %1 %b4 %h2 * %h3 %M5;\n\tCC &= %v0;",
+ "%0 = %h2 * %h3, %1 %b4 %d2 * %h3 %M5;\n\tCC &= %v0;",
+ "%0 = %d2 * %h3, %1 %b4 %d2 * %h3 %M5;\n\tCC &= %v0;",
+ "%0 = %h2 * %d3, %1 %b4 %h2 * %h3 %M5;\n\tCC &= %v0;",
+ "%0 = %d2 * %d3, %1 %b4 %h2 * %h3 %M5;\n\tCC &= %v0;",
+ "%0 = %h2 * %d3, %1 %b4 %d2 * %h3 %M5;\n\tCC &= %v0;",
+ "%0 = %d2 * %d3, %1 %b4 %d2 * %h3 %M5;\n\tCC &= %v0;",
+ "%0 = %h2 * %h3, %1 %b4 %h2 * %d3 %M5;\n\tCC &= %v0;",
+ "%0 = %d2 * %h3, %1 %b4 %h2 * %d3 %M5;\n\tCC &= %v0;",
+ "%0 = %h2 * %h3, %1 %b4 %d2 * %d3 %M5;\n\tCC &= %v0;",
+ "%0 = %d2 * %h3, %1 %b4 %d2 * %d3 %M5;\n\tCC &= %v0;",
+ "%0 = %h2 * %d3, %1 %b4 %h2 * %d3 %M5;\n\tCC &= %v0;",
+ "%0 = %d2 * %d3, %1 %b4 %h2 * %d3 %M5;\n\tCC &= %v0;",
+ "%0 = %h2 * %d3, %1 %b4 %d2 * %d3 %M5;\n\tCC &= %v0;",
+ "%0 = %d2 * %d3, %1 %b4 %d2 * %d3 %M5;\n\tCC &= %v0;" };
+ int alt = (INTVAL (operands[4]) + (INTVAL (operands[5]) << 1)
+ + (INTVAL (operands[6]) << 2) + (INTVAL (operands[7]) << 3));
+ xops[0] = operands[0];
+ xops[1] = operands[1];
+ xops[2] = operands[2];
+ xops[3] = operands[3];
+ xops[4] = operands[9];
+ xops[5] = which_alternative == 0 ? operands[10] : operands[11];
+ output_asm_insn (templates[alt], xops);
+ return "";
+}
+ [(set_attr "type" "misc")
+ (set_attr "length" "6")])
(define_insn "mulhisi_ll"
[(set (match_operand:SI 0 "register_operand" "=d")