Commit 314f9913 by Bernd Schmidt Committed by Bernd Schmidt

bfin.md (addpdi3, [...]): New patterns.

	* config/bfin/bfin.md (addpdi3, us_truncpdisi2): New patterns.
	(umulsi3_highpart): Use them.
	* config/bfin/lib1funcs.asm (__umulsi3_highpart): Use unsigned move
	for final accumulator to D regisster tranfser.

From-SVN: r124376
parent cb9ed5d7
2007-05-03 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.md (addpdi3, us_truncpdisi2): New patterns.
(umulsi3_highpart): Use them.
* config/bfin/lib1funcs.asm (__umulsi3_highpart): Use unsigned move
for final accumulator to D regisster tranfser.
2007-05-03 Dorit Nuzman <dorit@il.ibm.com> 2007-05-03 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/31699 PR tree-optimization/31699
......
...@@ -1227,6 +1227,14 @@ ...@@ -1227,6 +1227,14 @@
;; Accumulator addition ;; Accumulator addition
(define_insn "addpdi3"
[(set (match_operand:PDI 0 "register_operand" "=A")
(ss_plus:PDI (match_operand:PDI 1 "register_operand" "%0")
(match_operand:PDI 2 "nonmemory_operand" "B")))]
""
"A0 += A1%!"
[(set_attr "type" "dsp32")])
(define_insn "sum_of_accumulators" (define_insn "sum_of_accumulators"
[(set (match_operand:SI 0 "register_operand" "=d") [(set (match_operand:SI 0 "register_operand" "=d")
(ss_truncate:SI (ss_truncate:SI
...@@ -1238,6 +1246,13 @@ ...@@ -1238,6 +1246,13 @@
"%0 = (A0 += A1)%!" "%0 = (A0 += A1)%!"
[(set_attr "type" "dsp32")]) [(set_attr "type" "dsp32")])
(define_insn "us_truncpdisi2"
[(set (match_operand:SI 0 "register_operand" "=D,W")
(us_truncate:SI (match_operand:PDI 1 "register_operand" "A,B")))]
""
"%0 = %1 (FU)%!"
[(set_attr "type" "dsp32")])
;; Bit test instructions ;; Bit test instructions
(define_insn "*not_bittst" (define_insn "*not_bittst"
...@@ -1501,7 +1516,8 @@ ...@@ -1501,7 +1516,8 @@
const1_rtx, const0_rtx, const1_rtx, const0_rtx,
a1reg, const0_rtx, GEN_INT (MACFLAG_FU))); a1reg, const0_rtx, GEN_INT (MACFLAG_FU)));
emit_insn (gen_lshrpdi3 (a1reg, a1reg, GEN_INT (16))); emit_insn (gen_lshrpdi3 (a1reg, a1reg, GEN_INT (16)));
emit_insn (gen_sum_of_accumulators (operands[0], a0reg, a0reg, a1reg)); emit_insn (gen_addpdi3 (a0reg, a0reg, a1reg));
emit_insn (gen_us_truncpdisi2 (operands[0], a0reg));
} }
else else
{ {
......
...@@ -128,7 +128,8 @@ ___umulsi3_highpart: ...@@ -128,7 +128,8 @@ ___umulsi3_highpart:
A0 = R1.H * R0.H, A1 += R1.L * R0.H (FU); A0 = R1.H * R0.H, A1 += R1.L * R0.H (FU);
A1 += R0.L * R1.H (FU); A1 += R0.L * R1.H (FU);
A1 = A1 >> 16; A1 = A1 >> 16;
R0 = (A0 += A1); A0 += A1;
R0 = A0 (FU);
RTS; RTS;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment