OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [sh64/] [defs-media.h] - Blame information for rev 855

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
/* ISA definitions header for media.
2
 
3
THIS FILE IS MACHINE GENERATED WITH CGEN.
4
 
5
Copyright 1996-2005 Free Software Foundation, Inc.
6
 
7
This file is part of the GNU simulators.
8
 
9
This program 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 3 of the License, or
12
(at your option) any later version.
13
 
14
This program 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.
18
 
19
You should have received a copy of the GNU General Public License
20
along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
 
22
*/
23
 
24
#ifndef DEFS_SH64_MEDIA_H
25
#define DEFS_SH64_MEDIA_H
26
 
27
/* Instruction argument buffer.  */
28
 
29
union sem_fields {
30
  struct { /* no operands */
31
    int empty;
32
  } fmt_empty;
33
  struct { /*  */
34
    UINT f_dest;
35
    UINT f_uimm16;
36
  } sfmt_shori;
37
  struct { /*  */
38
    DI f_disp16;
39
    UINT f_tra;
40
  } sfmt_pta;
41
  struct { /*  */
42
    INT f_imm16;
43
    UINT f_dest;
44
  } sfmt_movi;
45
  struct { /*  */
46
    UINT f_dest;
47
    UINT f_left_right;
48
  } sfmt_fabsd;
49
  struct { /*  */
50
    UINT f_dest;
51
    UINT f_trb;
52
  } sfmt_blink;
53
  struct { /*  */
54
    INT f_imm6;
55
    UINT f_dest;
56
    UINT f_left;
57
  } sfmt_xori;
58
  struct { /*  */
59
    UINT f_dest;
60
    UINT f_left;
61
    UINT f_uimm6;
62
  } sfmt_shari;
63
  struct { /*  */
64
    INT f_imm10;
65
    UINT f_dest;
66
    UINT f_left;
67
  } sfmt_ori;
68
  struct { /*  */
69
    SI f_disp10x2;
70
    UINT f_dest;
71
    UINT f_left;
72
  } sfmt_lduw;
73
  struct { /*  */
74
    INT f_disp6;
75
    UINT f_dest;
76
    UINT f_left;
77
  } sfmt_getcfg;
78
  struct { /*  */
79
    SI f_disp10x4;
80
    UINT f_dest;
81
    UINT f_left;
82
  } sfmt_flds;
83
  struct { /*  */
84
    SI f_disp10x8;
85
    UINT f_dest;
86
    UINT f_left;
87
  } sfmt_fldd;
88
  struct { /*  */
89
    INT f_imm6;
90
    UINT f_left;
91
    UINT f_tra;
92
  } sfmt_beqi;
93
  struct { /*  */
94
    UINT f_left;
95
    UINT f_right;
96
    UINT f_tra;
97
  } sfmt_beq;
98
  struct { /*  */
99
    INT f_disp10;
100
    UINT f_dest;
101
    UINT f_left;
102
  } sfmt_addi;
103
  struct { /*  */
104
    UINT f_dest;
105
    UINT f_left;
106
    UINT f_right;
107
  } sfmt_add;
108
#if WITH_SCACHE_PBB
109
  /* Writeback handler.  */
110
  struct {
111
    /* Pointer to argbuf entry for insn whose results need writing back.  */
112
    const struct argbuf *abuf;
113
  } write;
114
  /* x-before handler */
115
  struct {
116
    /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
117
    int first_p;
118
  } before;
119
  /* x-after handler */
120
  struct {
121
    int empty;
122
  } after;
123
  /* This entry is used to terminate each pbb.  */
124
  struct {
125
    /* Number of insns in pbb.  */
126
    int insn_count;
127
    /* Next pbb to execute.  */
128
    SCACHE *next;
129
    SCACHE *branch_target;
130
  } chain;
131
#endif
132
};
133
 
134
/* The ARGBUF struct.  */
135
struct argbuf {
136
  /* These are the baseclass definitions.  */
137
  IADDR addr;
138
  const IDESC *idesc;
139
  char trace_p;
140
  char profile_p;
141
  /* ??? Temporary hack for skip insns.  */
142
  char skip_count;
143
  char unused;
144
  /* cpu specific data follows */
145
  union sem semantic;
146
  int written;
147
  union sem_fields fields;
148
};
149
 
