OSDN Git Service

* config/mips/mips.md: Add imadd type. Update scheduler description
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jul 2002 08:56:20 +0000 (08:56 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jul 2002 08:56:20 +0000 (08:56 +0000)
to use imadd as well as imul.
(*mul_acc_si, *madsi): Change imul alternatives to imadd.
(*mul_acc_di, *mul_acc_64bit_di): Likewise.
(*mul_sub_si): Likewise for first alternative.  Change second
alternative from imul to multi.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55321 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mips/mips.md

index 5b8a058..be542f1 100644 (file)
@@ -1,3 +1,12 @@
+2002-07-08  Richard Sandiford  <rsandifo@redhat.com>
+
+       * config/mips/mips.md: Add imadd type.  Update scheduler description
+       to use imadd as well as imul.
+       (*mul_acc_si, *madsi): Change imul alternatives to imadd.
+       (*mul_acc_di, *mul_acc_64bit_di): Likewise.
+       (*mul_sub_si): Likewise for first alternative.  Change second
+       alternative from imul to multi.
+
 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
 
        * c-common.c (c_common_post_options): Update prototype;
index 46c6737..1205e52 100644 (file)
@@ -68,6 +68,7 @@
 ;; arith       integer arithmetic instruction
 ;; darith      double precision integer arithmetic instructions
 ;; imul                integer multiply
+;; imadd       integer multiply-add
 ;; idiv                integer divide
 ;; icmp                integer compare
 ;; fadd                floating point add/subtract
@@ -83,7 +84,7 @@
 ;; nop         no operation
 
 (define_attr "type"
-  "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,multi,nop"
+  "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,imadd,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,multi,nop"
   (const_string "unknown"))
 
 ;; Main data type used by the insn
   1 3)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul")
+  (and (eq_attr "type" "imul,imadd")
        (eq_attr "cpu" "!r3000,r3900,r4000,r4600,r4650,r4100,r4300,r5000"))
   17 17)
 
   1 5)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul") (eq_attr "cpu" "r3000,r3900"))
+  (and (eq_attr "type" "imul,imadd") (eq_attr "cpu" "r3000,r3900"))
   12 12)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul") (eq_attr "cpu" "r4000,r4600"))
+  (and (eq_attr "type" "imul,imadd") (eq_attr "cpu" "r4000,r4600"))
   10 10)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul") (eq_attr "cpu" "r4650"))
+  (and (eq_attr "type" "imul,imadd") (eq_attr "cpu" "r4650"))
   4 4)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul")
+  (and (eq_attr "type" "imul,imadd")
        (and (eq_attr "mode" "SI") (eq_attr "cpu" "r4100")))
   1 1)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul")
+  (and (eq_attr "type" "imul,imadd")
        (and (eq_attr "mode" "DI") (eq_attr "cpu" "r4100")))
   4 4)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul")
+  (and (eq_attr "type" "imul,imadd")
        (and (eq_attr "mode" "SI") (eq_attr "cpu" "r4300,r5000")))
   5 5)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul")
+  (and (eq_attr "type" "imul,imadd")
        (and (eq_attr "mode" "DI") (eq_attr "cpu" "r4300")))
   8 8)
 
 (define_function_unit "imuldiv"  1 0
-  (and (eq_attr "type" "imul")
+  (and (eq_attr "type" "imul,imadd")
        (and (eq_attr "mode" "DI") (eq_attr "cpu" "r5000")))
   9 9)
 
     return \"#\";
   return madd[which_alternative];
 }"
-  [(set_attr "type"    "imul,imul,multi")
+  [(set_attr "type"    "imadd,imadd,multi")
    (set_attr "mode"    "SI")
    (set_attr "length"  "4,4,8")])
 
     return \"#\";
   return \"msub\\t%2,%3\";
 }"
-  [(set_attr "type"     "imul,imul,multi")
+  [(set_attr "type"     "imadd,multi,multi")
    (set_attr "mode"     "SI")
    (set_attr "length"   "4,8,8")])
 
    (clobber (match_scratch:SI 4 "=a"))]
   "TARGET_MAD"
   "mad\\t%1,%2"
-  [(set_attr "type"    "imul")
+  [(set_attr "type"    "imadd")
    (set_attr "mode"    "SI")])
 
 (define_insn "*mul_acc_di"
   else
     return \"madu\\t%1,%2\";
 }"
-  [(set_attr "type"    "imul")
+  [(set_attr "type"    "imadd")
    (set_attr "mode"    "SI")])
 
 (define_insn "*mul_acc_64bit_di"
   else
     return \"madu\\t%1,%2\";
 }"
-  [(set_attr "type"    "imul")
+  [(set_attr "type"    "imadd")
    (set_attr "mode"    "SI")])
 
 ;; Floating point multiply accumulate instructions.