3 ;; Free Software Foundation, Inc.
5 ;; This file is part of GCC.
7 ;; GCC is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 2, or (at your option)
12 ;; GCC is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GCC; see the file COPYING. If not, write to
19 ;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 ;; Boston, MA 02110-1301, USA.
22 ;; The Geode architecture is one insn issue processor.
24 ;; This description is based on data from the following documents:
26 ;; "AMD Geode GX Processor Data Book"
27 ;; Advanced Micro Devices, Inc., Aug 2005.
29 ;; "AMD Geode LX Processor Data Book"
30 ;; Advanced Micro Devices, Inc., Jan 2006.
33 ;; CPU execution units of the Geode:
35 ;; issue describes the issue pipeline.
36 ;; alu describes the Integer unit
37 ;; fpu describes the FP unit
39 ;; The fp unit is out of order execution unit with register renaming.
40 ;; There is also memory management unit and execution pipeline for
41 ;; load/store operations. We ignore it and difference between insns
42 ;; using memory and registers.
44 (define_automaton "geode")
46 (define_cpu_unit "geode_issue,geode_alu,geode_fpu" "geode")
48 (define_insn_reservation "alu" 1
49 (and (eq_attr "cpu" "geode")
50 (eq_attr "type" "alu,alu1,negnot,icmp,lea,test,imov,imovx,icmov,incdec,setcc"))
51 "geode_issue,geode_alu")
53 (define_insn_reservation "shift" 2
54 (and (eq_attr "cpu" "geode")
55 (eq_attr "type" "ishift,ishift1,rotate,rotate1,cld"))
56 "geode_issue,geode_alu*2")
58 (define_insn_reservation "imul" 7
59 (and (eq_attr "cpu" "geode")
60 (eq_attr "type" "imul"))
61 "geode_issue,geode_alu*7")
63 (define_insn_reservation "idiv" 40
64 (and (eq_attr "cpu" "geode")
65 (eq_attr "type" "idiv"))
66 "geode_issue,geode_alu*40")
69 (define_insn_reservation "call" 2
70 (and (eq_attr "cpu" "geode")
71 (eq_attr "type" "call,callv"))
72 "geode_issue,geode_alu*2")
74 (define_insn_reservation "geode_branch" 1
75 (and (eq_attr "cpu" "geode")
76 (eq_attr "type" "ibr"))
77 "geode_issue,geode_alu")
79 (define_insn_reservation "geode_pop_push" 1
80 (and (eq_attr "cpu" "geode")
81 (eq_attr "type" "pop,push"))
82 "geode_issue,geode_alu")
84 (define_insn_reservation "geode_leave" 2
85 (and (eq_attr "cpu" "geode")
86 (eq_attr "type" "leave"))
87 "geode_issue,geode_alu*2")
89 (define_insn_reservation "geode_load_str" 4
90 (and (eq_attr "cpu" "geode")
91 (and (eq_attr "type" "str")
92 (eq_attr "memory" "load,both")))
93 "geode_issue,geode_alu*4")
95 (define_insn_reservation "geode_store_str" 2
96 (and (eq_attr "cpu" "geode")
97 (and (eq_attr "type" "str")
98 (eq_attr "memory" "store")))
99 "geode_issue,geode_alu*2")
102 (define_insn_reservation "geode_unknown" 1
103 (and (eq_attr "cpu" "geode")
104 (eq_attr "type" "multi,other"))
105 "geode_issue,geode_alu")
109 (define_insn_reservation "geode_fop" 6
110 (and (eq_attr "cpu" "geode")
111 (eq_attr "type" "fop,fcmp"))
112 "geode_issue,geode_fpu*6")
114 (define_insn_reservation "geode_fsimple" 1
115 (and (eq_attr "cpu" "geode")
116 (eq_attr "type" "fmov,fcmov,fsgn,fxch"))
117 "geode_issue,geode_fpu")
119 (define_insn_reservation "geode_fist" 4
120 (and (eq_attr "cpu" "geode")
121 (eq_attr "type" "fistp,fisttp"))
122 "geode_issue,geode_fpu*4")
124 (define_insn_reservation "geode_fmul" 10
125 (and (eq_attr "cpu" "geode")
126 (eq_attr "type" "fmul"))
127 "geode_issue,geode_fpu*10")
129 (define_insn_reservation "geode_fdiv" 47
130 (and (eq_attr "cpu" "geode")
131 (eq_attr "type" "fdiv"))
132 "geode_issue,geode_fpu*47")
134 ;; We use minimal latency (fsin) here
135 (define_insn_reservation "geode_fpspc" 54
136 (and (eq_attr "cpu" "geode")
137 (eq_attr "type" "fpspc"))
138 "geode_issue,geode_fpu*54")
140 (define_insn_reservation "geode_frndint" 12
141 (and (eq_attr "cpu" "geode")
142 (eq_attr "type" "frndint"))
143 "geode_issue,geode_fpu*12")
145 (define_insn_reservation "geode_mmxmov" 1
146 (and (eq_attr "cpu" "geode")
147 (eq_attr "type" "mmxmov"))
148 "geode_issue,geode_fpu")
150 (define_insn_reservation "geode_mmx" 2
151 (and (eq_attr "cpu" "geode")
152 (eq_attr "type" "mmx,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft"))
153 "geode_issue,geode_fpu*2")