1 ;; Scheduling description for IBM POWER processor.
2 ;; Copyright (C) 2003 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify it
7 ;; under the terms of the GNU General Public License as published
8 ;; by the Free Software Foundation; either version 2, or (at your
9 ;; option) any later version.
11 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
12 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 ;; License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING. If not, write to the
18 ;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
19 ;; MA 02111-1307, USA.
21 (define_automaton "rios1,rios1fp")
22 (define_cpu_unit "iu_rios1" "rios1")
23 (define_cpu_unit "fpu_rios1" "rios1fp")
24 (define_cpu_unit "bpu_rios1" "rios1")
26 ;; RIOS1 32-bit IU, FPU, BPU
28 (define_insn_reservation "rios1-load" 2
29 (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
30 (eq_attr "cpu" "rios1,ppc601"))
33 (define_insn_reservation "rios1-store" 1
34 (and (eq_attr "type" "store,store_ux,store_u")
35 (eq_attr "cpu" "rios1,ppc601"))
38 (define_insn_reservation "rios1-fpload" 2
39 (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
40 (eq_attr "cpu" "rios1"))
43 (define_insn_reservation "ppc601-fpload" 3
44 (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
45 (eq_attr "cpu" "ppc601"))
48 (define_insn_reservation "rios1-fpstore" 1
49 (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
50 (eq_attr "cpu" "rios1,ppc601"))
53 (define_insn_reservation "rios1-integer" 1
54 (and (eq_attr "type" "integer,mfcr,mtcr")
55 (eq_attr "cpu" "rios1,ppc601"))
58 (define_insn_reservation "rios1-imul" 5
59 (and (eq_attr "type" "imul,imul_compare")
60 (eq_attr "cpu" "rios1"))
63 (define_insn_reservation "rios1-imul2" 4
64 (and (eq_attr "type" "imul2")
65 (eq_attr "cpu" "rios1"))
68 (define_insn_reservation "rios1-imul3" 3
69 (and (eq_attr "type" "imul")
70 (eq_attr "cpu" "rios1"))
73 (define_insn_reservation "ppc601-imul" 5
74 (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
75 (eq_attr "cpu" "ppc601"))
78 (define_insn_reservation "rios1-idiv" 19
79 (and (eq_attr "type" "idiv")
80 (eq_attr "cpu" "rios1"))
83 (define_insn_reservation "ppc601-idiv" 36
84 (and (eq_attr "type" "idiv")
85 (eq_attr "cpu" "ppc601"))
88 ; compare executes on integer unit, but feeds insns which
89 ; execute on the branch unit.
90 (define_insn_reservation "rios1-compare" 4
91 (and (eq_attr "type" "cmp,fast_compare,compare")
92 (eq_attr "cpu" "rios1"))
93 "iu_rios1,nothing*2,bpu_rios1")
95 (define_insn_reservation "rios1-delayed_compare" 5
96 (and (eq_attr "type" "delayed_compare")
97 (eq_attr "cpu" "rios1"))
98 "iu_rios1,nothing*3,bpu_rios1")
100 (define_insn_reservation "ppc601-compare" 3
101 (and (eq_attr "type" "cmp,compare,delayed_compare")
102 (eq_attr "cpu" "ppc601"))
103 "iu_rios1,nothing,bpu_rios1")
105 (define_insn_reservation "rios1-fpcompare" 9
106 (and (eq_attr "type" "fpcompare")
107 (eq_attr "cpu" "rios1"))
108 "fpu_rios1,nothing*3,bpu_rios1")
110 (define_insn_reservation "ppc601-fpcompare" 5
111 (and (eq_attr "type" "fpcompare")
112 (eq_attr "cpu" "ppc601"))
113 "(fpu_rios1+iu_rios1*2),nothing*2,bpu_rios1")
115 (define_insn_reservation "rios1-fp" 2
116 (and (eq_attr "type" "fp,dmul")
117 (eq_attr "cpu" "rios1"))
120 (define_insn_reservation "ppc601-fp" 4
121 (and (eq_attr "type" "fp")
122 (eq_attr "cpu" "ppc601"))
125 (define_insn_reservation "rios1-dmul" 5
126 (and (eq_attr "type" "dmul")
127 (eq_attr "cpu" "ppc601"))
130 (define_insn_reservation "rios1-sdiv" 19
131 (and (eq_attr "type" "sdiv,ddiv")
132 (eq_attr "cpu" "rios1"))
135 (define_insn_reservation "ppc601-sdiv" 17
136 (and (eq_attr "type" "sdiv")
137 (eq_attr "cpu" "ppc601"))
140 (define_insn_reservation "ppc601-ddiv" 31
141 (and (eq_attr "type" "ddiv")
142 (eq_attr "cpu" "ppc601"))
145 (define_insn_reservation "rios1-crlogical" 4
146 (and (eq_attr "type" "cr_logical,delayed_cr")
147 (eq_attr "cpu" "rios1,ppc601"))
150 (define_insn_reservation "rios1-mtjmpr" 5
151 (and (eq_attr "type" "mtjmpr")
152 (eq_attr "cpu" "rios1"))
155 (define_insn_reservation "ppc601-mtjmpr" 4
156 (and (eq_attr "type" "mtjmpr")
157 (eq_attr "cpu" "ppc601"))
160 (define_insn_reservation "rios1-branch" 1
161 (and (eq_attr "type" "jmpreg,branch")
162 (eq_attr "cpu" "rios1,ppc601"))