Welcome to mirror list, hosted at ThFree Co, Russian Federation.

score-datadep.h « opcode « include - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8ef35adc807efb7cfd21a69b3beffcb674289742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
/* score-datadep.h -- Score Instructions data dependency table
   Copyright 2006 Free Software Foundation, Inc.
   Contributed by: 
   Mei Ligang (ligang@sunnorth.com.cn)
   Pei-Lin Tsai (pltsai@sunplus.com)

   This file is part of GAS, the GNU Assembler.

   GAS is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   GAS is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with GAS; see the file COPYING.  If not, write to the Free
   Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
   Boston, MA 02110-1301, USA.  */

#ifndef SCORE_DATA_DEPENDENCY_H
#define SCORE_DATA_DEPENDENCY_H

#define INSN_NAME_LEN 16

enum insn_type_for_dependency
{
  D_pce,
  D_cond_br,
  D_cond_mv,
  D_cached,
  D_cachei,
  D_ldst,
  D_ldcombine,
  D_mtcr,
  D_mfcr,
  D_mfsr,
  D_mftlb,
  D_mtptlb,
  D_mtrtlb,
  D_stlb,
  D_all_insn
};

struct insn_to_dependency
{
  char *insn_name;
  enum insn_type_for_dependency type;
};

struct data_dependency
{
  enum insn_type_for_dependency pre_insn_type;
  char pre_reg[6];
  enum insn_type_for_dependency cur_insn_type;
  char cur_reg[6];
  int bubblenum_7;
  int bubblenum_5;
  int warn_or_error;           /* warning - 0; error - 1  */
};

static const struct insn_to_dependency insn_to_dependency_table[] =
{
  /* pce instruction.  */
  {"pce",       D_pce},
  /* conditional branch instruction.  */
  {"bcs",       D_cond_br},
  {"bcc",       D_cond_br},
  {"bgtu",      D_cond_br},
  {"bleu",      D_cond_br},
  {"beq",       D_cond_br},
  {"bne",       D_cond_br},
  {"bgt",       D_cond_br},
  {"ble",       D_cond_br},
  {"bge",       D_cond_br},
  {"blt",       D_cond_br},
  {"bmi",       D_cond_br},
  {"bpl",       D_cond_br},
  {"bvs",       D_cond_br},
  {"bvc",       D_cond_br},
  {"bcsl",      D_cond_br},
  {"bccl",      D_cond_br},
  {"bgtul",     D_cond_br},
  {"bleul",     D_cond_br},
  {"beql",      D_cond_br},
  {"bnel",      D_cond_br},
  {"bgtl",      D_cond_br},
  {"blel",      D_cond_br},
  {"bgel",      D_cond_br},
  {"bltl",      D_cond_br},
  {"bmil",      D_cond_br},
  {"bpll",      D_cond_br},
  {"bvsl",      D_cond_br},
  {"bvcl",      D_cond_br},
  {"bcs!",      D_cond_br},
  {"bcc!",      D_cond_br},
  {"bgtu!",     D_cond_br},
  {"bleu!",     D_cond_br},
  {"beq!",      D_cond_br},
  {"bne!",      D_cond_br},
  {"bgt!",      D_cond_br},
  {"ble!",      D_cond_br},
  {"bge!",      D_cond_br},
  {"blt!",      D_cond_br},
  {"bmi!",      D_cond_br},
  {"bpl!",      D_cond_br},
  {"bvs!",      D_cond_br},
  {"bvc!",      D_cond_br},
  {"brcs",      D_cond_br},
  {"brcc",      D_cond_br},
  {"brgtu",     D_cond_br},
  {"brleu",     D_cond_br},
  {"breq",      D_cond_br},
  {"brne",      D_cond_br},
  {"brgt",      D_cond_br},
  {"brle",      D_cond_br},
  {"brge",      D_cond_br},
  {"brlt",      D_cond_br},
  {"brmi",      D_cond_br},
  {"brpl",      D_cond_br},
  {"brvs",      D_cond_br},
  {"brvc",      D_cond_br},
  {"brcsl",     D_cond_br},
  {"brccl",     D_cond_br},
  {"brgtul",    D_cond_br},
  {"brleul",    D_cond_br},
  {"breql",     D_cond_br},
  {"brnel",     D_cond_br},
  {"brgtl",     D_cond_br},
  {"brlel",     D_cond_br},
  {"brgel",     D_cond_br},
  {"brltl",     D_cond_br},
  {"brmil",     D_cond_br},
  {"brpll",     D_cond_br},
  {"brvsl",     D_cond_br},
  {"brvcl",     D_cond_br},
  {"brcs!",     D_cond_br},
  {"brcc!",     D_cond_br},
  {"brgtu!",    D_cond_br},
  {"brleu!",    D_cond_br},
  {"breq!",     D_cond_br},
  {"brne!",     D_cond_br},
  {"brgt!",     D_cond_br},
  {"brle!",     D_cond_br},
  {"brge!",     D_cond_br},
  {"brlt!",     D_cond_br},
  {"brmi!",     D_cond_br},
  {"brpl!",     D_cond_br},
  {"brvs!",     D_cond_br},
  {"brvc!",     D_cond_br},
  {"brcsl!",    D_cond_br},
  {"brccl!",    D_cond_br},
  {"brgtul!",   D_cond_br},
  {"brleul!",   D_cond_br},
  {"breql!",    D_cond_br},
  {"brnel!",    D_cond_br},
  {"brgtl!",    D_cond_br},
  {"brlel!",    D_cond_br},
  {"brgel!",    D_cond_br},
  {"brltl!",    D_cond_br},
  {"brmil!",    D_cond_br},
  {"brpll!",    D_cond_br},
  {"brvsl!",    D_cond_br},
  {"brvcl!",    D_cond_br},
  /* conditional move instruction.  */
  {"mvcs",      D_cond_mv},
  {"mvcc",      D_cond_mv},
  {"mvgtu",     D_cond_mv},
  {"mvleu",     D_cond_mv},
  {"mveq",      D_cond_mv},
  {"mvne",      D_cond_mv},
  {"mvgt",      D_cond_mv},
  {"mvle",      D_cond_mv},
  {"mvge",      D_cond_mv},
  {"mvlt",      D_cond_mv},
  {"mvmi",      D_cond_mv},
  {"mvpl",      D_cond_mv},
  {"mvvs",      D_cond_mv},
  {"mvvc",      D_cond_mv},
  /* move spectial instruction.  */
  {"mtcr",      D_mtcr},
  {"mftlb",     D_mftlb},
  {"mtptlb",    D_mtptlb},
  {"mtrtlb",    D_mtrtlb},
  {"stlb",      D_stlb},
  {"mfcr",      D_mfcr},
  {"mfsr",      D_mfsr},
  /* cache instruction.  */
  {"cache 8",   D_cached},
  {"cache 9",   D_cached},
  {"cache 10",  D_cached},
  {"cache 11",  D_cached},
  {"cache 12",  D_cached},
  {"cache 13",  D_cached},
  {"cache 14",  D_cached},
  {"cache 24",  D_cached},
  {"cache 26",  D_cached},
  {"cache 27",  D_cached},
  {"cache 29",  D_cached},
  {"cache 30",  D_cached},
  {"cache 31",  D_cached},
  {"cache 0",   D_cachei},
  {"cache 1",   D_cachei},
  {"cache 2",   D_cachei},
  {"cache 3",   D_cachei},
  {"cache 4",   D_cachei},
  {"cache 16",  D_cachei},
  {"cache 17",  D_cachei},
  /* load/store instruction.  */
  {"lb",        D_ldst},
  {"lbu",       D_ldst},
  {"lbu!",      D_ldst},
  {"lbup!",     D_ldst},
  {"lh",        D_ldst},
  {"lhu",       D_ldst},
  {"lh!",       D_ldst},
  {"lhp!",      D_ldst},
  {"lw",        D_ldst},
  {"lw!",       D_ldst},
  {"lwp!",      D_ldst},
  {"sb",        D_ldst},
  {"sb!",       D_ldst},
  {"sbp!",      D_ldst},
  {"sh",        D_ldst},
  {"sh!",       D_ldst},
  {"shp!",      D_ldst},
  {"sw",        D_ldst},
  {"sw!",       D_ldst},
  {"swp!",      D_ldst},
  {"alw",       D_ldst},
  {"asw",       D_ldst},
  {"push!",     D_ldst},
  {"pushhi!",   D_ldst},
  {"pop!",      D_ldst},
  {"pophi!",    D_ldst},
  {"ldc1",      D_ldst},
  {"ldc2",      D_ldst},
  {"ldc3",      D_ldst},
  {"stc1",      D_ldst},
  {"stc2",      D_ldst},
  {"stc3",      D_ldst},
  {"scb",       D_ldst},
  {"scw",       D_ldst},
  {"sce",       D_ldst},
  /* load combine instruction.  */
  {"lcb",       D_ldcombine},
  {"lcw",       D_ldcombine},
  {"lce",       D_ldcombine},
};

