More MIPS vector cleanup work.
authorJames E Wilson <wilson@specifixinc.com>
Fri, 3 Sep 2004 20:12:29 +0000 (20:12 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 3 Sep 2004 20:12:29 +0000 (13:12 -0700)
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add __mips3d.
* config/mips/generic.md (generic_frecip_fsqrt_step): New.
* config/mips/mips-ps-3d.md (mips_rsqrt1_<fmt>): Use frsqrt1 type.
(mips_rsqrt2_<fmt>): Use frsqrt2 type.
(mips_recip1_<fmt>): Use frdiv1 type.
(mips_recip2_<fmt>): Use frdiv2 type.
* config/mips/mips.md (type): Add frdiv1, frdiv2, frsqrt1, frsqrt2.
* config/mips/sb1.md (ir_sb1_fpu_2pipes, ir_sb1_fpu_1pipe): Add frdiv1
and frsqrt1.
(ir_sb1_fpu_step2_2pipes, ir_sb1_fpu_step2_1pipe): New.

From-SVN: r87050

gcc/ChangeLog
gcc/config/mips/generic.md
gcc/config/mips/mips-ps-3d.md
gcc/config/mips/mips.h
gcc/config/mips/mips.md
gcc/config/mips/sb1.md

index c20d4a9b5d3456bc1dd74d00d55090f47a1efc9e..311f24c1fc1a71f9f0ceccff00b92ab69d1a766d 100644 (file)
@@ -1,3 +1,17 @@
+2004-09-03  James E Wilson  <wilson@specifixinc.com>
+
+       * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add __mips3d.
+
+       * config/mips/generic.md (generic_frecip_fsqrt_step): New.
+       * config/mips/mips-ps-3d.md (mips_rsqrt1_<fmt>): Use frsqrt1 type.
+       (mips_rsqrt2_<fmt>): Use frsqrt2 type.
+       (mips_recip1_<fmt>): Use frdiv1 type.
+       (mips_recip2_<fmt>): Use frdiv2 type.
+       * config/mips/mips.md (type): Add frdiv1, frdiv2, frsqrt1, frsqrt2.
+       * config/mips/sb1.md (ir_sb1_fpu_2pipes, ir_sb1_fpu_1pipe): Add frdiv1
+       and frsqrt1.
+       (ir_sb1_fpu_step2_2pipes, ir_sb1_fpu_step2_1pipe): New.
+
 2004-09-03  Daniel Jacobowitz  <dan@debian.org>
 
        * reload.c (find_reloads): Swap operand_loc pointers for
index 6ae56490965c117bac6f1e13f63400da1b12e1bb..237272eb8afee094ee165eae57a02a529f65a411 100644 (file)
   (and (eq_attr "type" "fsqrt,frsqrt")
        (eq_attr "mode" "DF"))
   "alu")
+
+(define_insn_reservation "generic_frecip_fsqrt_step" 5
+  (eq_attr "type" "frdiv1,frdiv2,frsqrt1,frsqrt2")
+  "alu")
index c2615619b057fc5bff47d737b2c83bf2ec6e9f02..766abdc3d649d39d54ff826bbf05fe19f95abd4d 100644 (file)
                     UNSPEC_RSQRT1))]
   "TARGET_MIPS3D"
   "rsqrt1.<fmt>\t%0,%1"
-  [(set_attr "type" "frsqrt")
+  [(set_attr "type" "frsqrt1")
    (set_attr "mode" "<UNITMODE>")])
 
 (define_insn "mips_rsqrt2_<fmt>"
                     UNSPEC_RSQRT2))]
   "TARGET_MIPS3D"
   "rsqrt2.<fmt>\t%0,%1,%2"
-  [(set_attr "type" "frsqrt")
+  [(set_attr "type" "frsqrt2")
    (set_attr "mode" "<UNITMODE>")])
 
 (define_insn "mips_recip1_<fmt>"
                     UNSPEC_RECIP1))]
   "TARGET_MIPS3D"
   "recip1.<fmt>\t%0,%1"
-  [(set_attr "type" "frdiv")
+  [(set_attr "type" "frdiv1")
    (set_attr "mode" "<UNITMODE>")])
 
 (define_insn "mips_recip2_<fmt>"
                     UNSPEC_RECIP2))]
   "TARGET_MIPS3D"
   "recip2.<fmt>\t%0,%1,%2"
