summaryrefslogtreecommitdiff
path: root/backend/src/backend/gen8_instruction.hpp
blob: b3cbcbc0b57684c14c1a32e0d3152cce24e9f81e (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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
/*
 * Copyright © 2012 Intel Corporation
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 * Author: Rong Yang <rong.r.yang@intel.com>
 */

/*
 Copyright (C) Intel Corp.  2006.  All Rights Reserved.
 Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
 develop this 3D driver.

 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 "Software"), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:

 The above copyright notice and this permission notice (including the
 next paragraph) shall be included in all copies or substantial
 portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 **********************************************************************/
 /*
  * Authors:
  *   Keith Whitwell <keith@tungstengraphics.com>
  */

#ifndef __GEN8_INSTRUCTION_HPP__
#define __GEN8_INSTRUCTION_HPP__

union Gen8NativeInstruction
{
  struct {
    struct {
      uint32_t opcode:7;
      uint32_t pad:1;
      uint32_t access_mode:1;
      uint32_t dependency_control:2;
      uint32_t nib_ctrl:1;
      uint32_t quarter_control:2;
      uint32_t thread_control:2;
      uint32_t predicate_control:4;
      uint32_t predicate_inverse:1;
      uint32_t execution_size:3;
      uint32_t destreg_or_condmod:4;
      uint32_t acc_wr_control:1;
      uint32_t cmpt_control:1;
      uint32_t debug_control:1;
      uint32_t saturate:1;
    } header;

    union {
      struct {
        uint32_t flag_sub_reg_nr:1;
        uint32_t flag_reg_nr:1;
        uint32_t mask_control:1;
        uint32_t dest_reg_file:2;
        uint32_t dest_reg_type:4;
        uint32_t src0_reg_file:2;
        uint32_t src0_reg_type:4;
        uint32_t pad:1;
        uint32_t dest_subreg_nr:5;
        uint32_t dest_reg_nr:8;
        uint32_t dest_horiz_stride:2;
        uint32_t dest_address_mode:1;
      } da1;

      struct {
        uint32_t flag_sub_reg_nr:1;
        uint32_t flag_reg_nr:1;
        uint32_t mask_control:1;
        uint32_t dest_reg_file:2;
        uint32_t dest_reg_type:4;
        uint32_t src0_reg_file:2;
        uint32_t src0_reg_type:4;
        int dest_indirect_offset_9:1;      /* offset against the deref'd address reg bit9 */
        int dest_indirect_offset:9;        /* offset against the deref'd address reg bit0-8 */
        uint32_t dest_subreg_nr:4;         /* subnr for the address reg a0.x */
        uint32_t dest_horiz_stride:2;
        uint32_t dest_address_mode:1;
      } ia1;

      struct {
        uint32_t flag_sub_reg_nr:1;
        uint32_t flag_reg_nr:1;
        uint32_t mask_control:1;
        uint32_t dest_reg_file:2;
        uint32_t dest_reg_type:4;
        uint32_t src0_reg_file:2;
        uint32_t src0_reg_type:4;
        uint32_t pad:1;
        uint32_t dest_writemask:4;
        uint32_t dest_subreg_nr:1;
        uint32_t dest_reg_nr:8;
        uint32_t dest_horiz_stride:2;
        uint32_t dest_address_mode:1;
      } da16;

      struct {
        uint32_t flag_sub_reg_nr:1;
        uint32_t flag_reg_nr:1;
        uint32_t mask_control:1;
        uint32_t dest_reg_file:2;
        uint32_t dest_reg_type:4;
        uint32_t src0_reg_file:2;
        uint32_t src0_reg_type:4;
        int dest_indirect_offset_9:1;        /* offset against the deref'd address reg bit9 */
        uint32_t dest_writemask:4;
        int dest_indirect_offset:5;
        uint32_t dest_subreg_nr:3;
        uint32_t dest_horiz_stride:2;
        uint32_t dest_address_mode:1;
      } ia16;

      struct { // The sub reg field is reinterpreted as accumulator selector.
        uint32_t flag_sub_reg_nr:1;
        uint32_t flag_reg_nr:1;
        uint32_t mask_control:1;
        uint32_t dest_reg_file:2;
        uint32_t dest_reg_type:4;
        uint32_t src0_reg_file:2;
        uint32_t src0_reg_type:4;
        uint32_t pad:1;
        uint32_t dst_special_acc:4;
        uint32_t dest_subreg_nr:1;
        uint32_t dest_reg_nr:8;
        uint32_t reserved:2;
        uint32_t dest_address_mode:1;
      } da16acc;

      struct {
        uint32_t flag_sub_reg_nr:1;
        uint32_t flag_reg_nr:1;
        uint32_t mask_control:1;
        uint32_t src1_type:1;
        uint32_t src2_type:1;
        uint32_t src0_abs:1;
        uint32_t src0_negate:1;
        uint32_t src1_abs:1;
        uint32_t src1_negate:1;
        uint32_t src2_abs:1;
        uint32_t src2_negate:1;
        uint32_t src_type:3;
        uint32_t dest_type:3;
        uint32_t dest_writemask:4;
        uint32_t dest_subreg_nr:3;
        uint32_t dest_reg_nr:8;
      } da3src;

      struct {
        uint32_t flag_sub_reg_nr:1;
        uint32_t flag_reg_nr:1;
        uint32_t mask_control:1;
        uint32_t src1_type:1;
        uint32_t src2_type:1;
        uint32_t src0_abs:1;
        uint32_t src0_negate:1;
        uint32_t src1_abs:1;
        uint32_t src1_negate:1;
        uint32_t src2_abs:1;
        uint32_t src2_negate:1;
        uint32_t src_type:3;
        uint32_t dest_type:3;
        uint32_t dst_special_acc:4;
        uint32_t dest_subreg_nr:3;
        uint32_t dest_reg_nr:8;
      } da3srcacc;
    }bits1;

    union {
      struct {
        uint32_t src0_subreg_nr:5;
        uint32_t src0_reg_nr:8;
        uint32_t src0_abs:1;
        uint32_t src0_negate:1;
        uint32_t src0_address_mode:1;
        uint32_t src0_horiz_stride:2;
        uint32_t src0_width:3;
        uint32_t src0_vert_stride:4;
        uint32_t src1_reg_file:2;
        uint32_t src1_reg_type:4;
        uint32_t pad:1;
      } da1;

      struct {
        int src0_indirect_offset:9;
        uint32_t src0_subreg_nr:4;
        uint32_t src0_abs:1;
        uint32_t src0_negate:1;
        uint32_t src0_address_mode:1;
        uint32_t src0_horiz_stride:2;
        uint32_t src0_width:3;
        uint32_t src0_vert_stride:4;
        uint32_t src1_reg_file:2;
        uint32_t src1_reg_type:4;
        uint32_t src0_indirect_offset_9:1;
      } ia1;

      struct {
        uint32_t src0_swz_x:2;
        uint32_t src0_swz_y:2;
        uint32_t src0_subreg_nr:1;
        uint32_t src0_reg_nr:8;
        uint32_t src0_abs:1;
        uint32_t src0_negate:1;
        uint32_t src0_address_mode:1;
        uint32_t src0_swz_z:2;
        uint32_t src0_swz_w:2;
        uint32_t pad0:1;
        uint32_t src0_vert_stride:4;
        uint32_t src1_reg_file:2;
        uint32_t src1_reg_type:4;
        uint32_t pad:1;
      } da16;

      struct {
        uint32_t src0_swz_x:2;
        uint32_t src0_swz_y:2;
        int src0_indirect_offset:5;
        uint32_t src0_subreg_nr:4;
        uint32_t src0_abs:1;
        uint32_t src0_negate:1;
        uint32_t src0_address_mode:1;
        uint32_t src0_swz_z:2;
        uint32_t src0_swz_w:2;
        uint32_t pad0:1;
        uint32_t src0_vert_stride:4;
        uint32_t src1_reg_file:2;
        uint32_t src1_reg_type:4;
        uint32_t src0_indirect_offset_9:1;
      } ia16;

      struct {
        uint32_t src0_special_acc_lo:4;
        uint32_t src0_subreg_nr:1;
        uint32_t src0_reg_nr:8;
        uint32_t src0_abs:1;
        uint32_t src0_negate:1;
        uint32_t src0_address_mode:1;
        uint32_t src0_special_acc_hi:4;
        uint32_t pad0:1;
        uint32_t src0_vert_stride:4;
        uint32_t src1_reg_file:2;
        uint32_t src1_reg_type:4;
        uint32_t pad:1;
      } da16acc;

      struct {
        uint32_t src0_rep_ctrl:1;
        uint32_t src0_swizzle:8;
        uint32_t src0_subreg_nr:3;
        uint32_t src0_reg_nr:8;
        uint32_t src0_subreg_nr_w:1;
        uint32_t src1_rep_ctrl:1;
        uint32_t src1_swizzle:8;
        uint32_t src1_subreg_nr_low:2;
      } da3src;

      struct {
        uint32_t src0_rep_ctrl:1;
        uint32_t src0_special_acc:8;
        uint32_t src0_subreg_nr:3;
        uint32_t src0_reg_nr:8;
        uint32_t src0_subreg_nr_w:1;
        uint32_t src1_rep_ctrl:1;
        uint32_t src1_special_acc:8;
        uint32_t src1_subreg_nr_low:2;
      } da3srcacc;

      struct {
        uint32_t uip:32;
      } gen8_branch;

      uint32_t ud;
    } bits2;

    union {
      struct {
        uint32_t src1_subreg_nr:5;
        uint32_t src1_reg_nr:8;
        uint32_t src1_abs:1;
        uint32_t src1_negate:1;
        uint32_t src1_address_mode:1;
        uint32_t src1_horiz_stride:2;
        uint32_t src1_width:3;
        uint32_t src1_vert_stride:4;
        uint32_t pad0:7;
      } da1;

      struct {
        uint32_t src1_swz_x:2;
        uint32_t src1_swz_y:2;
        uint32_t src1_subreg_nr:1;
        uint32_t src1_reg_nr:8;
        uint32_t src1_abs:1;
        uint32_t src1_negate:1;
        uint32_t src1_address_mode:1;
        uint32_t src1_swz_z:2;
        uint32_t src1_swz_w:2;
        uint32_t pad1:1;
        uint32_t src1_vert_stride:4;
        uint32_t pad2:7;
      } da16;

      struct {
        int  src1_indirect_offset:9;
        uint32_t src1_subreg_nr:4;
        uint32_t src1_abs:1;
        uint32_t src1_negate:1;
        uint32_t src1_address_mode:1;
        uint32_t src1_horiz_stride:2;
        uint32_t src1_width:3;
        uint32_t src1_vert_stride:4;
        int  src1_indirect_offset_9:1;
        uint32_t pad1:6;
      } ia1;

      struct {
        uint32_t src1_swz_x:2;
        uint32_t src1_swz_y:2;
        int  src1_indirect_offset:5;
        uint32_t src1_subreg_nr:4;
        uint32_t src1_abs:1;
        uint32_t src1_negate:1;
        uint32_t src1_address_mode:1;
        uint32_t src1_swz_z:2;
        uint32_t src1_swz_w:2;
        uint32_t pad1:1;
        uint32_t src1_vert_stride:4;
        int  src1_indirect_offset_9:1;
        uint32_t pad2:6;
      } ia16;

      struct {
        uint32_t src1_special_acc_lo:4;
        uint32_t src1_subreg_nr:1;
        uint32_t src1_reg_nr:8;
        uint32_t src1_abs:1;
        uint32_t src1_negate:1;
        uint32_t src1_address_mode:1;
        uint32_t src1_special_acc_hi:4;
        uint32_t pad1:1;
        uint32_t src1_vert_stride:4;
        uint32_t pad2:7;
      } da16acc;

      struct {
        uint32_t function_control:19;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad1:2;
        uint32_t end_of_thread:1;
      } generic_gen5;

      struct {
        uint32_t sub_function_id:3;
        uint32_t pad0:11;
        uint32_t ack_req:1;
        uint32_t notify:2;
        uint32_t pad1:2;
        uint32_t header:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } msg_gateway;

      struct {
        uint32_t opcode:1;
        uint32_t request:1;
        uint32_t pad0:2;
        uint32_t resource:1;
        uint32_t pad1:14;
        uint32_t header:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } spawner_gen5;

      /** Ironlake PRM, Volume 4 Part 1, Section 6.1.1.1 */
      struct {
        uint32_t function:4;
        uint32_t int_type:1;
        uint32_t precision:1;
        uint32_t saturate:1;
        uint32_t data_type:1;
        uint32_t snapshot:1;
        uint32_t pad0:10;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad1:2;
        uint32_t end_of_thread:1;
      } math_gen5;

      struct {
        uint32_t bti:8;
        uint32_t sampler:4;
        uint32_t msg_type:5;
        uint32_t simd_mode:2;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad1:2;
        uint32_t end_of_thread:1;
      } sampler_gen7;

      /**
       * Message for the Sandybridge Sampler Cache or Constant Cache Data Port.
       *
       * See the Sandybridge PRM, Volume 4 Part 1, Section 3.9.2.1.1.
       **/
      struct {
        uint32_t bti:8;
        uint32_t msg_control:5;
        uint32_t msg_type:3;
        uint32_t pad0:3;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad1:2;
        uint32_t end_of_thread:1;
      } gen6_dp_sampler_const_cache;

      /*! Data port untyped read / write messages */
      struct {
        uint32_t bti:8;
        uint32_t rgba:4;
        uint32_t simd_mode:2;
        uint32_t msg_type:4;
        uint32_t category:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen7_untyped_rw;

      /*! Data port byte scatter / gather */
      struct {
        uint32_t bti:8;
        uint32_t simd_mode:1;
        uint32_t ignored0:1;
        uint32_t data_size:2;
        uint32_t ignored1:2;
        uint32_t msg_type:4;
        uint32_t category:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen7_byte_rw;

      /*! Data port Scratch Read/ write */
      struct {
        uint32_t offset:12;
        uint32_t block_size:2;
        uint32_t ignored0:1;
        uint32_t invalidate_after_read:1;
        uint32_t channel_mode:1;
        uint32_t msg_type:1;
        uint32_t category:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen7_scratch_rw;

      /*! Data port OBlock read / write */
      struct {
        uint32_t bti:8;
        uint32_t block_size:3;
        uint32_t ignored:2;
        uint32_t invalidate_after_read:1;
        uint32_t msg_type:4;
        uint32_t category:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen7_oblock_rw;

      /*! Data port dword scatter / gather */
      struct {
        uint32_t bti:8;
        uint32_t block_size:2;
        uint32_t ignored0:3;
        uint32_t invalidate_after_read:1;
        uint32_t msg_type:4;
        uint32_t ignored1:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen7_dword_rw;

      /*! Data port typed read / write messages */
      struct {
        uint32_t bti:8;
        uint32_t chan_mask:4;
        uint32_t slot:2;
        uint32_t msg_type:4;
        uint32_t pad2:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad3:2;
        uint32_t end_of_thread:1;
      } gen7_typed_rw;

      /*! Memory fence */
      struct {
        uint32_t bti:8;
        uint32_t pad:5;
        uint32_t commit_enable:1;
        uint32_t msg_type:4;
        uint32_t pad2:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad3:2;
        uint32_t end_of_thread:1;
      } gen7_memory_fence;

      /*! atomic messages */
      struct {
        uint32_t bti:8;
        uint32_t aop_type:4;
        uint32_t simd_mode:1;
        uint32_t return_data:1;
        uint32_t msg_type:4;
        uint32_t category:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad3:2;
        uint32_t end_of_thread:1;
      } gen7_atomic_op;

      /*! atomic a64 messages */
      struct {
        uint32_t bti:8;
        uint32_t aop_type:4;
        uint32_t data_size:1;
        uint32_t return_data:1;
        uint32_t msg_type:5;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad3:2;
        uint32_t end_of_thread:1;
      } gen8_atomic_a64;

      // gen8 untyped read/write
      struct {
        uint32_t bti:8;
        uint32_t rgba:4;
        uint32_t simd_mode:2;
        uint32_t msg_type:5;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen8_untyped_rw_a64;

      struct {
        uint32_t bti:8;
        uint32_t block_sz:2; // 00 byte 01 dword
        uint32_t data_sz:2; // 0 ->1block 1->2block
        uint32_t ignored:2;
        uint32_t msg_type:5;  // 10000 scatter read,  11010 scatter write 11001 a64 untyped write
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen8_scatter_rw_a64;

      struct {
        uint32_t src1_subreg_nr_high:1;
        uint32_t src1_reg_nr:8;
        uint32_t src1_subreg_nr_w:1;
        uint32_t src2_rep_ctrl:1;
        uint32_t src2_swizzle:8;
        uint32_t src2_subreg_nr:3;
        uint32_t src2_reg_nr:8;
        uint32_t src2_subreg_nr_w:1;
        uint32_t pad:1;
      } da3src;

      struct {
        uint32_t src1_subreg_nr_high:1;
        uint32_t src1_reg_nr:8;
        uint32_t src1_subreg_nr_w:1;
        uint32_t src2_rep_ctrl:1;
        uint32_t src2_special_acc:8;
        uint32_t src2_subreg_nr:3;
        uint32_t src2_reg_nr:8;
        uint32_t src2_subreg_nr_w:1;
        uint32_t pad:1;
      } da3srcacc;

      /*! Message gateway */
      struct {
        uint32_t subfunc:3;
        uint32_t pad:11;
        uint32_t ackreq:1;
        uint32_t notify:2;
        uint32_t pad2:2;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad3:2;
        uint32_t end_of_thread:1;
      } gen7_msg_gw;

    struct {
        uint32_t bti:8;
        uint32_t block_size:3; // oword size
        uint32_t msg_sub_type:2; // 00 OWord block R/W 01 Unaligned OWord block read 10 Oword Dual Block R/W 11 HWord Block R/W
        uint32_t ignored:1;
        uint32_t msg_type:5;  // 10100 A64 block read,  10101 A64 block write
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen8_block_rw_a64;

      struct {
        uint32_t jip:32;
      } gen8_branch;

      /*! Data port Media block read / write */
      struct {
        uint32_t bti:8;
        uint32_t ver_line_stride_offset:1;
        uint32_t ver_line_stride:1;
        uint32_t ver_line_stride_override:1;
        uint32_t ignored:3;
        uint32_t msg_type:4;
        uint32_t category:1;
        uint32_t header_present:1;
        uint32_t response_length:5;
        uint32_t msg_length:4;
        uint32_t pad2:2;
        uint32_t end_of_thread:1;
      } gen7_mblock_rw;

      int d;
      uint32_t ud;
      float f;
    } bits3;
  };
};
#endif