This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch for mips nmadd/nmsub


trying to clean up mips a bit and make a few more categories for
instructions.

is this ok to commit?

cheers
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.


--
Aldy Hernandez			E-mail: aldyh@redhat.com
Professional Gypsy
Red Hat, Inc.

--=-5FmJdTac3T+lhgtaZRW1
Index: mips.h
===================================================================
RCS file:
retrieving revision 1.259
diff -c -r1.259 mips.h
*** mips.h	2001/07/13 11:17:35	1.259
--- mips.h	2001/07/17 15:55:56
***************
*** 849,854 ****
--- 849,864 ----
  /* 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)
+ 
+ /* start-sanitize-vr5xxx */
+ #undef ISA_HAS_NMADD_NMSUB
+ #define ISA_HAS_NMADD_NMSUB	(ISA_HAS_FP4				\
+ 				 && (!TARGET_MIPS5400 || TARGET_MAD))
+ 
+ /* end-sanitize-vr5xxx */
  /* start-sanitize-mips3264 */
  /* ISA has multiply-accumulate instructions, madd and msub.  */
  #define ISA_HAS_MADD_MSUB	(mips_isa == 32				\
Index: mips.md
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/mips/mips.md,v
retrieving revision 1.228
diff -c -r1.228 mips.md
*** mips.md	2001/07/07 15:00:44	1.228
--- mips.md	2001/07/17 15:56:17
***************
*** 3730,3736 ****
  	(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")])
--- 3730,3736 ----
  	(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")])
***************
*** 3740,3746 ****
  	(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")])
--- 3740,3746 ----
  	(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")])
***************
*** 3750,3756 ****
  	(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")])
--- 3750,3756 ----
  	(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")])
***************
*** 3760,3766 ****
  	(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")])
--- 3760,3766 ----
  	(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")])


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]