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]
Other format: [Raw text]

MIPS XLR fixes


This patch has some minor fixes to the MIPS XLR support:

* The insn costs have five hardcoded COSTS_N_INSNS (256), which is
  just the definition of SOFT_FP_COSTS; they should be using
  SOFT_FP_COSTS directly.

* As a MIPS64 processor there should be an entry in
  MIPS_ISA_LEVEL_SPEC, and as a soft-float processor there should be
  an entry in MIPS_ARCH_FLOAT_SPEC.

* The scheduler description predates some of the MIPS insn types that
  have been split out of "arith" at various times, and has not been
  updated to handle them.  This patch adds move, logical and signext
  alongside arith.

Tested with cross to mips-linux-gnu.  OK to commit?

2009-04-15  Joseph Myers  <joseph@codesourcery.com>

	* config/mips/mips.c (mips_rtx_cost_data): Use SOFT_FP_COSTS in
	XLR entry.
	* config/mips/mips.h (MIPS_ISA_LEVEL_SPEC, MIPS_ARCH_FLOAT_SPEC):
	Handle -march=xlr.
	* config/mips/xlr.md (ir_xlr_alu): Also accept insn types move,
	logical and signext.

Index: config/mips/xlr.md
===================================================================
--- config/mips/xlr.md	(revision 146098)
+++ config/mips/xlr.md	(working copy)
@@ -31,7 +31,7 @@
 ;; Integer arithmetic instructions.
 (define_insn_reservation "ir_xlr_alu" 1
   (and (eq_attr "cpu" "xlr") 
-       (eq_attr "type" "arith,shift,clz,const,unknown,multi,nop,trap"))
+       (eq_attr "type" "move,arith,shift,clz,logical,signext,const,unknown,multi,nop,trap"))
   "xlr_main_pipe")
 
 ;; Integer arithmetic instructions.
Index: config/mips/mips.c
===================================================================
--- config/mips/mips.c	(revision 146098)
+++ config/mips/mips.c	(working copy)
@@ -1094,13 +1094,7 @@
     DEFAULT_COSTS
   },
   { /* XLR */
-    /* Need to replace first five with the costs of calling the appropriate 
-       libgcc routine.  */
-    COSTS_N_INSNS (256),          /* fp_add */
-    COSTS_N_INSNS (256),          /* fp_mult_sf */
-    COSTS_N_INSNS (256),          /* fp_mult_df */
-    COSTS_N_INSNS (256),          /* fp_div_sf */
-    COSTS_N_INSNS (256),          /* fp_div_df */
+    SOFT_FP_COSTS,
     COSTS_N_INSNS (8),            /* int_mult_si */
     COSTS_N_INSNS (8),            /* int_mult_di */
     COSTS_N_INSNS (72),           /* int_div_si */
Index: config/mips/mips.h
===================================================================
--- config/mips/mips.h	(revision 146098)
+++ config/mips/mips.h	(working copy)
@@ -709,7 +709,8 @@
      %{march=mips32|march=4kc|march=4km|march=4kp|march=4ksc:-mips32} \
      %{march=mips32r2|march=m4k|march=4ke*|march=4ksd|march=24k* \
        |march=34k*|march=74k*: -mips32r2} \
-     %{march=mips64|march=5k*|march=20k*|march=sb1*|march=sr71000: -mips64} \
+     %{march=mips64|march=5k*|march=20k*|march=sb1*|march=sr71000 \
+       |march=xlr: -mips64} \
      %{march=mips64r2|march=octeon: -mips64r2} \
      %{!march=*: -" MULTILIB_ISA_DEFAULT "}}"
 
@@ -720,7 +721,7 @@
 #define MIPS_ARCH_FLOAT_SPEC \
   "%{mhard-float|msoft-float|march=mips*:; \
      march=vr41*|march=m4k|march=4k*|march=24kc|march=24kec \
-     |march=34kc|march=74kc|march=5kc|march=octeon: -msoft-float; \
+     |march=34kc|march=74kc|march=5kc|march=octeon|march=xlr: -msoft-float; \
      march=*: -mhard-float}"
 
 /* A spec condition that matches 32-bit options.  It only works if

-- 
Joseph S. Myers
joseph@codesourcery.com


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