150
/* A cached insn.
151
 
152
   ??? SCACHE used to contain more than just argbuf.  We could delete the
153
   type entirely and always just use ARGBUF, but for future concerns and as
154
   a level of abstraction it is left in.  */
155
 
156
struct scache {
157
  struct argbuf argbuf;
158
};
159
 
160
/* Macros to simplify extraction, reading and semantic code.
161
   These define and assign the local vars that contain the insn's fields.  */
162
 
163
#define EXTRACT_IFMT_EMPTY_VARS \
164
  unsigned int length;
165
#define EXTRACT_IFMT_EMPTY_CODE \
166
  length = 0; \
167
 
168
#define EXTRACT_IFMT_ADD_VARS \
169
  UINT f_op; \
170
  UINT f_left; \
171
  UINT f_ext; \
172
  UINT f_right; \
173
  UINT f_dest; \
174
  UINT f_rsvd; \
175
  unsigned int length;
176
#define EXTRACT_IFMT_ADD_CODE \
177
  length = 4; \
178
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
179
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
180
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
181
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
182
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
183
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
184
 
185
#define EXTRACT_IFMT_ADDI_VARS \
186
  UINT f_op; \
187
  UINT f_left; \
188
  INT f_disp10; \
189
  UINT f_dest; \
190
  UINT f_rsvd; \
191
  unsigned int length;
192
#define EXTRACT_IFMT_ADDI_CODE \
193
  length = 4; \
194
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
195
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
196
  f_disp10 = EXTRACT_MSB0_INT (insn, 32, 12, 10); \
197
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
198
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
199
 
200
#define EXTRACT_IFMT_ALLOCO_VARS \
201
  UINT f_op; \
202
  UINT f_left; \
203
  UINT f_ext; \
204
  SI f_disp6x32; \
205
  UINT f_dest; \
206
  UINT f_rsvd; \
207
  unsigned int length;
208
#define EXTRACT_IFMT_ALLOCO_CODE \
209
  length = 4; \
210
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
211
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
212
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
213
  f_disp6x32 = ((EXTRACT_MSB0_INT (insn, 32, 16, 6)) << (5)); \
214
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
215
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
216
 
217
#define EXTRACT_IFMT_BEQ_VARS \
218
  UINT f_op; \
219
  UINT f_left; \
220
  UINT f_ext; \
221
  UINT f_right; \
222
  UINT f_likely; \
223
  UINT f_23_2; \
224
  UINT f_tra; \
225
  UINT f_rsvd; \
226
  unsigned int length;
227
#define EXTRACT_IFMT_BEQ_CODE \
228
  length = 4; \
229
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
230
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
231
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
232
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
233
  f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
234
  f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
235
  f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
236
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
237
 
238
#define EXTRACT_IFMT_BEQI_VARS \
239
  UINT f_op; \
240
  UINT f_left; \
241
  UINT f_ext; \
242
  INT f_imm6; \
243
  UINT f_likely; \
244
  UINT f_23_2; \
245
  UINT f_tra; \
246
  UINT f_rsvd; \
247
  unsigned int length;
248
#define EXTRACT_IFMT_BEQI_CODE \
249
  length = 4; \
250
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
251
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
252
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
253
  f_imm6 = EXTRACT_MSB0_INT (insn, 32, 16, 6); \
254
  f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
255
  f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
256
  f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
257
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
258
 
259
#define EXTRACT_IFMT_BLINK_VARS \
260
  UINT f_op; \
261
  UINT f_6_3; \
262
  UINT f_trb; \
263
  UINT f_ext; \
264
  UINT f_right; \
265
  UINT f_dest; \
266
  UINT f_rsvd; \
267
  unsigned int length;
268
#define EXTRACT_IFMT_BLINK_CODE \
269
  length = 4; \
270
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
271
  f_6_3 = EXTRACT_MSB0_UINT (insn, 32, 6, 3); \
272
  f_trb = EXTRACT_MSB0_UINT (insn, 32, 9, 3); \
273
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
274
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
275
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
276
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
277
 
278
#define EXTRACT_IFMT_BRK_VARS \
279
  UINT f_op; \
280
  UINT f_left; \
281
  UINT f_ext; \
282
  UINT f_right; \
283
  UINT f_dest; \
284
  UINT f_rsvd; \
285
  unsigned int length;
286
#define EXTRACT_IFMT_BRK_CODE \
287
  length = 4; \
288
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
289
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
290
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
291
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
292
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
293
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
294
 
