aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2002-07-08 08:56:20 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2002-07-08 08:56:20 +0000
commit1d4047e0380d0df08e9377878e430660557f9197 (patch)
treef43a9310c29d5d38750ace84bbb5d5a3ebd11dde /gcc
parent594bb0e78980cbb20cdeb028056a8f01be55b06f (diff)
downloadgcc-1d4047e0380d0df08e9377878e430660557f9197.zip
gcc-1d4047e0380d0df08e9377878e430660557f9197.tar.gz
gcc-1d4047e0380d0df08e9377878e430660557f9197.tar.bz2
mips.md: Add imadd type.
* 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. From-SVN: r55321
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/mips/mips.md31
2 files changed, 25 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5b8a058..be542f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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;
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 46c6737..1205e52 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -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
@@ -222,7 +223,7 @@
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)
@@ -237,39 +238,39 @@
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)
@@ -1868,7 +1869,7 @@
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")])
@@ -1932,7 +1933,7 @@
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")])
@@ -2241,7 +2242,7 @@
(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"
@@ -2262,7 +2263,7 @@
else
return \"madu\\t%1,%2\";
}"
- [(set_attr "type" "imul")
+ [(set_attr "type" "imadd")
(set_attr "mode" "SI")])
(define_insn "*mul_acc_64bit_di"
@@ -2284,7 +2285,7 @@
else
return \"madu\\t%1,%2\";
}"
- [(set_attr "type" "imul")
+ [(set_attr "type" "imadd")
(set_attr "mode" "SI")])
;; Floating point multiply accumulate instructions.