summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/603.md
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-15 21:19:01 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-15 21:19:01 +0000
commita0b983228dda070bf8b24ab3701542bf9bdbeba0 (patch)
tree889b251db7bddd9347287fabcc0d1c73dd3a30fe /gcc/config/rs6000/603.md
parent2a5b4716e2bb96fc20e9790a5e82d4ae4005054c (diff)
downloadgcc-a0b983228dda070bf8b24ab3701542bf9bdbeba0.tar.gz
* config/rs6000/rs6000.h (processor_type): Add PPC440.
* config/rs6000/rs6000.c (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, TARGET_SCHED_VARIABLE_ISSUE): Define. (rs6000_use_dfa_pipeline_interface): New function. (rs6000_multipass_dfa_lookahead): New Function. (rs6000_variable_issue): New function. (rs6000_adjust_cost): Add CMP and DELAYED_CR types. (rs6000_issue_rate): Add PPC440. * config/rs6000/rs6000.md (unspec list): Correct typo. (attr "type"): Add load_ext, load_ext_u, load_ext_ux, load_u, store_ux, store_u, fpload_ux, fpload_u, fpstore_ux, fpstore_u, cmp, delayed_cr, mfcr, mtcr. (automata_option): Set "ndfa". (extendMMNN2): Update attributes. (movcc_internal1): Discourage move to non-cr0. Update attributes. (movMM_update): Update attributes. (cmpMM_internal): Update attributes. (sCC CR materialization): Update attributes. (branch patterns): Do not discourage non-cr0. (cr logical patterns): Prefer destructive register allocation. Update attributes. (movesi_from_cr): Update attribute. (mtcrf_operation): Update attribute. (mtcrfsi): Update attribute. * config/rs6000/40x.md: New file. * config/rs6000/603.md: New file. * config/rs6000/6xx.md: New file. * config/rs6000/7450.md: New file. * config/rs6000/7xx.md: New file. * config/rs6000/mpc.md: New file. * config/rs6000/power4.md: New file. * config/rs6000/rios1.md: New file. * config/rs6000/rios2.md: New file. * config/rs6000/rs64.md: New file. [Some DFA descriptions based on work by Michael Hayes] git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62943 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/603.md')
-rw-r--r--gcc/config/rs6000/603.md107
1 files changed, 107 insertions, 0 deletions
diff --git a/gcc/config/rs6000/603.md b/gcc/config/rs6000/603.md
new file mode 100644
index 00000000000..37d95d3f777
--- /dev/null
+++ b/gcc/config/rs6000/603.md
@@ -0,0 +1,107 @@
+(define_automaton "ppc603,ppc603fp,ppc603other")
+(define_cpu_unit "iu_603" "ppc603")
+(define_cpu_unit "fpu_603" "ppc603fp")
+(define_cpu_unit "lsu_603,bpu_603,sru_603" "ppc603other")
+
+;; PPC603/PPC603e 32-bit IU, LSU, FPU, BPU, SRU
+;; Max issue 3 insns/clock cycle (includes 1 branch)
+
+;; Branches go straight to the BPU. All other insns are handled
+;; by a dispatch unit which can issue a max of 2 insns per cycle.
+
+;; The PPC603e user's manual recommends that to reduce branch mispredictions,
+;; the insn that sets CR bits should be separated from the branch insn
+;; that evaluates them; separation by more than 9 insns ensures that the CR
+;; bits will be immediately available for execution.
+;; This could be artificially achieved by exagerating the latency of
+;; compare insns but at the expense of a poorer schedule.
+
+;; CR insns get executed in the SRU. Not modelled.
+
+(define_insn_reservation "ppc603-load" 2
+ (and (eq_attr "type" "load,load_ext,load_ux,load_u")
+ (eq_attr "cpu" "ppc603"))
+ "lsu_603")
+
+(define_insn_reservation "ppc603-store" 1
+ (and (eq_attr "type" "store,store_ux,store_u,fpstore,fpstore_ux,fpstore_u")
+ (eq_attr "cpu" "ppc603"))
+ "lsu_603")
+
+(define_insn_reservation "ppc603-fpload" 2
+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
+ (eq_attr "cpu" "ppc603"))
+ "lsu_603")
+
+(define_insn_reservation "ppc603-integer" 1
+ (and (eq_attr "type" "integer")
+ (eq_attr "cpu" "ppc603"))
+ "iu_603")
+
+; This takes 2 or 3 cycles
+(define_insn_reservation "ppc603-imul" 3
+ (and (eq_attr "type" "imul")
+ (eq_attr "cpu" "ppc603"))
+ "iu_603*2")
+
+(define_insn_reservation "ppc603-imul2" 2
+ (and (eq_attr "type" "imul2,imul3")
+ (eq_attr "cpu" "ppc603"))
+ "iu_603*2")
+
+(define_insn_reservation "ppc603-idiv" 37
+ (and (eq_attr "type" "idiv")
+ (eq_attr "cpu" "ppc603"))
+ "iu_603*37")
+
+(define_insn_reservation "ppc603-compare" 3
+ (and (eq_attr "type" "cmp,compare,delayed_compare")
+ (eq_attr "cpu" "ppc603"))
+ "iu_603,nothing,bpu_603")
+
+(define_insn_reservation "ppc603-fpcompare" 3
+ (and (eq_attr "type" "fpcompare")
+ (eq_attr "cpu" "ppc603"))
+ "(fpu_603+iu_603*2),bpu_603")
+
+(define_insn_reservation "ppc603-fp" 3
+ (and (eq_attr "type" "fp")
+ (eq_attr "cpu" "ppc603"))
+ "fpu_603")
+
+(define_insn_reservation "ppc603-dmul" 4
+ (and (eq_attr "type" "dmul")
+ (eq_attr "cpu" "ppc603"))
+ "fpu_603*2")
+
+; Divides are not pipelined
+(define_insn_reservation "ppc603-sdiv" 18
+ (and (eq_attr "type" "sdiv")
+ (eq_attr "cpu" "ppc603"))
+ "fpu_603*18")
+
+(define_insn_reservation "ppc603-ddiv" 33
+ (and (eq_attr "type" "ddiv")
+ (eq_attr "cpu" "ppc603"))
+ "fpu_603*33")
+
+(define_insn_reservation "ppc603-mtcr" 2
+ (and (eq_attr "type" "mtcr")
+ (eq_attr "cpu" "ppc603"))
+ "sru_603")
+
+(define_insn_reservation "ppc603-crlogical" 1
+ (and (eq_attr "type" "cr_logical,delayed_cr,mfcr")
+ (eq_attr "cpu" "ppc603"))
+ "sru_603")
+
+(define_insn_reservation "ppc603-mtjmpr" 4
+ (and (eq_attr "type" "mtjmpr")
+ (eq_attr "cpu" "ppc603"))
+ "bpu_603")
+
+(define_insn_reservation "ppc603-jmpreg" 1
+ (and (eq_attr "type" "jmpreg,branch")
+ (eq_attr "cpu" "ppc603"))
+ "bpu_603")
+