295
#define EXTRACT_IFMT_BYTEREV_VARS \
296
  UINT f_op; \
297
  UINT f_left; \
298
  UINT f_ext; \
299
  UINT f_right; \
300
  UINT f_dest; \
301
  UINT f_rsvd; \
302
  unsigned int length;
303
#define EXTRACT_IFMT_BYTEREV_CODE \
304
  length = 4; \
305
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
306
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
307
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
308
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
309
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
310
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
311
 
312
#define EXTRACT_IFMT_FABSD_VARS \
313
  UINT f_op; \
314
  UINT f_left; \
315
  UINT f_right; \
316
  UINT f_left_right; \
317
  UINT f_ext; \
318
  UINT f_dest; \
319
  UINT f_rsvd; \
320
  unsigned int length;
321
#define EXTRACT_IFMT_FABSD_CODE \
322
  length = 4; \
323
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
324
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
325
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
326
  f_left_right = f_left;\
327
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
328
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
329
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
330
 
331
#define EXTRACT_IFMT_FABSS_VARS \
332
  UINT f_op; \
333
  UINT f_left; \
334
  UINT f_right; \
335
  UINT f_left_right; \
336
  UINT f_ext; \
337
  UINT f_dest; \
338
  UINT f_rsvd; \
339
  unsigned int length;
340
#define EXTRACT_IFMT_FABSS_CODE \
341
  length = 4; \
342
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
343
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
344
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
345
  f_left_right = f_left;\
346
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
347
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
348
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
349
 
350
#define EXTRACT_IFMT_FADDD_VARS \
351
  UINT f_op; \
352
  UINT f_left; \
353
  UINT f_ext; \
354
  UINT f_right; \
355
  UINT f_dest; \
356
  UINT f_rsvd; \
357
  unsigned int length;
358
#define EXTRACT_IFMT_FADDD_CODE \
359
  length = 4; \
360
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
361
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
362
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
363
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
364
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
365
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
366
 
367
#define EXTRACT_IFMT_FADDS_VARS \
368
  UINT f_op; \
369
  UINT f_left; \
370
  UINT f_ext; \
371
  UINT f_right; \
372
  UINT f_dest; \
373
  UINT f_rsvd; \
374
  unsigned int length;
375
#define EXTRACT_IFMT_FADDS_CODE \
376
  length = 4; \
377
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
378
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
379
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
380
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
381
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
382
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
383
 
384
#define EXTRACT_IFMT_FCMPEQD_VARS \
385
  UINT f_op; \
386
  UINT f_left; \
387
  UINT f_ext; \
388
  UINT f_right; \
389
  UINT f_dest; \
390
  UINT f_rsvd; \
391
  unsigned int length;
392
#define EXTRACT_IFMT_FCMPEQD_CODE \
393
  length = 4; \
394
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
395
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
396
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
397
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
398
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
399
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
400
 
401
#define EXTRACT_IFMT_FCMPEQS_VARS \
402
  UINT f_op; \
403
  UINT f_left; \
404
  UINT f_ext; \
405
  UINT f_right; \
406
  UINT f_dest; \
407
  UINT f_rsvd; \
408
  unsigned int length;
409
#define EXTRACT_IFMT_FCMPEQS_CODE \
410
  length = 4; \
411
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
412
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
413
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
414
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
415
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
416
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
417
 
418
#define EXTRACT_IFMT_FCNVDS_VARS \
419
  UINT f_op; \
420
  UINT f_left; \
421
  UINT f_right; \
422
  UINT f_left_right; \
423
  UINT f_ext; \
424
  UINT f_dest; \
425
  UINT f_rsvd; \
426
  unsigned int length;
427
#define EXTRACT_IFMT_FCNVDS_CODE \
428
  length = 4; \
429
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
430
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
431
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
432
  f_left_right = f_left;\
433
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
434
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
435
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
436
 
437
#define EXTRACT_IFMT_FCNVSD_VARS \
438
  UINT f_op; \
439
  UINT f_left; \
440
  UINT f_right; \
441
  UINT f_left_right; \
442
  UINT f_ext; \
443
  UINT f_dest; \
444
  UINT f_rsvd; \
445
  unsigned int length;
446
#define EXTRACT_IFMT_FCNVSD_CODE \
447
  length = 4; \
448
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
449
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
450
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
451
  f_left_right = f_left;\
452
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
453
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
454
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
455
 
