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

Subversion Repositories openrisc

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

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

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