-  [(set_attr "type" "frdiv")
+  [(set_attr "type" "frdiv2")
    (set_attr "mode" "<UNITMODE>")])
index bebddce9e7457695d67ac47c03b2587b6f80dab5..8862e5816b658be02e917e3000d38009a7883eb0 100644 (file)
@@ -411,6 +411,9 @@ extern const struct mips_cpu_info *mips_tune_info;
       if (TARGET_MIPS16)                                       \
        builtin_define ("__mips16");                            \
                                                                \
+      if (TARGET_MIPS3D)                                       \
+       builtin_define ("__mips3d");                            \
+                                                               \
       MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info);   \
       MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info);   \
                                                                \
index df32a546d6ccf5609e0a4d06b78adbfecf53b235..54bc7c3e251e274efb5263de8b44da86de4eb701 100644 (file)
 ;; fmadd       floating point multiply-add
 ;; fdiv                floating point divide
 ;; frdiv       floating point reciprocal divide
+;; frdiv1      floating point reciprocal divide step 1
+;; frdiv2      floating point reciprocal divide step 2
 ;; fabs                floating point absolute value
 ;; fneg                floating point negation
 ;; fcmp                floating point compare
 ;; fcvt                floating point convert
 ;; fsqrt       floating point square root
 ;; frsqrt       floating point reciprocal square root
+;; frsqrt1      floating point reciprocal square root step1
+;; frsqrt2      floating point reciprocal square root step2
 ;; multi       multiword sequence (or user asm statements)
 ;; nop         no operation
 (define_attr "type"
-  "unknown,branch,jump,call,load,fpload,fpidxload,store,fpstore,fpidxstore,prefetch,prefetchx,condmove,xfer,mthilo,mfhilo,const,arith,shift,slt,clz,trap,imul,imadd,idiv,fmove,fadd,fmul,fmadd,fdiv,frdiv,fabs,fneg,fcmp,fcvt,fsqrt,frsqrt,multi,nop"
+  "unknown,branch,jump,call,load,fpload,fpidxload,store,fpstore,fpidxstore,prefetch,prefetchx,condmove,xfer,mthilo,mfhilo,const,arith,shift,slt,clz,trap,imul,imadd,idiv,fmove,fadd,fmul,fmadd,fdiv,frdiv,frdiv1,frdiv2,fabs,fneg,fcmp,fcvt,fsqrt,frsqrt,frsqrt1,frsqrt2,multi,nop"
   (cond [(eq_attr "jal" "!unset") (const_string "call")
         (eq_attr "got" "load") (const_string "load")]
        (const_string "unknown")))
index 8e28e79a6322be1cc1e4d4b4e0d60b09c6a1c46a..3ab033302fd1127ebea56c947a92f02088f6668f 100644 (file)
 
 (define_insn_reservation "ir_sb1_fpu_2pipes" 4
   (and (eq_attr "cpu" "sb1")
-       (and (eq_attr "type" "fmove,fadd,fmul,fabs,fneg,fcvt")
+       (and (eq_attr "type" "fmove,fadd,fmul,fabs,fneg,fcvt,frdiv1,frsqrt1")
            (eq_attr "sb1_fp_pipes" "two")))
   "sb1_fp1 | sb1_fp0")
 
 (define_insn_reservation "ir_sb1_fpu_1pipe" 4
   (and (eq_attr "cpu" "sb1")
-       (and (eq_attr "type" "fmove,fadd,fmul,fabs,fneg,fcvt")
+       (and (eq_attr "type" "fmove,fadd,fmul,fabs,fneg,fcvt,frdiv1,frsqrt1")
+           (eq_attr "sb1_fp_pipes" "one")))
+  "sb1_fp1")
+
+(define_insn_reservation "ir_sb1_fpu_step2_2pipes" 8
+  (and (eq_attr "cpu" "sb1")
+       (and (eq_attr "type" "frdiv2,frsqrt2")
+           (eq_attr "sb1_fp_pipes" "two")))
+  "sb1_fp1 | sb1_fp0")
+
+(define_insn_reservation "ir_sb1_fpu_step2_1pipe" 8
+  (and (eq_attr "cpu" "sb1")
+       (and (eq_attr "type" "frdiv2,frsqrt2")
            (eq_attr "sb1_fp_pipes" "one")))
   "sb1_fp1")