1 (define_automaton "ppc7xx,ppc7xxfp,ppc7xxother,ppc7xxvec")
2 (define_cpu_unit "iu1_7xx,iu2_7xx" "ppc7xx")
3 (define_cpu_unit "fpu_7xx" "ppc7xxfp")
4 (define_cpu_unit "lsu_7xx,bpu_7xx,sru_7xx" "ppc7xxother")
5 (define_cpu_unit "du1_7xx,du2_7xx" "ppc7xx")
6 (define_cpu_unit "veccmplx_7xx,vecperm_7xx,vdu_7xx" "ppc7xxvec")
8 ;; PPC740/PPC750/PPC7400 32-bit 2xIU, LSU, SRU, FPU, BPU
9 ;; IU1 can perform all integer operations
10 ;; IU2 can perform all integer operations except imul and idiv
11 ;; LSU 2 stage pipelined
12 ;; FPU 3 stage pipelined
13 ;; Max issue 3 insns/clock cycle (includes 1 branch)
17 ;; The PPC750 user's manual recommends that to reduce branch mispredictions,
18 ;; the insn that sets CR bits should be separated from the branch insn
19 ;; that evaluates them. There is no advantage have more than 10 cycles
21 ;; This could be artificially achieved by exagerating the latency of
22 ;; compare insns but at the expense of a poorer schedule.
24 ;; Branches go straight to the BPU. All other insns are handled
25 ;; by a dispatch unit which can issue a max of 2 insns per cycle.
26 (define_reservation "ppc750_du" "du1_7xx|du2_7xx")
27 (define_reservation "ppc7400_vec_du" "vdu_7xx")
29 (define_insn_reservation "ppc750-load" 2
30 (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,\
31 load_ux,load_u,fpload,fpload_ux,fpload_u,vecload")
32 (eq_attr "cpu" "ppc750,ppc7400"))
35 (define_insn_reservation "ppc750-store" 1
36 (and (eq_attr "type" "store,store_ux,store_u,\
37 fpstore,fpstore_ux,fpstore_u,vecstore")
38 (eq_attr "cpu" "ppc750,ppc7400"))
41 (define_insn_reservation "ppc750-integer" 1
42 (and (eq_attr "type" "integer")
43 (eq_attr "cpu" "ppc750,ppc7400"))
44 "ppc750_du,(iu1_7xx|iu2_7xx)")
46 (define_insn_reservation "ppc750-imul" 4
47 (and (eq_attr "type" "imul")
48 (eq_attr "cpu" "ppc750,ppc7400"))
49 "ppc750_du,iu1_7xx*4")
51 (define_insn_reservation "ppc750-imul2" 3
52 (and (eq_attr "type" "imul2")
53 (eq_attr "cpu" "ppc750,ppc7400"))
54 "ppc750_du,iu1_7xx*2")
56 (define_insn_reservation "ppc750-imul3" 2
57 (and (eq_attr "type" "imul3")
58 (eq_attr "cpu" "ppc750,ppc7400"))
61 (define_insn_reservation "ppc750-idiv" 19
62 (and (eq_attr "type" "idiv")
63 (eq_attr "cpu" "ppc750,ppc7400"))
64 "ppc750_du,iu1_7xx*19")
66 (define_insn_reservation "ppc750-compare" 2
67 (and (eq_attr "type" "cmp,compare,delayed_compare")
68 (eq_attr "cpu" "ppc750,ppc7400"))
69 "ppc750_du,(iu1_7xx|iu2_7xx)")
71 (define_insn_reservation "ppc750-fpcompare" 2
72 (and (eq_attr "type" "fpcompare")
73 (eq_attr "cpu" "ppc750,ppc7400"))
76 (define_insn_reservation "ppc750-fp" 3
77 (and (eq_attr "type" "fp")
78 (eq_attr "cpu" "ppc750,ppc7400"))
81 (define_insn_reservation "ppc750-dmul" 4
82 (and (eq_attr "type" "dmul")
83 (eq_attr "cpu" "ppc750"))
84 "ppc750_du,fpu_7xx*2")
86 (define_insn_reservation "ppc7400-dmul" 3
87 (and (eq_attr "type" "dmul")
88 (eq_attr "cpu" "ppc7400"))
91 ; Divides are not pipelined
92 (define_insn_reservation "ppc750-sdiv" 17
93 (and (eq_attr "type" "sdiv")
94 (eq_attr "cpu" "ppc750,ppc7400"))
95 "ppc750_du,fpu_7xx*17")
97 (define_insn_reservation "ppc750-ddiv" 31
98 (and (eq_attr "type" "ddiv")
99 (eq_attr "cpu" "ppc750,ppc7400"))
100 "ppc750_du,fpu_7xx*31")
102 (define_insn_reservation "ppc750-mfcr" 2
103 (and (eq_attr "type" "mfcr,mtcr")
104 (eq_attr "cpu" "ppc750,ppc7400"))
107 (define_insn_reservation "ppc750-crlogical" 3
108 (and (eq_attr "type" "cr_logical,delayed_cr")
109 (eq_attr "cpu" "ppc750,ppc7400"))
110 "ppc750_du,sru_7xx*2")
112 (define_insn_reservation "ppc750-mtjmpr" 2
113 (and (eq_attr "type" "mtjmpr")
114 (eq_attr "cpu" "ppc750,ppc7400"))
117 (define_insn_reservation "ppc750-jmpreg" 1
118 (and (eq_attr "type" "jmpreg,branch")
119 (eq_attr "cpu" "ppc750,ppc7400"))
123 (define_insn_reservation "ppc7400-vecsimple" 1
124 (and (eq_attr "type" "vecsimple,veccmp")
125 (eq_attr "cpu" "ppc7400"))
126 "ppc750_du,ppc7400_vec_du,veccmplx_7xx")
128 (define_insn_reservation "ppc7400-veccomplex" 4
129 (and (eq_attr "type" "veccomplex")
130 (eq_attr "cpu" "ppc7400"))
131 "ppc750_du,ppc7400_vec_du,veccmplx_7xx")
133 (define_insn_reservation "ppc7400-vecfloat" 4
134 (and (eq_attr "type" "vecfloat")
135 (eq_attr "cpu" "ppc7400"))
136 "ppc750_du,ppc7400_vec_du,veccmplx_7xx")
138 (define_insn_reservation "ppc7400-vecperm" 2
139 (and (eq_attr "type" "vecperm")
140 (eq_attr "cpu" "ppc7400"))
141 "ppc750_du,ppc7400_vec_du,vecperm_7xx")