1 /* score-datadep.h -- Score Instructions data dependency table
2 Copyright 2006 Free Software Foundation, Inc.
4 Mei Ligang (ligang@sunnorth.com.cn)
5 Pei-Lin Tsai (pltsai@sunplus.com)
7 This file is part of GAS, the GNU Assembler.
9 GAS is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 GAS is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GAS; see the file COPYING. If not, write to the Free
21 Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
22 Boston, MA 02110-1301, USA. */
24 #ifndef SCORE_DATA_DEPENDENCY_H
25 #define SCORE_DATA_DEPENDENCY_H
27 #define INSN_NAME_LEN 16
29 enum insn_type_for_dependency
48 struct insn_to_dependency
51 enum insn_type_for_dependency type
;
54 struct data_dependency
56 enum insn_type_for_dependency pre_insn_type
;
58 enum insn_type_for_dependency cur_insn_type
;
62 int warn_or_error
; /* warning - 0; error - 1 */
65 static const struct insn_to_dependency insn_to_dependency_table
[] =
67 /* pce instruction. */
69 /* conditional branch instruction. */
100 {"bgtu!", D_cond_br
},
101 {"bleu!", D_cond_br
},
114 {"brgtu", D_cond_br
},
115 {"brleu", D_cond_br
},
126 {"brcsl", D_cond_br
},
127 {"brccl", D_cond_br
},
128 {"brgtul", D_cond_br
},
129 {"brleul", D_cond_br
},
130 {"breql", D_cond_br
},
131 {"brnel", D_cond_br
},
132 {"brgtl", D_cond_br
},
133 {"brlel", D_cond_br
},
134 {"brgel", D_cond_br
},
135 {"brltl", D_cond_br
},
136 {"brmil", D_cond_br
},
137 {"brpll", D_cond_br
},
138 {"brvsl", D_cond_br
},
139 {"brvcl", D_cond_br
},
140 {"brcs!", D_cond_br
},
141 {"brcc!", D_cond_br
},
142 {"brgtu!", D_cond_br
},
143 {"brleu!", D_cond_br
},
144 {"breq!", D_cond_br
},
145 {"brne!", D_cond_br
},
146 {"brgt!", D_cond_br
},
147 {"brle!", D_cond_br
},
148 {"brge!", D_cond_br
},
149 {"brlt!", D_cond_br
},
150 {"brmi!", D_cond_br
},
151 {"brpl!", D_cond_br
},
152 {"brvs!", D_cond_br
},
153 {"brvc!", D_cond_br
},
154 {"brcsl!", D_cond_br
},
155 {"brccl!", D_cond_br
},
156 {"brgtul!", D_cond_br
},
157 {"brleul!", D_cond_br
},
158 {"breql!", D_cond_br
},
159 {"brnel!", D_cond_br
},
160 {"brgtl!", D_cond_br
},
161 {"brlel!", D_cond_br
},
162 {"brgel!", D_cond_br
},
163 {"brltl!", D_cond_br
},
164 {"brmil!", D_cond_br
},
165 {"brpll!", D_cond_br
},
166 {"brvsl!", D_cond_br
},
167 {"brvcl!", D_cond_br
},
168 /* conditional move instruction. */
171 {"mvgtu", D_cond_mv
},
172 {"mvleu", D_cond_mv
},
183 /* move spectial instruction. */
186 {"mtptlb", D_mtptlb
},
187 {"mtrtlb", D_mtrtlb
},
191 /* cache instruction. */
192 {"cache 8", D_cached
},
193 {"cache 9", D_cached
},
194 {"cache 10", D_cached
},
195 {"cache 11", D_cached
},
196 {"cache 12", D_cached
},
197 {"cache 13", D_cached
},
198 {"cache 14", D_cached
},
199 {"cache 24", D_cached
},
200 {"cache 26", D_cached
},
201 {"cache 27", D_cached
},
202 {"cache 29", D_cached
},
203 {"cache 30", D_cached
},
204 {"cache 31", D_cached
},
205 {"cache 0", D_cachei
},
206 {"cache 1", D_cachei
},
207 {"cache 2", D_cachei
},
208 {"cache 3", D_cachei
},
209 {"cache 4", D_cachei
},
210 {"cache 16", D_cachei
},
211 {"cache 17", D_cachei
},
212 /* load/store instruction. */
248 /* load combine instruction. */
249 {"lcb", D_ldcombine
},
250 {"lcw", D_ldcombine
},
251 {"lce", D_ldcombine
},
254 static const struct data_dependency data_dependency_table
[] =
256 /* Condition register. */
257 {D_mtcr
, "cr1", D_pce
, "", 2, 1, 1},
258 {D_mtcr
, "cr1", D_cond_br
, "", 1, 0, 1},
259 {D_mtcr
, "cr1", D_cond_mv
, "", 1, 0, 1},
260 /* Status regiser. */
261 {D_mtcr
, "cr0", D_all_insn
, "", 5, 4, 0},
263 {D_mtcr
, "cr4", D_all_insn
, "", 6, 5, 0},
264 /* EntryHi/EntryLo register. */
265 {D_mftlb
, "", D_mtptlb
, "", 1, 1, 1},
266 {D_mftlb
, "", D_mtrtlb
, "", 1, 1, 1},
267 {D_mftlb
, "", D_stlb
, "", 1, 1,1},
268 {D_mftlb
, "", D_mfcr
, "cr11", 1, 1, 1},
269 {D_mftlb
, "", D_mfcr
, "cr12", 1, 1, 1},
270 /* Index register. */
271 {D_stlb
, "", D_mtptlb
, "", 1, 1, 1},
272 {D_stlb
, "", D_mftlb
, "", 1, 1, 1},
273 {D_stlb
, "", D_mfcr
, "cr8", 2, 2, 1},
275 {D_cached
, "", D_ldst
, "", 1, 1, 0},
276 {D_cached
, "", D_ldcombine
, "", 1, 1, 0},
277 {D_cachei
, "", D_all_insn
, "", 5, 4, 0},
279 {D_ldcombine
, "", D_mfsr
, "sr1", 3, 3, 1},