456
#define EXTRACT_IFMT_FGETSCR_VARS \
457
  UINT f_op; \
458
  UINT f_left; \
459
  UINT f_ext; \
460
  UINT f_right; \
461
  UINT f_dest; \
462
  UINT f_rsvd; \
463
  unsigned int length;
464
#define EXTRACT_IFMT_FGETSCR_CODE \
465
  length = 4; \
466
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
467
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
468
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
469
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
470
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
471
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
472
 
473
#define EXTRACT_IFMT_FIPRS_VARS \
474
  UINT f_op; \
475
  UINT f_left; \
476
  UINT f_ext; \
477
  UINT f_right; \
478
  UINT f_dest; \
479
  UINT f_rsvd; \
480
  unsigned int length;
481
#define EXTRACT_IFMT_FIPRS_CODE \
482
  length = 4; \
483
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
484
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
485
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
486
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
487
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
488
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
489
 
490
#define EXTRACT_IFMT_FLDD_VARS \
491
  UINT f_op; \
492
  UINT f_left; \
493
  SI f_disp10x8; \
494
  UINT f_dest; \
495
  UINT f_rsvd; \
496
  unsigned int length;
497
#define EXTRACT_IFMT_FLDD_CODE \
498
  length = 4; \
499
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
500
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
501
  f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3)); \
502
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
503
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
504
 
505
#define EXTRACT_IFMT_FLDP_VARS \
506
  UINT f_op; \
507
  UINT f_left; \
508
  SI f_disp10x8; \
509
  UINT f_dest; \
510
  UINT f_rsvd; \
511
  unsigned int length;
512
#define EXTRACT_IFMT_FLDP_CODE \
513
  length = 4; \
514
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
515
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
516
  f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3)); \
517
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
518
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
519
 
520
#define EXTRACT_IFMT_FLDS_VARS \
521
  UINT f_op; \
522
  UINT f_left; \
523
  SI f_disp10x4; \
524
  UINT f_dest; \
525
  UINT f_rsvd; \
526
  unsigned int length;
527
#define EXTRACT_IFMT_FLDS_CODE \
528
  length = 4; \
529
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
530
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
531
  f_disp10x4 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (2)); \
532
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
533
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
534
 
535
#define EXTRACT_IFMT_FLDXD_VARS \
536
  UINT f_op; \
537
  UINT f_left; \
538
  UINT f_ext; \
539
  UINT f_right; \
540
  UINT f_dest; \
541
  UINT f_rsvd; \
542
  unsigned int length;
543
#define EXTRACT_IFMT_FLDXD_CODE \
544
  length = 4; \
545
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
546
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
547
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
548
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
549
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
550
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
551
 
552
#define EXTRACT_IFMT_FLDXP_VARS \
553
  UINT f_op; \
554
  UINT f_left; \
555
  UINT f_ext; \
556
  UINT f_right; \
557
  UINT f_dest; \
558
  UINT f_rsvd; \
559
  unsigned int length;
560
#define EXTRACT_IFMT_FLDXP_CODE \
561
  length = 4; \
562
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
563
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
564
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
565
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
566
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
567
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
568
 
569
#define EXTRACT_IFMT_FMOVDQ_VARS \
570
  UINT f_op; \
571
  UINT f_left; \
572
  UINT f_right; \
573
  UINT f_left_right; \
574
  UINT f_ext; \
575
  UINT f_dest; \
576
  UINT f_rsvd; \
577
  unsigned int length;
578
#define EXTRACT_IFMT_FMOVDQ_CODE \
579
  length = 4; \
580
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
581
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
582
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
583
  f_left_right = f_left;\
584
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
585
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
586
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
587
 
588
#define EXTRACT_IFMT_FMOVLS_VARS \
589
  UINT f_op; \
590
  UINT f_left; \
591
  UINT f_ext; \
592
  UINT f_right; \
593
  UINT f_dest; \
594
  UINT f_rsvd; \
595
  unsigned int length;
596
#define EXTRACT_IFMT_FMOVLS_CODE \
597
  length = 4; \
598
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
599
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
600
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
601
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
602
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
603
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
604
 
605
#define EXTRACT_IFMT_FMOVSL_VARS \
606
  UINT f_op; \
607
  UINT f_left; \
608
  UINT f_right; \
609
  UINT f_left_right; \
610
  UINT f_ext; \
611
  UINT f_dest; \
612
  UINT f_rsvd; \
613
  unsigned int length;
