aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/4600.md
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2004-07-12 05:21:29 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2004-07-12 05:21:29 +0000
commitf10107a18f1f702796c512611c6798e3eb5b56ac (patch)
tree8f0b7fa3547ea41407c7a2632b5bc34185cf60a8 /gcc/config/mips/4600.md
parent4c59781d99282440d92d89297e58a1c2223c0f0d (diff)
downloadgcc-f10107a18f1f702796c512611c6798e3eb5b56ac.zip
gcc-f10107a18f1f702796c512611c6798e3eb5b56ac.tar.gz
gcc-f10107a18f1f702796c512611c6798e3eb5b56ac.tar.bz2
mips.c (mips_use_dfa_pipeline_interface): Delete.
* config/mips/mips.c (mips_use_dfa_pipeline_interface): Delete. (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE): Define to hook_int_void_1. * config/mips/3000.md: Add copyright notice. Remove automota and function units; use generic ones instead. Only define reservations for things that are different from generic.md. Extend each clause to include r3900. * config/mips/{4000,4100,4300,4600,5000,6000,generic}.md: New files. * config/mips/mips.md: Include them. Remove define_function_units. (alu, imuldiv): New automata and units. From-SVN: r84547
Diffstat (limited to 'gcc/config/mips/4600.md')
-rw-r--r--gcc/config/mips/4600.md88
1 files changed, 88 insertions, 0 deletions
diff --git a/gcc/config/mips/4600.md b/gcc/config/mips/4600.md
new file mode 100644
index 0000000..155ef74
--- /dev/null
+++ b/gcc/config/mips/4600.md
@@ -0,0 +1,88 @@
+;; R4600 and R4650 pipeline description.
+;; Copyright (C) 2004 Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+
+;; GCC is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published
+;; by the Free Software Foundation; either version 2, or (at your
+;; option) any later version.
+
+;; GCC is distributed in the hope that it will be useful, but WITHOUT
+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+;; License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING. If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+;; MA 02111-1307, USA.
+
+
+;; This file overrides parts of generic.md. It is derived from the
+;; old define_function_unit description.
+;;
+;; We handle the R4600 and R4650 in much the same way. The only difference
+;; is in the integer multiplication and division costs.
+
+(define_insn_reservation "r4600_imul" 10
+ (and (eq_attr "cpu" "r4600")
+ (eq_attr "type" "imul,imadd"))
+ "imuldiv*10")
+
+(define_insn_reservation "r4600_idiv" 42
+ (and (eq_attr "cpu" "r4600")
+ (eq_attr "type" "idiv"))
+ "imuldiv*42")
+
+
+(define_insn_reservation "r4650_imul" 4
+ (and (eq_attr "cpu" "r4650")
+ (eq_attr "type" "imul,imadd"))
+ "imuldiv*4")
+
+(define_insn_reservation "r4650_idiv" 36
+ (and (eq_attr "cpu" "r4650")
+ (eq_attr "type" "idiv"))
+ "imuldiv*36")
+
+
+(define_insn_reservation "r4600_load" 2
+ (and (eq_attr "cpu" "r4600,r4650")
+ (eq_attr "type" "load,fpload,fpidxload"))
+ "alu")
+
+(define_insn_reservation "r4600_fmove" 1
+ (and (eq_attr "cpu" "r4600,r4650")
+ (eq_attr "type" "fabs,fneg,fmove"))
+ "alu")
+
+(define_insn_reservation "r4600_fmul_single" 8
+ (and (eq_attr "cpu" "r4600,r4650")
+ (and (eq_attr "type" "fmul,fmadd")
+ (eq_attr "mode" "SF")))
+ "alu")
+
+(define_insn_reservation "r4600_fdiv_single" 32
+ (and (eq_attr "cpu" "r4600,r4650")
+ (and (eq_attr "type" "fdiv")
+ (eq_attr "mode" "SF")))
+ "alu")
+
+(define_insn_reservation "r4600_fdiv_double" 61
+ (and (eq_attr "cpu" "r4600,r4650")
+ (and (eq_attr "type" "fdiv")
+ (eq_attr "mode" "DF")))
+ "alu")
+
+(define_insn_reservation "r4600_fsqrt_single" 31
+ (and (eq_attr "cpu" "r4600,r4650")
+ (and (eq_attr "type" "fsqrt,frsqrt")
+ (eq_attr "mode" "SF")))
+ "alu")
+
+(define_insn_reservation "r4600_fsqrt_double" 60
+ (and (eq_attr "cpu" "r4600,r4650")
+ (and (eq_attr "type" "fsqrt,frsqrt")
+ (eq_attr "mode" "DF")))
+ "alu")