This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch for mips nmadd/nmsub
- To: gcc patches <gcc-patches at gcc dot gnu dot org>
- Subject: Re: patch for mips nmadd/nmsub
- From: Aldy Hernandez <aldyh at redhat dot com>
- Date: 18 Jul 2001 11:06:58 +0100
- Cc: Eric Christopher <echristo at redhat dot com>
- References: <995395515.532.65.camel@culebra.cygnus.com>
>>>>> "Aldy" == Aldy Hernandez <aldyh@redhat.com> writes:
> trying to clean up mips a bit and make a few more categories for
> instructions.
> is this ok to commit?
Sorry, wrong patch.
Here's the real one.
Aldy
2001-07-17 Aldy Hernandez <aldyh@redhat.com>
* config/mips/mips.h (ISA_HAS_NMADD_NMSUB): New macro.
* config/mips/mips.md (nmadd/nmsub): Use macro.
Index: mips.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.h,v
retrieving revision 1.118
diff -c -r1.118 mips.h
*** mips.h 2001/07/17 10:29:18 1.118
--- mips.h 2001/07/18 09:57:26
***************
*** 643,648 ****
--- 643,650 ----
/* ISA has conditional trap instructions. */
#define ISA_HAS_COND_TRAP (mips_isa >= 2)
+ /* ISA has nmadd and nmsub instructions. */
+ #define ISA_HAS_NMADD_NMSUB (ISA_HAS_FP4)
/* CC1_SPEC causes -mips3 and -mips4 to set -mfp64 and -mgp64; -mips1 or
-mips2 sets -mfp32 and -mgp32. This can be overridden by an explicit
Index: mips.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.md,v
retrieving revision 1.101
diff -c -r1.101 mips.md
*** mips.md 2001/07/17 10:29:18 1.101
--- mips.md 2001/07/18 09:57:28
***************
*** 2179,2185 ****
(neg:DF (plus:DF (mult:DF (match_operand:DF 1 "register_operand" "f")
(match_operand:DF 2 "register_operand" "f"))
(match_operand:DF 3 "register_operand" "f"))))]
! "ISA_HAS_FP4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"nmadd.d\\t%0,%3,%1,%2"
[(set_attr "type" "fmadd")
(set_attr "mode" "DF")])
--- 2179,2185 ----
(neg:DF (plus:DF (mult:DF (match_operand:DF 1 "register_operand" "f")
(match_operand:DF 2 "register_operand" "f"))
(match_operand:DF 3 "register_operand" "f"))))]
! "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"nmadd.d\\t%0,%3,%1,%2"
[(set_attr "type" "fmadd")
(set_attr "mode" "DF")])
***************
*** 2189,2195 ****
(neg:SF (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "f")
(match_operand:SF 2 "register_operand" "f"))
(match_operand:SF 3 "register_operand" "f"))))]
! "ISA_HAS_FP4 && TARGET_HARD_FLOAT"
"nmadd.s\\t%0,%3,%1,%2"
[(set_attr "type" "fmadd")
(set_attr "mode" "SF")])
--- 2189,2195 ----
(neg:SF (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "f")
(match_operand:SF 2 "register_operand" "f"))
(match_operand:SF 3 "register_operand" "f"))))]
! "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT"
"nmadd.s\\t%0,%3,%1,%2"
[(set_attr "type" "fmadd")
(set_attr "mode" "SF")])
***************
*** 2199,2205 ****
(minus:DF (match_operand:DF 1 "register_operand" "f")
(mult:DF (match_operand:DF 2 "register_operand" "f")
(match_operand:DF 3 "register_operand" "f"))))]
! "ISA_HAS_FP4 && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"nmsub.d\\t%0,%1,%2,%3"
[(set_attr "type" "fmadd")
(set_attr "mode" "DF")])
--- 2199,2205 ----
(minus:DF (match_operand:DF 1 "register_operand" "f")
(mult:DF (match_operand:DF 2 "register_operand" "f")
(match_operand:DF 3 "register_operand" "f"))))]
! "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"nmsub.d\\t%0,%1,%2,%3"
[(set_attr "type" "fmadd")
(set_attr "mode" "DF")])
***************
*** 2209,2215 ****
(minus:SF (match_operand:SF 1 "register_operand" "f")
(mult:SF (match_operand:SF 2 "register_operand" "f")
(match_operand:SF 3 "register_operand" "f"))))]
! "ISA_HAS_FP4 && TARGET_HARD_FLOAT"
"nmsub.s\\t%0,%1,%2,%3"
[(set_attr "type" "fmadd")
(set_attr "mode" "SF")])
--- 2209,2215 ----
(minus:SF (match_operand:SF 1 "register_operand" "f")
(mult:SF (match_operand:SF 2 "register_operand" "f")
(match_operand:SF 3 "register_operand" "f"))))]
! "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT"
"nmsub.s\\t%0,%1,%2,%3"
[(set_attr "type" "fmadd")
(set_attr "mode" "SF")])