614
#define EXTRACT_IFMT_FMOVSL_CODE \
615
  length = 4; \
616
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
617
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
618
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
619
  f_left_right = f_left;\
620
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
621
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
622
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
623
 
624
#define EXTRACT_IFMT_FPUTSCR_VARS \
625
  UINT f_op; \
626
  UINT f_left; \
627
  UINT f_right; \
628
  UINT f_left_right; \
629
  UINT f_ext; \
630
  UINT f_dest; \
631
  UINT f_rsvd; \
632
  unsigned int length;
633
#define EXTRACT_IFMT_FPUTSCR_CODE \
634
  length = 4; \
635
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
636
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
637
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
638
  f_left_right = f_left;\
639
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
640
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
641
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
642
 
643
#define EXTRACT_IFMT_FSTXD_VARS \
644
  UINT f_op; \
645
  UINT f_left; \
646
  UINT f_ext; \
647
  UINT f_right; \
648
  UINT f_dest; \
649
  UINT f_rsvd; \
650
  unsigned int length;
651
#define EXTRACT_IFMT_FSTXD_CODE \
652
  length = 4; \
653
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
654
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
655
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
656
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
657
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
658
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
659
 
660
#define EXTRACT_IFMT_FTRVS_VARS \
661
  UINT f_op; \
662
  UINT f_left; \
663
  UINT f_ext; \
664
  UINT f_right; \
665
  UINT f_dest; \
666
  UINT f_rsvd; \
667
  unsigned int length;
668
#define EXTRACT_IFMT_FTRVS_CODE \
669
  length = 4; \
670
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
671
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
672
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
673
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
674
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
675
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
676
 
677
#define EXTRACT_IFMT_GETCFG_VARS \
678
  UINT f_op; \
679
  UINT f_left; \
680
  UINT f_ext; \
681
  INT f_disp6; \
682
  UINT f_dest; \
683
  UINT f_rsvd; \
684
  unsigned int length;
685
#define EXTRACT_IFMT_GETCFG_CODE \
686
  length = 4; \
687
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
688
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
689
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
690
  f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6); \
691
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
692
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
693
 
694
#define EXTRACT_IFMT_GETCON_VARS \
695
  UINT f_op; \
696
  UINT f_left; \
697
  UINT f_ext; \
698
  UINT f_right; \
699
  UINT f_dest; \
700
  UINT f_rsvd; \
701
  unsigned int length;
702
#define EXTRACT_IFMT_GETCON_CODE \
703
  length = 4; \
704
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
705
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
706
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
707
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
708
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
709
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
710
 
711
#define EXTRACT_IFMT_LDL_VARS \
712
  UINT f_op; \
713
  UINT f_left; \
714
  SI f_disp10x4; \
715
  UINT f_dest; \
716
  UINT f_rsvd; \
717
  unsigned int length;
718
#define EXTRACT_IFMT_LDL_CODE \
719
  length = 4; \
720
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
721
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
722
  f_disp10x4 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (2)); \
723
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
724
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
725
 
726
#define EXTRACT_IFMT_LDQ_VARS \
727
  UINT f_op; \
728
  UINT f_left; \
729
  SI f_disp10x8; \
730
  UINT f_dest; \
731
  UINT f_rsvd; \
732
  unsigned int length;
733
#define EXTRACT_IFMT_LDQ_CODE \
734
  length = 4; \
735
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
736
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
737
  f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3)); \
738
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
739
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
740
 
741
#define EXTRACT_IFMT_MMACNFX_WL_VARS \
742
  UINT f_op; \
743
  UINT f_ext; \
744
  UINT f_right; \
745
  UINT f_right; \
746
  UINT f_dest; \
747
  UINT f_rsvd; \
748
  unsigned int length;
749
#define EXTRACT_IFMT_MMACNFX_WL_CODE \
750
  length = 4; \
751
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
752
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
753
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
754
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
755
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
756
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
757
 
758
#define EXTRACT_IFMT_MOVI_VARS \
759
  UINT f_op; \
760
  INT f_imm16; \
761
  UINT f_dest; \
762
  UINT f_rsvd; \
763
  unsigned int length;
764
#define EXTRACT_IFMT_MOVI_CODE \
765
  length = 4; \
766
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
767
  f_imm16 = EXTRACT_MSB0_INT (insn, 32, 6, 16); \
768
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
769
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
770
 
