summaryrefslogtreecommitdiff
path: root/gcc/config/mips/5500.md
diff options
context:
space:
mode:
authorechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-20 21:53:28 +0000
committerechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-20 21:53:28 +0000
commit2857c21b34951ec13127720e7a41bca17b8f1466 (patch)
treeb72fd6b619d1518b9b9f3fde47b1498e3205c725 /gcc/config/mips/5500.md
parent9fac87f2170bbbad8bbd9ec1bdab5a6f5a595530 (diff)
downloadgcc-2857c21b34951ec13127720e7a41bca17b8f1466.tar.gz
2002-08-15 Eric Christopher <echristo@redhat.com>
* config.sub: Import from master repository. * config.guess: Ditto. 2002-08-15 Eric Christopher <echristo@redhat.com> Jeff Knaggs <jknaggs@redhat.com> * config.gcc (mipsisa64sr71k-elf): New target. * config/mips/sr71k.md: New file. * config/mips/mips.md: Use it. (rot*): Add sr71k specifics. * config/mips/t-sr71k: New file. * config/mips/mips.h (sr71k): New cpu. (TARGET_SR71K): Use it. (TUNE_SR71K): Ditto. (GENERATE_BRANCHLIKELY): Ditto. (ISA_HAS_MULHI, ISA_HAS_MULS, ISA_HAS_MSAC, ISA_HAS_MACC, ISA_HAS_ROTR_SIISA_HAS_ROTR_DI): Ditto. * config/mips/mips.c (sr71k): New cpu. (mips_use_dfa_pipeline_interface): Use. 2002-08-15 Eric Christopher <echristo@redhat.com> Richard Sandiford <rsandifo@redhat.com> Aldy Hernandez <aldyh@redhat.com> Graham Stott <grahams@redhat.com> Michael Meissner <meissner@redhat.com> Gavin Romig-Koch <gavin@redhat.com> Ken Raeburn <raeburn@cygnus.com> Alexandre Oliva <aoliva@redhat.com> * config.gcc (mips64vr-elf): New target. * config/mips/5400.md: New file. * config/mips/5500.md: Ditto. * config/mips/mips.md: Use them. (frsqrt): New. * config/mips/mips.c (vr4111, vr4121, vr4320, vr5400, vr5500): New cpus. (mips_issue_rate): Use them. (mips_use_dfa_pipeline_interface): New function. Use for 5400 and 5500. (TARGET_SCHEDUSE_DFA_PIPELINE_INTERFACE): Define. Use above. * config/mips/mips.h (vr4111, vr4121, vr4320, vr5400, vr5500): New cpus. (TARGET_MIPSx): Use them. (TUNE_MIPSx): Ditto. (GETNATE_MULT3_SI): Ditto. (ISA_HAS_BRANCHLIKELY): Ditto. (ISA_HAS_CONDMOVE): Ditto. (ISA_HAS_NMADD_NMSUB): Ditto. (ISA_HAS_MULHI): New. Ditto. (ISA_HAS_MULS): Ditto. (ISA_HAS_MSAC): Ditto. (ISA_HAS_MACC): Ditto. (ISA_HAS_ROTR_SI): Ditto. (ISA_HAS_ROTR_DI): Ditto. (RTX_COSTS): Use. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56471 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips/5500.md')
-rw-r--r--gcc/config/mips/5500.md172
1 files changed, 172 insertions, 0 deletions
diff --git a/gcc/config/mips/5500.md b/gcc/config/mips/5500.md
new file mode 100644
index 00000000000..8023b9a6064
--- /dev/null
+++ b/gcc/config/mips/5500.md
@@ -0,0 +1,172 @@
+;; DFA-based pipeline description for 5500
+(define_automaton "vr55")
+(define_cpu_unit "vr55_dp0" "vr55")
+(define_cpu_unit "vr55_dp1" "vr55")
+(define_cpu_unit "vr55_mem" "vr55")
+(define_cpu_unit "vr55_mac" "vr55")
+(define_cpu_unit "vr55_fp" "vr55")
+(define_cpu_unit "vr55_bru" "vr55")
+
+;;
+;; The ordering of the instruction-execution-path/resource-usage
+;; descriptions (also known as reservation RTL) is roughly ordered
+;; based on the define attribute RTL for the "type" classification.
+;; When modifying, remember that the first test that matches is the
+;; reservation used!
+;;
+
+(define_insn_reservation "ir_vr55_unknown" 1
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "unknown"))
+ "vr55_dp0+vr55_dp1+vr55_mem+vr55_mac+vr55_fp+vr55_bru")
+
+;; Assume prediction fails.
+(define_insn_reservation "ir_vr55_branch" 2
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "branch,jump,call"))
+ "vr55_bru")
+
+(define_insn_reservation "ir_vr55_load" 3
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "load"))
+ "vr55_mem")
+
+(define_insn_reservation "ir_vr55_store" 1
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "store"))
+ "vr55_mem")
+
+;; This reservation is for conditional move based on integer
+;; or floating point CC. This could probably use some refinement
+;; as "move" type attr seems to be overloaded in rtl.
+(define_insn_reservation "ir_vr55_move" 2
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "move"))
+ "vr55_dp0|vr55_dp1")
+
+;; Move to/from FPU registers
+(define_insn_reservation "ir_vr55_xfer" 2
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "xfer"))
+ "vr55_dp0|vr55_dp1")
+
+(define_insn_reservation "ir_vr55_hilo" 2
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "hilo"))
+ "vr55_dp0|vr55_dp1")
+
+(define_insn_reservation "ir_vr55_arith" 1
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "arith,darith,icmp,nop"))
+ "vr55_dp0|vr55_dp1")
+
+(define_insn_reservation "ir_vr55_imul_si" 3
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "imul")
+ (eq_attr "mode" "SI")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_imul_di" 4
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "imul")
+ (eq_attr "mode" "DI")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_imadd_si" 3
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "imul"))
+ "vr55_mac")
+
+;; Divide algorithm is early out with best latency of 7 pcycles.
+;; Use worst case for scheduling purposes.
+(define_insn_reservation "ir_vr55_idiv_si" 42
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "idiv")
+ (eq_attr "mode" "SI")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_idiv_di" 74
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "idiv")
+ (eq_attr "mode" "DI")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_fadd" 4
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "fadd"))
+ "vr55_fp")
+
+(define_insn_reservation "ir_vr55_fmul_sf" 5
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "fmul")
+ (eq_attr "mode" "SF")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_fmul_df" 6
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "fmul")
+ (eq_attr "mode" "DF")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_fmadd_sf" 9
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "fmadd")
+ (eq_attr "mode" "SF")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_fmadd_df" 10
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "fmadd")
+ (eq_attr "mode" "DF")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_fdiv_sf" 30
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "fdiv,fsqrt")
+ (eq_attr "mode" "SF")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_fdiv_df" 59
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "fdiv,fsqrt")
+ (eq_attr "mode" "DF")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_fabs" 2
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "fabs,fneg"))
+ "vr55_fp")
+
+(define_insn_reservation "ir_vr55_fcmp" 2
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "fcmp"))
+ "vr55_fp")
+
+(define_insn_reservation "ir_vr55_fcvt_sf" 4
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "fcvt")
+ (eq_attr "mode" "SF")))
+ "vr55_fp")
+
+(define_insn_reservation "ir_vr55_fcvt_df" 6
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "fcvt")
+ (eq_attr "mode" "DF")))
+ "vr55_fp")
+
+(define_insn_reservation "ir_vr55_frsqrt_sf" 60
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "frsqrt")
+ (eq_attr "mode" "SF")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_frsqrt_df" 118
+ (and (eq_attr "cpu" "r5500")
+ (and (eq_attr "type" "frsqrt")
+ (eq_attr "mode" "DF")))
+ "vr55_mac")
+
+(define_insn_reservation "ir_vr55_multi" 1
+ (and (eq_attr "cpu" "r5500")
+ (eq_attr "type" "multi"))
+ "vr55_dp0+vr55_dp1+vr55_mem+vr55_mac+vr55_fp+vr55_bru")