static const struct data_dependency data_dependency_table[] =
{
  /* Condition register.  */
  {D_mtcr, "cr1", D_pce, "", 2, 1, 1},
  {D_mtcr, "cr1", D_cond_br, "", 1, 0, 1},
  {D_mtcr, "cr1", D_cond_mv, "", 1, 0, 1},
  /* Status regiser.  */
  {D_mtcr, "cr0", D_all_insn, "", 5, 4, 0},
  /* CCR regiser.  */
  {D_mtcr, "cr4", D_all_insn, "", 6, 5, 0},
  /* EntryHi/EntryLo register.  */
  {D_mftlb, "", D_mtptlb, "", 1, 1, 1},
  {D_mftlb, "", D_mtrtlb, "", 1, 1, 1},
  {D_mftlb, "", D_stlb, "", 1, 1,1},
  {D_mftlb, "", D_mfcr, "cr11", 1, 1, 1},
  {D_mftlb, "", D_mfcr, "cr12", 1, 1, 1},
  /* Index register.  */
  {D_stlb, "", D_mtptlb, "", 1, 1, 1},
  {D_stlb, "", D_mftlb, "", 1, 1, 1},
  {D_stlb, "", D_mfcr, "cr8", 2, 2, 1},
  /* Cache.  */
  {D_cached, "", D_ldst, "", 1, 1, 0},
  {D_cached, "", D_ldcombine, "", 1, 1, 0},
  {D_cachei, "", D_all_insn, "", 5, 4, 0},
  /* Load combine.  */
  {D_ldcombine, "", D_mfsr, "sr1", 3, 3, 1},
};

#endif