From 868e82ab1fa87c6801acb82b0fb4e079e4e25356 Mon Sep 17 00:00:00 2001 From: Gavin Koch Date: Wed, 3 Dec 1997 16:47:25 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 8 ++++++++ gcc/config/mips/mips.md | 30 +++++++++++++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 580a64f635f..8f9f3245604 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Wed Dec 3 11:41:13 1997 Gavin Koch + + * 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 * stmt.c (expand_decl_cleanup): Update thisblock after eh_region_start. diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 9c6852fc007..dcd82fde571 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -1111,10 +1111,10 @@ "TARGET_64BIT" " { - if (mips_cpu != PROCESSOR_R4000) - emit_insn (gen_muldi3_internal (operands[0], operands[1], operands[2])); + if (GENERATE_MULT3 || mips_cpu == PROCESSOR_R4000) + emit_insn (gen_muldi3_internal2 (operands[0], operands[1], operands[2])); else - emit_insn (gen_muldi3_r4000 (operands[0], operands[1], operands[2])); + emit_insn (gen_muldi3_internal (operands[0], operands[1], operands[2])); DONE; }") @@ -1135,28 +1135,36 @@ (set_attr "mode" "DI") (set_attr "length" "1")]) -(define_insn "muldi3_r4000" +(define_insn "muldi3_internal2" [(set (match_operand:DI 0 "register_operand" "=d") (mult:DI (match_operand:DI 1 "se_register_operand" "d") (match_operand:DI 2 "register_operand" "d"))) (clobber (match_scratch:DI 3 "=h")) (clobber (match_scratch:DI 4 "=l")) (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[1] = gen_rtx (REG, DImode, LO_REGNUM); + xoperands[0] = operands[0]; + xoperands[1] = gen_rtx (REG, DImode, LO_REGNUM); - output_asm_insn (\"dmult\\t%1,%2\", operands); - output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands); + output_asm_insn (\"dmult\\t%1,%2\", operands); + output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands); + } return \"\"; }" [(set_attr "type" "imul") (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. -- 2.30.2