Update FSF address.
[official-gcc.git] / gcc / config / rs6000 / rios1.md
blob0cbca162b2de3334d8cf222cd78bc52c4023ca88
1 ;; Scheduling description for IBM POWER processor.
2 ;;   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
3 ;;
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, 51 Franklin Street, Fifth Floor, Boston,
19 ;; MA 02110-1301, 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"))
31   "iu_rios1")
33 (define_insn_reservation "rios1-store" 1
34   (and (eq_attr "type" "store,store_ux,store_u")
35        (eq_attr "cpu" "rios1,ppc601"))
36   "iu_rios1")
38 (define_insn_reservation "rios1-fpload" 2
39   (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
40        (eq_attr "cpu" "rios1"))
41   "iu_rios1")
43 (define_insn_reservation "ppc601-fpload" 3
44   (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
45        (eq_attr "cpu" "ppc601"))
46   "iu_rios1")
48 (define_insn_reservation "rios1-fpstore" 1
49   (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
50        (eq_attr "cpu" "rios1,ppc601"))
51   "iu_rios1+fpu_rios1")
53 (define_insn_reservation "rios1-integer" 1
54   (and (eq_attr "type" "integer,insert_word")
55        (eq_attr "cpu" "rios1,ppc601"))
56   "iu_rios1")
58 (define_insn_reservation "rios1-two" 1
59   (and (eq_attr "type" "two")
60        (eq_attr "cpu" "rios1,ppc601"))
61   "iu_rios1,iu_rios1")
63 (define_insn_reservation "rios1-three" 1
64   (and (eq_attr "type" "three")
65        (eq_attr "cpu" "rios1,ppc601"))
66   "iu_rios1,iu_rios1,iu_rios1")
68 (define_insn_reservation "rios1-imul" 5
69   (and (eq_attr "type" "imul,imul_compare")
70        (eq_attr "cpu" "rios1"))
71   "iu_rios1*5")
73 (define_insn_reservation "rios1-imul2" 4
74   (and (eq_attr "type" "imul2")
75        (eq_attr "cpu" "rios1"))
76   "iu_rios1*4")
78 (define_insn_reservation "rios1-imul3" 3
79   (and (eq_attr "type" "imul")
80        (eq_attr "cpu" "rios1"))
81   "iu_rios1*3")
83 (define_insn_reservation "ppc601-imul" 5
84   (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
85        (eq_attr "cpu" "ppc601"))
86   "iu_rios1*5")
88 (define_insn_reservation "rios1-idiv" 19
89   (and (eq_attr "type" "idiv")
90        (eq_attr "cpu" "rios1"))
91   "iu_rios1*19")
93 (define_insn_reservation "ppc601-idiv" 36
94   (and (eq_attr "type" "idiv")
95        (eq_attr "cpu" "ppc601"))
96   "iu_rios1*36")
98 ; compare executes on integer unit, but feeds insns which
99 ; execute on the branch unit.
100 (define_insn_reservation "rios1-compare" 4
101   (and (eq_attr "type" "cmp,fast_compare,compare")
102        (eq_attr "cpu" "rios1"))
103   "iu_rios1,nothing*2,bpu_rios1")
105 (define_insn_reservation "rios1-delayed_compare" 5
106   (and (eq_attr "type" "delayed_compare")
107        (eq_attr "cpu" "rios1"))
108   "iu_rios1,nothing*3,bpu_rios1")
110 (define_insn_reservation "ppc601-compare" 3
111   (and (eq_attr "type" "cmp,compare,delayed_compare")
112        (eq_attr "cpu" "ppc601"))
113   "iu_rios1,nothing,bpu_rios1")
115 (define_insn_reservation "rios1-fpcompare" 9
116   (and (eq_attr "type" "fpcompare")
117        (eq_attr "cpu" "rios1"))
118   "fpu_rios1,nothing*3,bpu_rios1")
120 (define_insn_reservation "ppc601-fpcompare" 5
121   (and (eq_attr "type" "fpcompare")
122        (eq_attr "cpu" "ppc601"))
123   "(fpu_rios1+iu_rios1*2),nothing*2,bpu_rios1")
125 (define_insn_reservation "rios1-fp" 2
126   (and (eq_attr "type" "fp,dmul")
127        (eq_attr "cpu" "rios1"))
128   "fpu_rios1")
130 (define_insn_reservation "ppc601-fp" 4
131   (and (eq_attr "type" "fp")
132        (eq_attr "cpu" "ppc601"))
133   "fpu_rios1")
135 (define_insn_reservation "rios1-dmul" 5
136   (and (eq_attr "type" "dmul")
137        (eq_attr "cpu" "ppc601"))
138   "fpu_rios1*2")
140 (define_insn_reservation "rios1-sdiv" 19
141   (and (eq_attr "type" "sdiv,ddiv")
142        (eq_attr "cpu" "rios1"))
143   "fpu_rios1*19")
145 (define_insn_reservation "ppc601-sdiv" 17
146   (and (eq_attr "type" "sdiv")
147        (eq_attr "cpu" "ppc601"))
148   "fpu_rios1*17")
150 (define_insn_reservation "ppc601-ddiv" 31
151   (and (eq_attr "type" "ddiv")
152        (eq_attr "cpu" "ppc601"))
153   "fpu_rios1*31")
155 (define_insn_reservation "rios1-mfcr" 2
156   (and (eq_attr "type" "mfcr")
157        (eq_attr "cpu" "rios1,ppc601"))
158   "iu_rios1,bpu_rios1")
160 (define_insn_reservation "rios1-mtcr" 4
161   (and (eq_attr "type" "mtcr")
162        (eq_attr "cpu" "rios1,ppc601"))
163   "iu_rios1,bpu_rios1")
165 (define_insn_reservation "rios1-crlogical" 4
166   (and (eq_attr "type" "cr_logical,delayed_cr")
167        (eq_attr "cpu" "rios1,ppc601"))
168   "bpu_rios1")
170 (define_insn_reservation "rios1-mtjmpr" 5
171   (and (eq_attr "type" "mtjmpr")
172        (eq_attr "cpu" "rios1"))
173   "iu_rios1,bpu_rios1")
175 (define_insn_reservation "ppc601-mtjmpr" 4
176   (and (eq_attr "type" "mtjmpr")
177        (eq_attr "cpu" "ppc601"))
178   "iu_rios1,bpu_rios1")
180 (define_insn_reservation "rios1-mfjmpr" 2
181   (and (eq_attr "type" "mfjmpr")
182        (eq_attr "cpu" "rios1,ppc601"))
183   "iu_rios1,bpu_rios1")
185 (define_insn_reservation "rios1-branch" 1
186   (and (eq_attr "type" "jmpreg,branch")
187        (eq_attr "cpu" "rios1,ppc601"))
188   "bpu_rios1")