1 ;; DFA-based pipeline description for 5400
2 (define_automaton "vr54")
3 (define_cpu_unit "vr54_dp0" "vr54")
4 (define_cpu_unit "vr54_dp1" "vr54")
5 (define_cpu_unit "vr54_mem" "vr54")
6 (define_cpu_unit "vr54_mac" "vr54")
9 ;; The ordering of the instruction-execution-path/resource-usage
10 ;; descriptions (also known as reservation RTL) is roughly ordered
11 ;; based on the define attribute RTL for the "type" classification.
12 ;; When modifying, remember that the first test that matches is the
16 (define_insn_reservation "ir_vr54_unknown" 1
17 (and (eq_attr "cpu" "r5400")
18 (eq_attr "type" "unknown"))
19 "vr54_dp0+vr54_dp1+vr54_mem+vr54_mac")
21 ;; Assume prediction fails.
22 (define_insn_reservation "ir_vr54_branch" 3
23 (and (eq_attr "cpu" "r5400")
24 (eq_attr "type" "branch,jump,call"))
27 (define_insn_reservation "ir_vr54_load" 2
28 (and (eq_attr "cpu" "r5400")
29 (and (eq_attr "type" "load")
30 (eq_attr "mode" "!SF,DF,FPSW")))
33 (define_insn_reservation "ir_vr54_store" 1
34 (and (eq_attr "cpu" "r5400")
35 (and (eq_attr "type" "store")
36 (eq_attr "mode" "!SF,DF,FPSW")))
39 (define_insn_reservation "ir_vr54_fstore" 1
40 (and (eq_attr "cpu" "r5400")
41 (and (eq_attr "type" "store")
42 (eq_attr "mode" "SF,DF")))
46 ;; This reservation is for conditional move based on integer
47 ;; or floating point CC. This could probably use some refinement
48 ;; as "move" type attr seems to be overloaded in rtl.
49 (define_insn_reservation "ir_vr54_move" 4
50 (and (eq_attr "cpu" "r5400")
51 (eq_attr "type" "move"))
54 ;; Move to/from FPU registers
55 (define_insn_reservation "ir_vr54_xfer" 2
56 (and (eq_attr "cpu" "r5400")
57 (eq_attr "type" "xfer"))
60 (define_insn_reservation "ir_vr54_hilo" 1
61 (and (eq_attr "cpu" "r5400")
62 (eq_attr "type" "hilo"))
65 (define_insn_reservation "ir_vr54_arith" 1
66 (and (eq_attr "cpu" "r5400")
67 (eq_attr "type" "arith,darith,icmp,nop"))
70 (define_insn_reservation "ir_vr54_imul_si" 3
71 (and (eq_attr "cpu" "r5400")
72 (and (eq_attr "type" "imul")
73 (eq_attr "mode" "SI")))
76 (define_insn_reservation "ir_vr54_imul_di" 4
77 (and (eq_attr "cpu" "r5400")
78 (and (eq_attr "type" "imul")
79 (eq_attr "mode" "DI")))
82 (define_insn_reservation "ir_vr54_imadd_si" 3
83 (and (eq_attr "cpu" "r5400")
84 (eq_attr "type" "imul"))
87 (define_insn_reservation "ir_vr54_idiv_si" 42
88 (and (eq_attr "cpu" "r5400")
89 (and (eq_attr "type" "idiv")
90 (eq_attr "mode" "SI")))
93 (define_insn_reservation "ir_vr54_idiv_di" 74
94 (and (eq_attr "cpu" "r5400")
95 (and (eq_attr "type" "idiv")
96 (eq_attr "mode" "DI")))
99 (define_insn_reservation "ir_vr54_fadd" 4
100 (and (eq_attr "cpu" "r5400")
101 (eq_attr "type" "fadd"))
104 (define_insn_reservation "ir_vr54_fmul_sf" 5
105 (and (eq_attr "cpu" "r5400")
106 (and (eq_attr "type" "fmul")
107 (eq_attr "mode" "SF")))
110 (define_insn_reservation "ir_vr54_fmul_df" 6
111 (and (eq_attr "cpu" "r5400")
112 (and (eq_attr "type" "fmul")
113 (eq_attr "mode" "DF")))
116 (define_insn_reservation "ir_vr54_fmadd_sf" 9
117 (and (eq_attr "cpu" "r5400")
118 (and (eq_attr "type" "fmadd")
119 (eq_attr "mode" "SF")))
122 (define_insn_reservation "ir_vr54_fmadd_df" 10
123 (and (eq_attr "cpu" "r5400")
124 (and (eq_attr "type" "fmadd")
125 (eq_attr "mode" "DF")))
128 (define_insn_reservation "ir_vr54_fdiv_sf" 42
129 (and (eq_attr "cpu" "r5400")
130 (and (eq_attr "type" "fdiv,fsqrt")
131 (eq_attr "mode" "SF")))
134 (define_insn_reservation "ir_vr54_fdiv_df" 72
135 (and (eq_attr "cpu" "r5400")
136 (and (eq_attr "type" "fdiv,fsqrt")
137 (eq_attr "mode" "DF")))
140 (define_insn_reservation "ir_vr54_fabs" 2
141 (and (eq_attr "cpu" "r5400")
142 (eq_attr "type" "fabs,fneg"))
145 (define_insn_reservation "ir_vr54_fcmp" 2
146 (and (eq_attr "cpu" "r5400")
147 (eq_attr "type" "fcmp"))
150 (define_insn_reservation "ir_vr54_fcvt" 6
151 (and (eq_attr "cpu" "r5400")
152 (eq_attr "type" "fcvt"))
155 (define_insn_reservation "ir_vr54_frsqrt_sf" 61
156 (and (eq_attr "cpu" "r5400")
157 (and (eq_attr "type" "frsqrt")
158 (eq_attr "mode" "SF")))
161 (define_insn_reservation "ir_vr54_frsqrt_df" 121
162 (and (eq_attr "cpu" "r5400")
163 (and (eq_attr "type" "frsqrt")
164 (eq_attr "mode" "DF")))
167 (define_insn_reservation "ir_vr54_multi" 1
168 (and (eq_attr "cpu" "r5400")
169 (eq_attr "type" "multi"))
170 "vr54_dp0+vr54_dp1+vr54_mem+vr54_mac")