• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2013 Vadim Girlin <vadimgirlin@gmail.com>
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21 * USE OR OTHER DEALINGS IN THE SOFTWARE.
22 *
23 * Authors:
24 *      Vadim Girlin
25 */
26
27// TODO add all formats
28
29// CF
30
31BC_FORMAT_BEGIN_HW(CF_WORD0, R6R7)
32BC_FIELD(CF_WORD0,      ADDR,               ADDR,       31, 0)
33BC_FORMAT_END(CF_WORD0)
34
35BC_FORMAT_BEGIN_HW(CF_WORD0, EGCM)
36BC_FIELD(CF_WORD0,      ADDR,               ADDR,       23, 0)
37BC_FIELD(CF_WORD0,      JUMPTABLE_SEL,      JTS,        26, 24)
38BC_RSRVD(CF_WORD0,                                      31, 27)
39BC_FORMAT_END(CF_WORD0)
40
41
42BC_FORMAT_BEGIN_HW(CF_GWS_WORD0, EGCM)
43BC_FIELD(CF_GWS_WORD0,  VALUE,              VAL,        9,  0)
44BC_RSRVD(CF_GWS_WORD0,                                  15, 10)
45BC_FIELD(CF_GWS_WORD0,  RESOURCE,           RSRC,       20, 16)
46BC_RSRVD(CF_GWS_WORD0,                                  24, 21)
47BC_FIELD(CF_GWS_WORD0,  SIGN,               SIGN,       25, 25)
48BC_FIELD(CF_GWS_WORD0,  VAL_INDEX_MODE,     VIM,        27, 26)
49BC_FIELD(CF_GWS_WORD0,  RSRC_INDEX_MODE,    RIM,        29, 28)
50BC_FIELD(CF_GWS_WORD0,  GWS_OPCODE,         GWS_OP,     31, 30)
51BC_FORMAT_END(CF_GWS_WORD0)
52
53
54BC_FORMAT_BEGIN_HW(CF_WORD1, R6R7)
55BC_FIELD(CF_WORD1,      POP_COUNT,          PC,         2,  0)
56BC_FIELD(CF_WORD1,      CF_CONST,           CF_CONST,   7,  3)
57BC_FIELD(CF_WORD1,      COND,               COND,       9,  8)
58BC_FIELD(CF_WORD1,      COUNT,              COUNT,      12, 10)
59BC_FIELD(CF_WORD1,      CALL_COUNT,         CALL_CNT,   18, 13)
60BC_FIELD(CF_WORD1,      COUNT_3,            COUNT_3,    19, 19)
61BC_RSRVD(CF_WORD1,                                      20, 20)
62BC_FIELD(CF_WORD1,      END_OF_PROGRAM,     EOP,        21, 21)
63BC_FIELD(CF_WORD1,      VALID_PIXEL_MODE,   VPM,        22, 22)
64BC_FIELD(CF_WORD1,      CF_INST,            CF_INST,    29, 23)
65BC_FIELD(CF_WORD1,      WHOLE_QUAD_MODE,    WQM,        30, 30)
66BC_FIELD(CF_WORD1,      BARRIER,            B,          31, 31)
67BC_FORMAT_END(CF_WORD1)
68
69BC_FORMAT_BEGIN_HW(CF_WORD1, EG)
70BC_FIELD(CF_WORD1,      POP_COUNT,          PC,         2,  0)
71BC_FIELD(CF_WORD1,      CF_CONST,           CF_CONST,   7,  3)
72BC_FIELD(CF_WORD1,      COND,               COND,       9,  8)
73BC_FIELD(CF_WORD1,      COUNT,              COUNT,      15, 10)
74BC_RSRVD(CF_WORD1,                                      19, 16)
75BC_FIELD(CF_WORD1,      VALID_PIXEL_MODE,   VPM,        20, 20)
76BC_FIELD(CF_WORD1,      END_OF_PROGRAM,     EOP,        21, 21)
77BC_FIELD(CF_WORD1,      CF_INST,            CF_INST,    29, 22)
78BC_FIELD(CF_WORD1,      WHOLE_QUAD_MODE,    WQM,        30, 30)
79BC_FIELD(CF_WORD1,      BARRIER,            B,          31, 31)
80BC_FORMAT_END(CF_WORD1)
81
82BC_FORMAT_BEGIN_HW(CF_WORD1, CM)
83BC_FIELD(CF_WORD1,      POP_COUNT,          PC,         2,  0)
84BC_FIELD(CF_WORD1,      CF_CONST,           CF_CONST,   7,  3)
85BC_FIELD(CF_WORD1,      COND,               COND,       9,  8)
86BC_FIELD(CF_WORD1,      COUNT,              COUNT,      15, 10)
87BC_RSRVD(CF_WORD1,                                      19, 16)
88BC_FIELD(CF_WORD1,      VALID_PIXEL_MODE,   VPM,        20, 20)
89BC_RSRVD(CF_WORD1,                                      21, 21)
90BC_FIELD(CF_WORD1,      CF_INST,            CF_INST,    29, 22)
91BC_RSRVD(CF_WORD1,                                      30, 30)
92BC_FIELD(CF_WORD1,      BARRIER,            B,          31, 31)
93BC_FORMAT_END(CF_WORD1)
94
95
96BC_FORMAT_BEGIN(CF_ALU_WORD0)
97BC_FIELD(CF_ALU_WORD0,  ADDR,               ADDR,       21, 0)
98BC_FIELD(CF_ALU_WORD0,  KCACHE_BANK0,       KB0,        25, 22)
99BC_FIELD(CF_ALU_WORD0,  KCACHE_BANK1,       KB1,        29, 26)
100BC_FIELD(CF_ALU_WORD0,  KCACHE_MODE0,       KM0,        31, 30)
101BC_FORMAT_END(CF_ALU_WORD0)
102
103BC_FORMAT_BEGIN_HW(CF_ALU_WORD1, R6)
104BC_FIELD(CF_ALU_WORD1,  KCACHE_MODE1,       KM1,        1,  0)
105BC_FIELD(CF_ALU_WORD1,  KCACHE_ADDR0,       KA0,        9,  2)
106BC_FIELD(CF_ALU_WORD1,  KCACHE_ADDR1,       KA1,        17, 10)
107BC_FIELD(CF_ALU_WORD1,  COUNT,              COUNT,      24, 18)
108BC_FIELD(CF_ALU_WORD1,  USES_WATERFALL,     UW,         25, 25)
109BC_FIELD(CF_ALU_WORD1,  CF_INST,            CF_INST,    29, 26)
110BC_FIELD(CF_ALU_WORD1,  WHOLE_QUAD_MODE,    WQM,        30, 30)
111BC_FIELD(CF_ALU_WORD1,  BARRIER,            B,          31, 31)
112BC_FORMAT_END(CF_ALU_WORD1)
113
114BC_FORMAT_BEGIN_HW(CF_ALU_WORD1, R7EGCM)
115BC_FIELD(CF_ALU_WORD1,  KCACHE_MODE1,       KM1,        1,  0)
116BC_FIELD(CF_ALU_WORD1,  KCACHE_ADDR0,       KA0,        9,  2)
117BC_FIELD(CF_ALU_WORD1,  KCACHE_ADDR1,       KA1,        17, 10)
118BC_FIELD(CF_ALU_WORD1,  COUNT,              COUNT,      24, 18)
119BC_FIELD(CF_ALU_WORD1,  ALT_CONST,          ALT_C,      25, 25)
120BC_FIELD(CF_ALU_WORD1,  CF_INST,            CF_INST,    29, 26)
121BC_FIELD(CF_ALU_WORD1,  WHOLE_QUAD_MODE,    WQM,        30, 30)
122BC_FIELD(CF_ALU_WORD1,  BARRIER,            B,          31, 31)
123BC_FORMAT_END(CF_ALU_WORD1)
124
125
126BC_FORMAT_BEGIN_HW(CF_ALU_WORD0_EXT, EGCM)
127BC_RSRVD(CF_ALU_WORD0_EXT,                                          3,  0)
128BC_FIELD(CF_ALU_WORD0_EXT,  KCACHE_BANK_INDEX_MODE0,    KBIM0,      5,  4)
129BC_FIELD(CF_ALU_WORD0_EXT,  KCACHE_BANK_INDEX_MODE1,    KBIM1,      7,  6)
130BC_FIELD(CF_ALU_WORD0_EXT,  KCACHE_BANK_INDEX_MODE2,    KBIM2,      9,  8)
131BC_FIELD(CF_ALU_WORD0_EXT,  KCACHE_BANK_INDEX_MODE3,    KBIM3,      11, 10)
132BC_RSRVD(CF_ALU_WORD0_EXT,                                          21, 12)
133BC_FIELD(CF_ALU_WORD0_EXT,  KCACHE_BANK2,               KB2,        25, 22)
134BC_FIELD(CF_ALU_WORD0_EXT,  KCACHE_BANK3,               KB3,        29, 26)
135BC_FIELD(CF_ALU_WORD0_EXT,  KCACHE_MODE2,               KM2,        31, 30)
136BC_FORMAT_END(CF_ALU_WORD0_EXT)
137
138BC_FORMAT_BEGIN_HW(CF_ALU_WORD1_EXT, EGCM)
139BC_FIELD(CF_ALU_WORD1_EXT,  KCACHE_MODE3,       KM3,        1,  0)
140BC_FIELD(CF_ALU_WORD1_EXT,  KCACHE_ADDR2,       KA2,        9,  2)
141BC_FIELD(CF_ALU_WORD1_EXT,  KCACHE_ADDR3,       KA3,        17, 10)
142BC_RSRVD(CF_ALU_WORD1_EXT,                                  25, 18)
143BC_FIELD(CF_ALU_WORD1_EXT,  CF_INST,            CF_INST,    29, 26)
144BC_RSRVD(CF_ALU_WORD1_EXT,                                  30, 30)
145BC_FIELD(CF_ALU_WORD1_EXT,  BARRIER,            B,          31, 31)
146BC_FORMAT_END(CF_ALU_WORD1_EXT)
147
148
149BC_FORMAT_BEGIN(CF_ALLOC_EXPORT_WORD0)
150BC_FIELD(CF_ALLOC_EXPORT_WORD0, ARRAY_BASE,     ARR_BS,     12, 0)
151BC_FIELD(CF_ALLOC_EXPORT_WORD0, TYPE,           TYPE,       14, 13)
152BC_FIELD(CF_ALLOC_EXPORT_WORD0, RW_GPR,         RW_GPR,     21, 15)
153BC_FIELD(CF_ALLOC_EXPORT_WORD0, RW_REL,         RW_REL,     22, 22)
154BC_FIELD(CF_ALLOC_EXPORT_WORD0, INDEX_GPR,      IND_GPR,    29, 23)
155BC_FIELD(CF_ALLOC_EXPORT_WORD0, ELEM_SIZE,      ES,         31, 30)
156BC_FORMAT_END(CF_ALLOC_EXPORT_WORD0)
157
158BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD0_RAT, EGCM)
159BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, RAT_ID,         R_ID,       3,  0)
160BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, RAT_INST,       R_INST,     9,  4)
161BC_RSRVD(CF_ALLOC_EXPORT_WORD0_RAT,                             10, 10)
162BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, RAT_INDEX_MODE, RIM,        12, 11)
163BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, TYPE,           TYPE,       14, 13)
164BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, RW_GPR,         RW_GPR,     21, 15)
165BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, RW_REL,         RW_REL,     22, 22)
166BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, INDEX_GPR,      IND_GPR,    29, 23)
167BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, ELEM_SIZE,      ES,         31, 30)
168BC_FORMAT_END(CF_ALLOC_EXPORT_WORD0_RAT)
169
170BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_BUF, R6R7)
171BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARR_SIZE,           ARR_SZ,     11, 0)
172BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, COMP_MASK,          MASK,       15, 12)
173BC_RSRVD(CF_ALLOC_EXPORT_WORD1_BUF,                                 16, 16)
174BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BURST_COUNT,        BURST,      20, 17)
175BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, END_OF_PROGRAM,     EOP,        21, 21)
176BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, VALID_PIXEL_MODE,   VPM,        22, 22)
177BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, CF_INST,            CF_INST,    29, 23)
178BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, WHOLE_QUAD_MODE,    WQM,        30, 30)
179BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BARRIER,            B,          31, 31)
180BC_FORMAT_END(CF_ALLOC_EXPORT_WORD1_BUF)
181
182BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_BUF, EG)
183BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARR_SIZE,           ARR_SZ,     11, 0)
184BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, COMP_MASK,          MASK,       15, 12)
185BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BURST_COUNT,        BURST,      19, 16)
186BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, VALID_PIXEL_MODE,   VPM,        20, 20)
187BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, END_OF_PROGRAM,     EOP,        21, 21)
188BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, CF_INST,            CF_INST,    29, 22)
189BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, MARK,               MARK,       30, 30)
190BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BARRIER,            B,          31, 31)
191BC_FORMAT_END(CF_ALLOC_EXPORT_WORD1_BUF)
192
193BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_BUF, CM)
194BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARR_SIZE,           ARR_SZ,     11, 0)
195BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, COMP_MASK,          MASK,       15, 12)
196BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BURST_COUNT,        BURST,      19, 16)
197BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, VALID_PIXEL_MODE,   VPM,        20, 20)
198BC_RSRVD(CF_ALLOC_EXPORT_WORD1_BUF,                                 21, 21)
199BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, CF_INST,            CF_INST,    29, 22)
200BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, MARK,               MARK,       30, 30)
201BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BARRIER,            B,          31, 31)
202BC_FORMAT_END(CF_ALLOC_EXPORT_WORD1_BUF)
203
204BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_SWIZ, R6R7)
205BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_X,              SEL_X,      2,  0)
206BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_Y,              SEL_Y,      5,  3)
207BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_Z,              SEL_Z,      8,  6)
208BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_W,              SEL_W,      11, 9)
209BC_RSRVD(CF_ALLOC_EXPORT_WORD1_SWIZ,                                    16, 12)
210BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    BURST_COUNT,        BURST,      20, 17)
211BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    END_OF_PROGRAM,     EOP,        21, 21)
212BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    VALID_PIXEL_MODE,   VPM,        22, 22)
213BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    CF_INST,            CF_INST,    29, 23)
214BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    WHOLE_QUAD_MODE,    WQM,        30, 30)
215BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    BARRIER,            B,          31, 31)
216BC_FORMAT_END(CF_ALLOC_EXPORT_WORD1_SWIZ)
217
218BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_SWIZ, EG)
219BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_X,              SEL_X,      2,  0)
220BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_Y,              SEL_Y,      5,  3)
221BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_Z,              SEL_Z,      8,  6)
222BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_W,              SEL_W,      11, 9)
223BC_RSRVD(CF_ALLOC_EXPORT_WORD1_SWIZ,                                    15, 12)
224BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    BURST_COUNT,        BURST,      19, 16)
225BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    VALID_PIXEL_MODE,   VPM,        20, 20)
226BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    END_OF_PROGRAM,     EOP,        21, 21)
227BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    CF_INST,            CF_INST,    29, 22)
228BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    MARK,               M,          30, 30)
229BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    BARRIER,            B,          31, 31)
230BC_FORMAT_END(CF_ALLOC_EXPORT_WORD1_SWIZ)
231
232BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_SWIZ, CM)
233BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_X,              SEL_X,      2,  0)
234BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_Y,              SEL_Y,      5,  3)
235BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_Z,              SEL_Z,      8,  6)
236BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    SEL_W,              SEL_W,      11, 9)
237BC_RSRVD(CF_ALLOC_EXPORT_WORD1_SWIZ,                                    15, 12)
238BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    BURST_COUNT,        BURST,      19, 16)
239BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    VALID_PIXEL_MODE,   VPM,        20, 20)
240BC_RSRVD(CF_ALLOC_EXPORT_WORD1_SWIZ,                                    21, 21)
241BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    CF_INST,            CF_INST,    29, 22)
242BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    MARK,               M,          30, 30)
243BC_FIELD(CF_ALLOC_EXPORT_WORD1_SWIZ,    BARRIER,            B,          31, 31)
244BC_FORMAT_END(CF_ALLOC_EXPORT_WORD1_SWIZ)
245
246// ALU
247
248BC_FORMAT_BEGIN(ALU_WORD0)
249BC_FIELD(ALU_WORD0,     SRC0_SEL,               S0S,        8,  0)
250BC_FIELD(ALU_WORD0,     SRC0_REL,               S0R,        9,  9)
251BC_FIELD(ALU_WORD0,     SRC0_CHAN,              S0C,        11, 10)
252BC_FIELD(ALU_WORD0,     SRC0_NEG,               S0N,        12, 12)
253BC_FIELD(ALU_WORD0,     SRC1_SEL,               S1S,        21, 13)
254BC_FIELD(ALU_WORD0,     SRC1_REL,               S1R,        22, 22)
255BC_FIELD(ALU_WORD0,     SRC1_CHAN,              S1C,        24, 23)
256BC_FIELD(ALU_WORD0,     SRC1_NEG,               S1N,        25, 25)
257BC_FIELD(ALU_WORD0,     INDEX_MODE,             IM,         28, 26)
258BC_FIELD(ALU_WORD0,     PRED_SEL,               PS,         30, 29)
259BC_FIELD(ALU_WORD0,     LAST,                   L,          31, 31)
260BC_FORMAT_END(ALU_WORD0)
261
262BC_FORMAT_BEGIN_HW(ALU_WORD1_OP2, R6)
263BC_FIELD(ALU_WORD1_OP2,     SRC0_ABS,               S0A,        0,  0)
264BC_FIELD(ALU_WORD1_OP2,     SRC1_ABS,               S1A,        1,  1)
265BC_FIELD(ALU_WORD1_OP2,     UPDATE_EXEC_MASK,       UEM,        2,  2)
266BC_FIELD(ALU_WORD1_OP2,     UPDATE_PRED,            UP,         3,  3)
267BC_FIELD(ALU_WORD1_OP2,     WRITE_MASK,             WM,         4,  4)
268BC_FIELD(ALU_WORD1_OP2,     FOG_MERGE,              FM,         5,  5)
269BC_FIELD(ALU_WORD1_OP2,     OMOD,                   OMOD,       7,  6)
270BC_FIELD(ALU_WORD1_OP2,     ALU_INST,               INST,       17, 8)
271BC_FIELD(ALU_WORD1_OP2,     BANK_SWIZZLE,           BS,         20, 18)
272BC_FIELD(ALU_WORD1_OP2,     DST_GPR,                DGPR,       27, 21)
273BC_FIELD(ALU_WORD1_OP2,     DST_REL,                DR,         28, 28)
274BC_FIELD(ALU_WORD1_OP2,     DST_CHAN,               DC,         30, 29)
275BC_FIELD(ALU_WORD1_OP2,     CLAMP,                  C,          31, 31)
276BC_FORMAT_END(ALU_WORD1_OP2)
277
278BC_FORMAT_BEGIN_HW(ALU_WORD1_OP2, R7EGCM)
279BC_FIELD(ALU_WORD1_OP2,     SRC0_ABS,               S0A,        0,  0)
280BC_FIELD(ALU_WORD1_OP2,     SRC1_ABS,               S1A,        1,  1)
281BC_FIELD(ALU_WORD1_OP2,     UPDATE_EXEC_MASK,       UEM,        2,  2)
282BC_FIELD(ALU_WORD1_OP2,     UPDATE_PRED,            UP,         3,  3)
283BC_FIELD(ALU_WORD1_OP2,     WRITE_MASK,             WM,         4,  4)
284BC_FIELD(ALU_WORD1_OP2,     OMOD,                   OMOD,       6,  5)
285BC_FIELD(ALU_WORD1_OP2,     ALU_INST,               INST,       17, 7)
286BC_FIELD(ALU_WORD1_OP2,     BANK_SWIZZLE,           BS,         20, 18)
287BC_FIELD(ALU_WORD1_OP2,     DST_GPR,                DGPR,       27, 21)
288BC_FIELD(ALU_WORD1_OP2,     DST_REL,                DR,         28, 28)
289BC_FIELD(ALU_WORD1_OP2,     DST_CHAN,               DC,         30, 29)
290BC_FIELD(ALU_WORD1_OP2,     CLAMP,                  C,          31, 31)
291BC_FORMAT_END(ALU_WORD1_OP2)
292
293BC_FORMAT_BEGIN_HW(ALU_WORD1_OP2_MOVA, CM)
294BC_FIELD(ALU_WORD1_OP2_MOVA,     SRC0_ABS,               S0A,        0,  0)
295BC_FIELD(ALU_WORD1_OP2_MOVA,     SRC1_ABS,               S1A,        1,  1)
296BC_FIELD(ALU_WORD1_OP2_MOVA,     UPDATE_EXEC_MASK,       UEM,        2,  2)
297BC_FIELD(ALU_WORD1_OP2_MOVA,     UPDATE_PRED,            UP,         3,  3)
298BC_FIELD(ALU_WORD1_OP2_MOVA,     WRITE_MASK,             WM,         4,  4)
299BC_FIELD(ALU_WORD1_OP2_MOVA,     OMOD,                   OMOD,       6,  5)
300BC_FIELD(ALU_WORD1_OP2_MOVA,     ALU_INST,               INST,       17, 7)
301BC_FIELD(ALU_WORD1_OP2_MOVA,     BANK_SWIZZLE,           BS,         20, 18)
302BC_FIELD(ALU_WORD1_OP2_MOVA,     MOVA_DST,               MOVA_DST,   27, 21)
303BC_FIELD(ALU_WORD1_OP2_MOVA,     DST_REL,                DR,         28, 28)
304BC_FIELD(ALU_WORD1_OP2_MOVA,     DST_CHAN,               DC,         30, 29)
305BC_FIELD(ALU_WORD1_OP2_MOVA,     CLAMP,                  C,          31, 31)
306BC_FORMAT_END(ALU_WORD1_OP2_MOVA)
307
308BC_FORMAT_BEGIN_HW(ALU_WORD1_OP2_EXEC_MASK, CM)
309BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     SRC0_ABS,               S0A,        0,  0)
310BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     SRC1_ABS,               S1A,        1,  1)
311BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     UPDATE_EXEC_MASK,       UEM,        2,  2)
312BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     UPDATE_PRED,            UP,         3,  3)
313BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     WRITE_MASK,             WM,         4,  4)
314BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     EXECUTE_MASK_OP,        EMO,        6,  5)
315BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     ALU_INST,               INST,       17, 7)
316BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     BANK_SWIZZLE,           BS,         20, 18)
317BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     DST_GPR,                DGPR,       27, 21)
318BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     DST_REL,                DR,         28, 28)
319BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     DST_CHAN,               DC,         30, 29)
320BC_FIELD(ALU_WORD1_OP2_EXEC_MASK,     CLAMP,                  C,          31, 31)
321BC_FORMAT_END(ALU_WORD1_OP2_EXEC_MASK)
322
323BC_FORMAT_BEGIN(ALU_WORD1_OP3)
324BC_FIELD(ALU_WORD1_OP3,     SRC2_SEL,               S2S,        8,  0)
325BC_FIELD(ALU_WORD1_OP3,     SRC2_REL,               S2R,        9,  9)
326BC_FIELD(ALU_WORD1_OP3,     SRC2_CHAN,              S2C,        11, 10)
327BC_FIELD(ALU_WORD1_OP3,     SRC2_NEG,               S2N,        12, 12)
328BC_FIELD(ALU_WORD1_OP3,     ALU_INST,               INST,       17, 13)
329BC_FIELD(ALU_WORD1_OP3,     BANK_SWIZZLE,           BS,         20, 18)
330BC_FIELD(ALU_WORD1_OP3,     DST_GPR,                DGPR,       27, 21)
331BC_FIELD(ALU_WORD1_OP3,     DST_REL,                DR,         28, 28)
332BC_FIELD(ALU_WORD1_OP3,     DST_CHAN,               DC,         30, 29)
333BC_FIELD(ALU_WORD1_OP3,     CLAMP,                  C,          31, 31)
334BC_FORMAT_END(ALU_WORD1_OP3)
335
336
337BC_FORMAT_BEGIN_HW(ALU_WORD0_LDS_IDX_OP, EGCM)
338BC_FIELD(ALU_WORD0_LDS_IDX_OP,      SRC0_SEL,               S0S,        8,  0)
339BC_FIELD(ALU_WORD0_LDS_IDX_OP,      SRC0_REL,               S0R,        9,  9)
340BC_FIELD(ALU_WORD0_LDS_IDX_OP,      SRC0_CHAN,              S0C,        11, 10)
341BC_FIELD(ALU_WORD0_LDS_IDX_OP,      IDX_OFFSET_4,           IO4,        12, 12)
342BC_FIELD(ALU_WORD0_LDS_IDX_OP,      SRC1_SEL,               S1S,        21, 13)
343BC_FIELD(ALU_WORD0_LDS_IDX_OP,      SRC1_REL,               S1R,        22, 22)
344BC_FIELD(ALU_WORD0_LDS_IDX_OP,      SRC1_CHAN,              S1C,        24, 23)
345BC_FIELD(ALU_WORD0_LDS_IDX_OP,      IDX_OFFSET_5,           IO5,        25, 25)
346BC_FIELD(ALU_WORD0_LDS_IDX_OP,      INDEX_MODE,             IM,         28, 26)
347BC_FIELD(ALU_WORD0_LDS_IDX_OP,      PRED_SEL,               PS,         30, 29)
348BC_FIELD(ALU_WORD0_LDS_IDX_OP,      LAST,                   L,          31, 31)
349BC_FORMAT_END(ALU_WORD0_LDS_IDX_OP)
350
351BC_FORMAT_BEGIN_HW(ALU_WORD1_LDS_IDX_OP, EGCM)
352BC_FIELD(ALU_WORD1_LDS_IDX_OP,      SRC2_SEL,               S2S,        8,  0)
353BC_FIELD(ALU_WORD1_LDS_IDX_OP,      SRC2_REL,               S2R,        9,  9)
354BC_FIELD(ALU_WORD1_LDS_IDX_OP,      SRC2_CHAN,              S2C,        11, 10)
355BC_FIELD(ALU_WORD1_LDS_IDX_OP,      IDX_OFFSET_1,           IO1,        12, 12)
356BC_FIELD(ALU_WORD1_LDS_IDX_OP,      ALU_INST,               INST,       17, 13)
357BC_FIELD(ALU_WORD1_LDS_IDX_OP,      BANK_SWIZZLE,           BS,         20, 18)
358BC_FIELD(ALU_WORD1_LDS_IDX_OP,      LDS_OP,                 LDS_OP,     26, 21)
359BC_FIELD(ALU_WORD1_LDS_IDX_OP,      IDX_OFFSET_0,           IO0,        27, 27)
360BC_FIELD(ALU_WORD1_LDS_IDX_OP,      IDX_OFFSET_2,           IO2,        28, 28)
361BC_FIELD(ALU_WORD1_LDS_IDX_OP,      DST_CHAN,               DC,         30, 29)
362BC_FIELD(ALU_WORD1_LDS_IDX_OP,      IDX_OFFSET_3,           IO3,        31, 31)
363BC_FORMAT_END(ALU_WORD1_LDS_IDX_OP)
364
365
366BC_FORMAT_BEGIN_HW(ALU_WORD1_LDS_DIRECT_LITERAL_LO, EGCM)
367BC_FIELD(ALU_WORD1_LDS_DIRECT_LITERAL_LO,       OFFSET_A,       OFS_A,  12, 0)
368BC_FIELD(ALU_WORD1_LDS_DIRECT_LITERAL_LO,       STRIDE_A,       STR_A,  19, 13)
369BC_RSRVD(ALU_WORD1_LDS_DIRECT_LITERAL_LO,                               21, 20)
370BC_FIELD(ALU_WORD1_LDS_DIRECT_LITERAL_LO,       THREAD_REL_A,   THR_A,  22, 22)
371BC_RSRVD(ALU_WORD1_LDS_DIRECT_LITERAL_LO,                               31, 22)
372BC_FORMAT_END(ALU_WORD1_LDS_DIRECT_LITERAL_LO)
373
374BC_FORMAT_BEGIN_HW(ALU_WORD1_LDS_DIRECT_LITERAL_HI, EGCM)
375BC_FIELD(ALU_WORD1_LDS_DIRECT_LITERAL_HI,       OFFSET_B,       OFS_B,  12, 0)
376BC_FIELD(ALU_WORD1_LDS_DIRECT_LITERAL_HI,       STRIDE_B,       STR_B,  19, 13)
377BC_RSRVD(ALU_WORD1_LDS_DIRECT_LITERAL_HI,                               21, 20)
378BC_FIELD(ALU_WORD1_LDS_DIRECT_LITERAL_HI,       THREAD_REL_B,   THR_B,  22, 22)
379BC_RSRVD(ALU_WORD1_LDS_DIRECT_LITERAL_HI,                               30, 22)
380BC_FIELD(ALU_WORD1_LDS_DIRECT_LITERAL_HI,       DIRECT_READ_32, DR32,   31, 31)
381BC_FORMAT_END(ALU_WORD1_LDS_DIRECT_LITERAL_HI)
382
383
384// VTX
385
386BC_FORMAT_BEGIN_HW(VTX_WORD0, R6R7EG)
387BC_FIELD(VTX_WORD0,     VC_INST,                INST,       4,  0)
388BC_FIELD(VTX_WORD0,     FETCH_TYPE,             FT,         6,  5)
389BC_FIELD(VTX_WORD0,     FETCH_WHOLE_QUAD,       FWQ,        7,  7)
390BC_FIELD(VTX_WORD0,     BUFFER_ID,              BUF_ID,     15, 8)
391BC_FIELD(VTX_WORD0,     SRC_GPR,                S_GPR,      22, 16)
392BC_FIELD(VTX_WORD0,     SRC_REL,                SR,         23, 23)
393BC_FIELD(VTX_WORD0,     SRC_SEL_X,              SSX,        25, 24)
394BC_FIELD(VTX_WORD0,     MEGA_FETCH_COUNT,       MFC,        31, 26)
395BC_FORMAT_END(VTX_WORD0)
396
397BC_FORMAT_BEGIN_HW(VTX_WORD0, CM)
398BC_FIELD(VTX_WORD0,     VC_INST,                INST,       4,  0)
399BC_FIELD(VTX_WORD0,     FETCH_TYPE,             FT,         6,  5)
400BC_FIELD(VTX_WORD0,     FETCH_WHOLE_QUAD,       FWQ,        7,  7)
401BC_FIELD(VTX_WORD0,     BUFFER_ID,              BUF_ID,     15, 8)
402BC_FIELD(VTX_WORD0,     SRC_GPR,                S_GPR,      22, 16)
403BC_FIELD(VTX_WORD0,     SRC_REL,                SR,         23, 23)
404BC_FIELD(VTX_WORD0,     SRC_SEL_X,              SSX,        25, 24)
405BC_FIELD(VTX_WORD0,     SRC_SEL_Y,              SSY,        27, 26)
406BC_FIELD(VTX_WORD0,     STRUCTURED_READ,        SR,         29, 28)
407BC_FIELD(VTX_WORD0,     LDS_REQ,                LR,         30, 30)
408BC_FIELD(VTX_WORD0,     COALESCED_READ,         CR,         31, 31)
409BC_FORMAT_END(VTX_WORD0)
410
411
412BC_FORMAT_BEGIN(VTX_WORD1_GPR)
413BC_FIELD(VTX_WORD1_GPR,     DST_GPR,                D_GPR,      6,  0)
414BC_FIELD(VTX_WORD1_GPR,     DST_REL,                DR,         7,  7)
415BC_RSRVD(VTX_WORD1_GPR,                                         8,  8)
416BC_FIELD(VTX_WORD1_GPR,     DST_SEL_X,              DSX,        11, 9)
417BC_FIELD(VTX_WORD1_GPR,     DST_SEL_Y,              DSY,        14, 12)
418BC_FIELD(VTX_WORD1_GPR,     DST_SEL_Z,              DSZ,        17, 15)
419BC_FIELD(VTX_WORD1_GPR,     DST_SEL_W,              DSW,        20, 18)
420BC_FIELD(VTX_WORD1_GPR,     USE_CONST_FIELDS,       UCF,        21, 21)
421BC_FIELD(VTX_WORD1_GPR,     DATA_FORMAT,            DFMT,       27, 22)
422BC_FIELD(VTX_WORD1_GPR,     NUM_FORMAT_ALL,         NFA,        29, 28)
423BC_FIELD(VTX_WORD1_GPR,     FORMAT_COMP_ALL,        FCA,        30, 30)
424BC_FIELD(VTX_WORD1_GPR,     SRF_MODE_ALL,           SMA,        31, 31)
425BC_FORMAT_END(VTX_WORD1_GPR)
426
427BC_FORMAT_BEGIN(VTX_WORD1_SEM)
428BC_FIELD(VTX_WORD1_SEM,     SEMANTIC_ID,            SID,        7,  0)
429BC_RSRVD(VTX_WORD1_SEM,                                         8,  8)
430BC_FIELD(VTX_WORD1_SEM,     DST_SEL_X,              DSX,        11, 9)
431BC_FIELD(VTX_WORD1_SEM,     DST_SEL_Y,              DSY,        14, 12)
432BC_FIELD(VTX_WORD1_SEM,     DST_SEL_Z,              DSZ,        17, 15)
433BC_FIELD(VTX_WORD1_SEM,     DST_SEL_W,              DSW,        20, 18)
434BC_FIELD(VTX_WORD1_SEM,     USE_CONST_FIELDS,       UCF,        21, 21)
435BC_FIELD(VTX_WORD1_SEM,     DATA_FORMAT,            DFMT,       27, 22)
436BC_FIELD(VTX_WORD1_SEM,     NUM_FORMAT_ALL,         NFA,        29, 28)
437BC_FIELD(VTX_WORD1_SEM,     FORMAT_COMP_ALL,        FCA,        30, 30)
438BC_FIELD(VTX_WORD1_SEM,     SRF_MODE_ALL,           SMA,        31, 31)
439BC_FORMAT_END(VTX_WORD1_SEM)
440
441
442BC_FORMAT_BEGIN_HW(VTX_WORD2, R6)
443BC_FIELD(VTX_WORD2,     OFFSET,                 OFS,        15, 0)
444BC_FIELD(VTX_WORD2,     ENDIAN_SWAP,            ES,         17, 16)
445BC_FIELD(VTX_WORD2,     CONST_BUF_NO_STRIDE,    CBNS,       18, 18)
446BC_FIELD(VTX_WORD2,     MEGA_FETCH,             MF,         19, 19)
447BC_RSRVD(VTX_WORD2,                                         31, 20)
448BC_FORMAT_END(VTX_WORD2)
449
450BC_FORMAT_BEGIN_HW(VTX_WORD2, R7)
451BC_FIELD(VTX_WORD2,     OFFSET,                 OFS,        15, 0)
452BC_FIELD(VTX_WORD2,     ENDIAN_SWAP,            ES,         17, 16)
453BC_FIELD(VTX_WORD2,     CONST_BUF_NO_STRIDE,    CBNS,       18, 18)
454BC_FIELD(VTX_WORD2,     MEGA_FETCH,             MF,         19, 19)
455BC_FIELD(VTX_WORD2,     ALT_CONST,              ALT_C,      20, 20)
456BC_RSRVD(VTX_WORD2,                                         31, 21)
457BC_FORMAT_END(VTX_WORD2)
458
459BC_FORMAT_BEGIN_HW(VTX_WORD2, EG)
460BC_FIELD(VTX_WORD2,     OFFSET,                 OFS,        15, 0)
461BC_FIELD(VTX_WORD2,     ENDIAN_SWAP,            ES,         17, 16)
462BC_FIELD(VTX_WORD2,     CONST_BUF_NO_STRIDE,    CBNS,       18, 18)
463BC_FIELD(VTX_WORD2,     MEGA_FETCH,             MF,         19, 19)
464BC_FIELD(VTX_WORD2,     ALT_CONST,              ALT_C,      20, 20)
465BC_FIELD(VTX_WORD2,     BUFFER_INDEX_MODE,      BIM,        22, 21)
466BC_RSRVD(VTX_WORD2,                                         31, 23)
467BC_FORMAT_END(VTX_WORD2)
468
469BC_FORMAT_BEGIN_HW(VTX_WORD2, CM)
470BC_FIELD(VTX_WORD2,     OFFSET,                 OFS,        15, 0)
471BC_FIELD(VTX_WORD2,     ENDIAN_SWAP,            ES,         17, 16)
472BC_FIELD(VTX_WORD2,     CONST_BUF_NO_STRIDE,    CBNS,       18, 18)
473BC_RSRVD(VTX_WORD2,                                         19, 19)
474BC_FIELD(VTX_WORD2,     ALT_CONST,              ALT_C,      20, 20)
475BC_FIELD(VTX_WORD2,     BUFFER_INDEX_MODE,      BIM,        22, 21)
476BC_RSRVD(VTX_WORD2,                                         31, 23)
477BC_FORMAT_END(VTX_WORD2)
478
479// TEX
480
481BC_FORMAT_BEGIN_HW(TEX_WORD0, R6)
482BC_FIELD(TEX_WORD0,     TEX_INST,               T_INST,     4,  0)
483BC_FIELD(TEX_WORD0,     BC_FRAC_MODE,           BFM,        5,  5)
484BC_RSRVD(TEX_WORD0,                                         6,  6)
485BC_FIELD(TEX_WORD0,     FETCH_WHOLE_QUAD,       FWQ,        7,  7)
486BC_FIELD(TEX_WORD0,     RESOURCE_ID,            RSRC_ID,    15, 8)
487BC_FIELD(TEX_WORD0,     SRC_GPR,                S_GPR,      22, 16)
488BC_FIELD(TEX_WORD0,     SRC_REL,                SR,         23, 23)
489BC_RSRVD(TEX_WORD0,                                         31, 24)
490BC_FORMAT_END(TEX_WORD0)
491
492BC_FORMAT_BEGIN_HW(TEX_WORD0, R7)
493BC_FIELD(TEX_WORD0,     TEX_INST,               T_INST,     4,  0)
494BC_FIELD(TEX_WORD0,     BC_FRAC_MODE,           BFM,        5,  5)
495BC_RSRVD(TEX_WORD0,                                         6,  6)
496BC_FIELD(TEX_WORD0,     FETCH_WHOLE_QUAD,       FWQ,        7,  7)
497BC_FIELD(TEX_WORD0,     RESOURCE_ID,            RSRC_ID,    15, 8)
498BC_FIELD(TEX_WORD0,     SRC_GPR,                S_GPR,      22, 16)
499BC_FIELD(TEX_WORD0,     SRC_REL,                SR,         23, 23)
500BC_FIELD(TEX_WORD0,     ALT_CONST,              ALT_C,      24, 24)
501BC_RSRVD(TEX_WORD0,                                         31, 25)
502BC_FORMAT_END(TEX_WORD0)
503
504BC_FORMAT_BEGIN_HW(TEX_WORD0, EGCM)
505BC_FIELD(TEX_WORD0,     TEX_INST,               T_INST,     4,  0)
506BC_FIELD(TEX_WORD0,     INST_MOD,               IMOD,       6,  5)
507BC_FIELD(TEX_WORD0,     FETCH_WHOLE_QUAD,       FWQ,        7,  7)
508BC_FIELD(TEX_WORD0,     RESOURCE_ID,            RSRC_ID,    15, 8)
509BC_FIELD(TEX_WORD0,     SRC_GPR,                S_GPR,      22, 16)
510BC_FIELD(TEX_WORD0,     SRC_REL,                SR,         23, 23)
511BC_FIELD(TEX_WORD0,     ALT_CONST,              ALT_C,      24, 24)
512BC_FIELD(TEX_WORD0,     RESOURCE_INDEX_MODE,    RIM,        26, 25)
513BC_FIELD(TEX_WORD0,     SAMPLER_INDEX_MODE,     SIM,        28, 27)
514BC_RSRVD(TEX_WORD0,                                         31, 29)
515BC_FORMAT_END(TEX_WORD0)
516
517
518BC_FORMAT_BEGIN(TEX_WORD1)
519BC_FIELD(TEX_WORD1,     DST_GPR,                D_GPR,      6,  0)
520BC_FIELD(TEX_WORD1,     DST_REL,                DR,         7,  7)
521BC_RSRVD(TEX_WORD1,                                         8,  8)
522BC_FIELD(TEX_WORD1,     DST_SEL_X,              DSX,        11, 9)
523BC_FIELD(TEX_WORD1,     DST_SEL_Y,              DSY,        14, 12)
524BC_FIELD(TEX_WORD1,     DST_SEL_Z,              DSZ,        17, 15)
525BC_FIELD(TEX_WORD1,     DST_SEL_W,              DSW,        20, 18)
526BC_FIELD(TEX_WORD1,     LOD_BIAS,               LBIAS,      27, 21)
527BC_FIELD(TEX_WORD1,     COORD_TYPE_X,           CTX,        28, 28)
528BC_FIELD(TEX_WORD1,     COORD_TYPE_Y,           CTY,        29, 29)
529BC_FIELD(TEX_WORD1,     COORD_TYPE_Z,           CTZ,        30, 30)
530BC_FIELD(TEX_WORD1,     COORD_TYPE_W,           CTW,        31, 31)
531BC_FORMAT_END(TEX_WORD1)
532
533
534BC_FORMAT_BEGIN(TEX_WORD2)
535BC_FIELD(TEX_WORD2,     OFFSET_X,               OFS_X,      4,  0)
536BC_FIELD(TEX_WORD2,     OFFSET_Y,               OFS_Y,      9,  5)
537BC_FIELD(TEX_WORD2,     OFFSET_Z,               OFS_Z,      14, 10)
538BC_FIELD(TEX_WORD2,     SAMPLER_ID,             SAMP_ID,    19, 15)
539BC_FIELD(TEX_WORD2,     SRC_SEL_X,              SSX,        22, 20)
540BC_FIELD(TEX_WORD2,     SRC_SEL_Y,              SSY,        25, 23)
541BC_FIELD(TEX_WORD2,     SRC_SEL_Z,              SSZ,        28, 26)
542BC_FIELD(TEX_WORD2,     SRC_SEL_W,              SSW,        31, 29)
543BC_FORMAT_END(TEX_WORD2)
544
545BC_FORMAT_BEGIN_HW(MEM_GDS_WORD0, EGCM)
546BC_FIELD(MEM_GDS_WORD0,  MEM_INST,               M_INST,     4, 0)
547BC_FIELD(MEM_GDS_WORD0,  MEM_OP,  		 M_OP,      10, 8)
548BC_FIELD(MEM_GDS_WORD0,  SRC_GPR,                S_GPR,     17, 11)
549BC_FIELD(MEM_GDS_WORD0,  SRC_REL_MODE,           SRM,       19, 18)
550BC_FIELD(MEM_GDS_WORD0,  SRC_SEL_X,              SSX,       22, 20)
551BC_FIELD(MEM_GDS_WORD0,  SRC_SEL_Y,              SSY,       25, 23)
552BC_FIELD(MEM_GDS_WORD0,  SRC_SEL_Z,              SSZ,       28, 26)
553BC_FORMAT_END(MEM_GDS_WORD0)
554
555BC_FORMAT_BEGIN_HW(MEM_GDS_WORD1, EGCM)
556BC_FIELD(MEM_GDS_WORD1,     DST_GPR,                D_GPR,      6,  0)
557BC_FIELD(MEM_GDS_WORD1,     DST_REL_MODE,           DRM,        8,  7)
558BC_FIELD(MEM_GDS_WORD1,     GDS_OP,                 G_OP,      14,  9)
559BC_FIELD(MEM_GDS_WORD1,     SRC_GPR,                S_GPR,     22, 16)
560BC_FIELD(MEM_GDS_WORD1,     UAV_INDEX_MODE,         U_IM,      25, 24)
561BC_FIELD(MEM_GDS_WORD1,     UAV_ID,                 U_ID,      29, 26)
562BC_FIELD(MEM_GDS_WORD1,     ALLOC_CONSUME,          AC,        30, 30)
563BC_FIELD(MEM_GDS_WORD1,     BCAST_FIRST_REQ,        BFR,       31, 31)
564BC_FORMAT_END(MEM_GDS_WORD1)
565
566BC_FORMAT_BEGIN_HW(MEM_GDS_WORD2, EGCM)
567BC_FIELD(MEM_GDS_WORD2,     DST_SEL_X,              DSX,        2, 0)
568BC_FIELD(MEM_GDS_WORD2,     DST_SEL_Y,              DSY,        5, 3)
569BC_FIELD(MEM_GDS_WORD2,     DST_SEL_Z,              DSZ,        8, 6)
570BC_FIELD(MEM_GDS_WORD2,     DST_SEL_W,              DSW,       11, 9)
571BC_FORMAT_END(MEM_GDS_WORD2)
572