771
#define EXTRACT_IFMT_ORI_VARS \
772
  UINT f_op; \
773
  UINT f_left; \
774
  INT f_imm10; \
775
  UINT f_dest; \
776
  UINT f_rsvd; \
777
  unsigned int length;
778
#define EXTRACT_IFMT_ORI_CODE \
779
  length = 4; \
780
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
781
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
782
  f_imm10 = EXTRACT_MSB0_INT (insn, 32, 12, 10); \
783
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
784
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
785
 
786
#define EXTRACT_IFMT_PREFI_VARS \
787
  UINT f_op; \
788
  UINT f_left; \
789
  UINT f_ext; \
790
  SI f_disp6x32; \
791
  UINT f_right; \
792
  UINT f_rsvd; \
793
  unsigned int length;
794
#define EXTRACT_IFMT_PREFI_CODE \
795
  length = 4; \
796
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
797
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
798
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
799
  f_disp6x32 = ((EXTRACT_MSB0_INT (insn, 32, 16, 6)) << (5)); \
800
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
801
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
802
 
803
#define EXTRACT_IFMT_PTA_VARS \
804
  UINT f_op; \
805
  DI f_disp16; \
806
  UINT f_likely; \
807
  UINT f_23_2; \
808
  UINT f_tra; \
809
  UINT f_rsvd; \
810
  unsigned int length;
811
#define EXTRACT_IFMT_PTA_CODE \
812
  length = 4; \
813
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
814
  f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 6, 16)) << (2))) + (pc)); \
815
  f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
816
  f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
817
  f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
818
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
819
 
820
#define EXTRACT_IFMT_PTABS_VARS \
821
  UINT f_op; \
822
  UINT f_left; \
823
  UINT f_ext; \
824
  UINT f_right; \
825
  UINT f_likely; \
826
  UINT f_23_2; \
827
  UINT f_tra; \
828
  UINT f_rsvd; \
829
  unsigned int length;
830
#define EXTRACT_IFMT_PTABS_CODE \
831
  length = 4; \
832
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
833
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
834
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
835
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
836
  f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
837
  f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
838
  f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
839
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
840
 
841
#define EXTRACT_IFMT_PUTCON_VARS \
842
  UINT f_op; \
843
  UINT f_left; \
844
  UINT f_ext; \
845
  UINT f_right; \
846
  UINT f_dest; \
847
  UINT f_rsvd; \
848
  unsigned int length;
849
#define EXTRACT_IFMT_PUTCON_CODE \
850
  length = 4; \
851
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
852
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
853
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
854
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
855
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
856
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
857
 
858
#define EXTRACT_IFMT_SHARI_VARS \
859
  UINT f_op; \
860
  UINT f_left; \
861
  UINT f_ext; \
862
  UINT f_uimm6; \
863
  UINT f_dest; \
864
  UINT f_rsvd; \
865
  unsigned int length;
866
#define EXTRACT_IFMT_SHARI_CODE \
867
  length = 4; \
868
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
869
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
870
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
871
  f_uimm6 = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
872
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
873
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
874
 
875
#define EXTRACT_IFMT_SHORI_VARS \
876
  UINT f_op; \
877
  UINT f_uimm16; \
878
  UINT f_dest; \
879
  UINT f_rsvd; \
880
  unsigned int length;
881
#define EXTRACT_IFMT_SHORI_CODE \
882
  length = 4; \
883
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
884
  f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 6, 16); \
885
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
886
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
887
 
888
#define EXTRACT_IFMT_STW_VARS \
889
  UINT f_op; \
890
  UINT f_left; \
891
  SI f_disp10x2; \
892
  UINT f_dest; \
893
  UINT f_rsvd; \
894
  unsigned int length;
895
#define EXTRACT_IFMT_STW_CODE \
896
  length = 4; \
897
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
898
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
899
  f_disp10x2 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (1)); \
900
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
901
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
902
 
903
#define EXTRACT_IFMT_TRAPA_VARS \
904
  UINT f_op; \
905
  UINT f_left; \
906
  UINT f_ext; \
907
  UINT f_right; \
908
  UINT f_dest; \
909
  UINT f_rsvd; \
910
  unsigned int length;
911
#define EXTRACT_IFMT_TRAPA_CODE \
912
  length = 4; \
913
  f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
914
  f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
915
  f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
916
  f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
917
  f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
918
  f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
919
 
920
#endif /* DEFS_SH64_MEDIA_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.