Commit 868e82ab by Gavin Koch Committed by Gavin Romig-Koch

mips.md (muldi3_r4000): Broaden the output template and attribute assignments to…

mips.md (muldi3_r4000): Broaden the output template and attribute assignments to handle three operand...

	* mips/mips.md (muldi3_r4000): Broaden the output template
	and attribute assignments to handle three operand dmult;
	rename to muldi3_internal2.
	(muldi3): Call the new muldi3_internal2 for R4000, and
	any GENERATE_MULT3 chip.

From-SVN: r16927
parent 716cc7f7
Wed Dec 3 11:41:13 1997 Gavin Koch <gavin@cygnus.com>
* mips/mips.md (muldi3_r4000): Broaden the output template
and attribute assignments to handle three operand dmult;
rename to muldi3_internal2.
(muldi3): Call the new muldi3_internal2 for R4000, and
any GENERATE_MULT3 chip.
Tue Dec 2 19:40:43 1997 Jason Merrill <jason@yorick.cygnus.com> Tue Dec 2 19:40:43 1997 Jason Merrill <jason@yorick.cygnus.com>
* stmt.c (expand_decl_cleanup): Update thisblock after eh_region_start. * stmt.c (expand_decl_cleanup): Update thisblock after eh_region_start.
......
...@@ -1111,10 +1111,10 @@ ...@@ -1111,10 +1111,10 @@
"TARGET_64BIT" "TARGET_64BIT"
" "
{ {
if (mips_cpu != PROCESSOR_R4000) if (GENERATE_MULT3 || mips_cpu == PROCESSOR_R4000)
emit_insn (gen_muldi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_muldi3_internal2 (operands[0], operands[1], operands[2]));
else else
emit_insn (gen_muldi3_r4000 (operands[0], operands[1], operands[2])); emit_insn (gen_muldi3_internal (operands[0], operands[1], operands[2]));
DONE; DONE;
}") }")
...@@ -1135,28 +1135,36 @@ ...@@ -1135,28 +1135,36 @@
(set_attr "mode" "DI") (set_attr "mode" "DI")
(set_attr "length" "1")]) (set_attr "length" "1")])
(define_insn "muldi3_r4000" (define_insn "muldi3_internal2"
[(set (match_operand:DI 0 "register_operand" "=d") [(set (match_operand:DI 0 "register_operand" "=d")
(mult:DI (match_operand:DI 1 "se_register_operand" "d") (mult:DI (match_operand:DI 1 "se_register_operand" "d")
(match_operand:DI 2 "register_operand" "d"))) (match_operand:DI 2 "register_operand" "d")))
(clobber (match_scratch:DI 3 "=h")) (clobber (match_scratch:DI 3 "=h"))
(clobber (match_scratch:DI 4 "=l")) (clobber (match_scratch:DI 4 "=l"))
(clobber (match_scratch:DI 5 "=a"))] (clobber (match_scratch:DI 5 "=a"))]
"TARGET_64BIT && mips_cpu == PROCESSOR_R4000" "TARGET_64BIT && (GENERATE_MULT3 || mips_cpu == PROCESSOR_R4000)"
"* "*
{ {
rtx xoperands[10]; if (GENERATE_MULT3)
output_asm_insn (\"dmult\\t%0,%1,%2\", operands);
else
{
rtx xoperands[10];
xoperands[0] = operands[0]; xoperands[0] = operands[0];
xoperands[1] = gen_rtx (REG, DImode, LO_REGNUM); xoperands[1] = gen_rtx (REG, DImode, LO_REGNUM);
output_asm_insn (\"dmult\\t%1,%2\", operands); output_asm_insn (\"dmult\\t%1,%2\", operands);
output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands); output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands);
}
return \"\"; return \"\";
}" }"
[(set_attr "type" "imul") [(set_attr "type" "imul")
(set_attr "mode" "DI") (set_attr "mode" "DI")
(set_attr "length" "3")]) ;; mult + mflo + delay (set (attr "length")
(if_then_else (ne (symbol_ref "GENERATE_MULT3") (const_int 0))
(const_int 1)
(const_int 3)))]) ;; mult + mflo + delay
;; ??? We could define a mulditi3 pattern when TARGET_64BIT. ;; ??? We could define a mulditi3 pattern when TARGET_64BIT.
......
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