1 
2 #ifndef R600_OPCODES_H
3 #define R600_OPCODES_H
4 
5 #define R600_S_SQ_CF_WORD1_CF_INST(x)                              (((x) & 0x7F) << 23)
6 #define R600_G_SQ_CF_WORD1_CF_INST(x)                              (((x) >> 23) & 0x7F)
7 #define R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x)                 (((x) & 0x7F) << 23)
8 #define R600_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x)                 (((x) >> 23) & 0x7F)
9 #define R600_S_SQ_CF_ALU_WORD1_CF_INST(x)                          (((x) & 0xF) << 26)
10 #define R600_G_SQ_CF_ALU_WORD1_CF_INST(x)                          (((x) >> 26) & 0xF)
11 
12 #define EG_S_SQ_CF_WORD1_CF_INST(x)                                (((x) & 0xFF) << 22)
13 #define EG_G_SQ_CF_WORD1_CF_INST(x)                                (((x) >> 22) & 0xFF)
14 #define EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x)                   (((x) & 0xFF) << 22)
15 #define EG_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x)                   (((x) >> 22) & 0xFF)
16 #define EG_S_SQ_CF_ALU_WORD1_CF_INST(x)                            (((x) & 0xF) << 26)
17 #define EG_G_SQ_CF_ALU_WORD1_CF_INST(x)                            (((x) >> 26) & 0xF)
18 
19 #define     V_SQ_CF_WORD1_SQ_CF_INST_NOP                             R600_S_SQ_CF_WORD1_CF_INST(0x00000000)
20 #define     V_SQ_CF_WORD1_SQ_CF_INST_TEX                             R600_S_SQ_CF_WORD1_CF_INST(0x00000001)
21 #define     V_SQ_CF_WORD1_SQ_CF_INST_VTX                             R600_S_SQ_CF_WORD1_CF_INST(0x00000002)
22 #define     V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC                          R600_S_SQ_CF_WORD1_CF_INST(0x00000003)
23 #define     V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START                      R600_S_SQ_CF_WORD1_CF_INST(0x00000004)
24 #define     V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END                        R600_S_SQ_CF_WORD1_CF_INST(0x00000005)
25 #define     V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10                 R600_S_SQ_CF_WORD1_CF_INST(0x00000006)
26 #define     V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL                R600_S_SQ_CF_WORD1_CF_INST(0x00000007)
27 #define     V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE                   R600_S_SQ_CF_WORD1_CF_INST(0x00000008)
28 #define     V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK                      R600_S_SQ_CF_WORD1_CF_INST(0x00000009)
29 #define     V_SQ_CF_WORD1_SQ_CF_INST_JUMP                            R600_S_SQ_CF_WORD1_CF_INST(0x0000000A)
30 #define     V_SQ_CF_WORD1_SQ_CF_INST_PUSH                            R600_S_SQ_CF_WORD1_CF_INST(0x0000000B)
31 #define     V_SQ_CF_WORD1_SQ_CF_INST_PUSH_ELSE                       R600_S_SQ_CF_WORD1_CF_INST(0x0000000C)
32 #define     V_SQ_CF_WORD1_SQ_CF_INST_ELSE                            R600_S_SQ_CF_WORD1_CF_INST(0x0000000D)
33 #define     V_SQ_CF_WORD1_SQ_CF_INST_POP                             R600_S_SQ_CF_WORD1_CF_INST(0x0000000E)
34 #define     V_SQ_CF_WORD1_SQ_CF_INST_POP_JUMP                        R600_S_SQ_CF_WORD1_CF_INST(0x0000000F)
35 #define     V_SQ_CF_WORD1_SQ_CF_INST_POP_PUSH                        R600_S_SQ_CF_WORD1_CF_INST(0x00000010)
36 #define     V_SQ_CF_WORD1_SQ_CF_INST_POP_PUSH_ELSE                   R600_S_SQ_CF_WORD1_CF_INST(0x00000011)
37 #define     V_SQ_CF_WORD1_SQ_CF_INST_CALL                            R600_S_SQ_CF_WORD1_CF_INST(0x00000012)
38 #define     V_SQ_CF_WORD1_SQ_CF_INST_CALL_FS                         R600_S_SQ_CF_WORD1_CF_INST(0x00000013)
39 #define     V_SQ_CF_WORD1_SQ_CF_INST_RETURN                          R600_S_SQ_CF_WORD1_CF_INST(0x00000014)
40 #define     V_SQ_CF_WORD1_SQ_CF_INST_EMIT_VERTEX                     R600_S_SQ_CF_WORD1_CF_INST(0x00000015)
41 #define     V_SQ_CF_WORD1_SQ_CF_INST_EMIT_CUT_VERTEX                 R600_S_SQ_CF_WORD1_CF_INST(0x00000016)
42 #define     V_SQ_CF_WORD1_SQ_CF_INST_CUT_VERTEX                      R600_S_SQ_CF_WORD1_CF_INST(0x00000017)
43 #define     V_SQ_CF_WORD1_SQ_CF_INST_KILL                            R600_S_SQ_CF_WORD1_CF_INST(0x00000018)
44 
45 #define     V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU                         R600_S_SQ_CF_ALU_WORD1_CF_INST(0x00000008)
46 #define     V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE             R600_S_SQ_CF_ALU_WORD1_CF_INST(0x00000009)
47 #define     V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER               R600_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000A)
48 #define     V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP2_AFTER              R600_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000B)
49 #define     V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_CONTINUE                R600_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000D)
50 #define     V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_BREAK                   R600_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000E)
51 #define     V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_ELSE_AFTER              R600_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000F)
52 
53 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD                       0x00000000
54 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL                       0x00000001
55 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_IEEE                  0x00000002
56 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX                       0x00000003
57 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN                       0x00000004
58 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_DX10                  0x00000005
59 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_DX10                  0x00000006
60 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FREXP_64                  0x00000007
61 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE                      0x00000008
62 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT                     0x00000009
63 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE                     0x0000000A
64 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE                     0x0000000B
65 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE_DX10                 0x0000000C
66 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_DX10                0x0000000D
67 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_DX10                0x0000000E
68 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE_DX10                0x0000000F
69 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT                     0x00000010
70 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC                     0x00000011
71 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CEIL                      0x00000012
72 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RNDNE                     0x00000013
73 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR                     0x00000014
74 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA                      0x00000015
75 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_FLOOR                0x00000016
76 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_64                    0x00000017
77 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT                  0x00000018
78 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV                       0x00000019
79 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP                       0x0000001A
80 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_64                    0x0000001B
81 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT64_TO_FLT32            0x0000001C
82 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT32_TO_FLT64            0x0000001D
83 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_UINT           0x0000001E
84 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_UINT           0x0000001F
85 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE                 0x00000020
86 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT                0x00000021
87 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE                0x00000022
88 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE                0x00000023
89 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_INV              0x00000024
90 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_POP              0x00000025
91 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_CLR              0x00000026
92 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_RESTORE          0x00000027
93 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH            0x00000028
94 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH           0x00000029
95 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH           0x0000002A
96 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH           0x0000002B
97 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE                     0x0000002C
98 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT                    0x0000002D
99 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE                    0x0000002E
100 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE                    0x0000002F
101 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_AND_INT                   0x00000030
102 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_OR_INT                    0x00000031
103 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_XOR_INT                   0x00000032
104 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOT_INT                   0x00000033
105 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT                   0x00000034
106 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SUB_INT                   0x00000035
107 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_INT                   0x00000036
108 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_INT                   0x00000037
109 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_UINT                  0x00000038
110 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_UINT                  0x00000039
111 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE_INT                  0x0000003A
112 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_INT                 0x0000003B
113 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_INT                 0x0000003C
114 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE_INT                 0x0000003D
115 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_UINT                0x0000003E
116 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_UINT                0x0000003F
117 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_UINT               0x00000040
118 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_UINT               0x00000041
119 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_INT             0x00000042
120 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_INT            0x00000043
121 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_INT            0x00000044
122 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_INT            0x00000045
123 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE_INT                 0x00000046
124 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_INT                0x00000047
125 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_INT                0x00000048
126 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE_INT                0x00000049
127 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH_INT        0x0000004A
128 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH_INT       0x0000004B
129 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH_INT       0x0000004C
130 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH_INT       0x0000004D
131 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLT_PUSH_INT       0x0000004E
132 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLE_PUSH_INT       0x0000004F
133 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4                      0x00000050
134 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE                 0x00000051
135 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE                      0x00000052
136 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX4                      0x00000053
137 
138 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_GPR_INT              0x00000060
139 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE                  0x00000061
140 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED               0x00000062
141 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE                  0x00000063
142 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED             0x00000064
143 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_FF                  0x00000065
144 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE                0x00000066
145 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED         0x00000067
146 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_FF              0x00000068
147 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE            0x00000069
148 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SQRT_IEEE                 0x0000006A
149 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT                0x0000006B
150 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT                0x0000006C
151 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UINT_TO_FLT               0x0000006D
152 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN                       0x0000006E
153 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS                       0x0000006F
154 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ASHR_INT                  0x00000070
155 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHR_INT                  0x00000071
156 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHL_INT                  0x00000072
157 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_INT                 0x00000073
158 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_INT                 0x00000074
159 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_UINT                0x00000075
160 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT                0x00000076
161 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_INT                 0x00000077
162 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_UINT                0x00000078
163 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_UINT               0x00000079
164 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LDEXP_64                  0x0000007A
165 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT_64                  0x0000007B
166 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_64             0x0000007C
167 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_64              0x0000007D
168 #define     V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_64             0x0000007E
169 
170 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_64                 0x00000008
171 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_64_M2              0x00000009
172 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_64_M4              0x0000000A
173 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_64_D2              0x0000000B
174 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT                   0x0000000C
175 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_M2                0x0000000D
176 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_M4                0x0000000E
177 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_D2                0x0000000F
178 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD                    0x00000010
179 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_M2                 0x00000011
180 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_M4                 0x00000012
181 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_D2                 0x00000013
182 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE               0x00000014
183 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE_M2            0x00000015
184 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE_M4            0x00000016
185 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE_D2            0x00000017
186 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDE                      0x00000018
187 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT                     0x00000019
188 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGE                     0x0000001A
189 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDE_INT                  0x0000001C
190 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT_INT                 0x0000001D
191 #define     V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGE_INT                 0x0000001E
192 
193 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM0        R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000020)
194 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM1        R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000021)
195 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM2        R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000022)
196 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3        R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000023)
197 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_SCRATCH        R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000024)
198 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_REDUCTION      R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000025)
199 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_RING           R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000026)
200 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT             R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000027)
201 #define     V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT_DONE        R600_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000028)
202 
203 /* cayman doesn't have VTX */
204 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_NOP                             EG_S_SQ_CF_WORD1_CF_INST(0x00000000)
205 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_TEX                             EG_S_SQ_CF_WORD1_CF_INST(0x00000001)
206 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_TC                              EG_S_SQ_CF_WORD1_CF_INST(0x00000001)
207 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_VTX                             EG_S_SQ_CF_WORD1_CF_INST(0x00000002)
208 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_RSVD_2                          EG_S_SQ_CF_WORD1_CF_INST(0x00000002)
209 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_GDS                             EG_S_SQ_CF_WORD1_CF_INST(0x00000003)
210 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START                      EG_S_SQ_CF_WORD1_CF_INST(0x00000004)
211 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END                        EG_S_SQ_CF_WORD1_CF_INST(0x00000005)
212 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_DX10                 EG_S_SQ_CF_WORD1_CF_INST(0x00000006)
213 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL                EG_S_SQ_CF_WORD1_CF_INST(0x00000007)
214 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE                   EG_S_SQ_CF_WORD1_CF_INST(0x00000008)
215 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK                      EG_S_SQ_CF_WORD1_CF_INST(0x00000009)
216 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_JUMP                            EG_S_SQ_CF_WORD1_CF_INST(0x0000000A)
217 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_PUSH                            EG_S_SQ_CF_WORD1_CF_INST(0x0000000B)
218 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_RSVD_12                         EG_S_SQ_CF_WORD1_CF_INST(0x0000000C) /* resvd */
219 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_ELSE                            EG_S_SQ_CF_WORD1_CF_INST(0x0000000D)
220 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_POP                             EG_S_SQ_CF_WORD1_CF_INST(0x0000000E)
221 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_RSVD_15                         EG_S_SQ_CF_WORD1_CF_INST(0x0000000F)
222 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_RSVD_16                         EG_S_SQ_CF_WORD1_CF_INST(0x00000010)
223 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_RSVD_17                         EG_S_SQ_CF_WORD1_CF_INST(0x00000011)
224 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_CALL                            EG_S_SQ_CF_WORD1_CF_INST(0x00000012)
225 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_CALL_FS                         EG_S_SQ_CF_WORD1_CF_INST(0x00000013)
226 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_RETURN                          EG_S_SQ_CF_WORD1_CF_INST(0x00000014)
227 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_EMIT_VERTEX                     EG_S_SQ_CF_WORD1_CF_INST(0x00000015)
228 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_EMIT_CUT_VERTEX                 EG_S_SQ_CF_WORD1_CF_INST(0x00000016)
229 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_CUT_VERTEX                      EG_S_SQ_CF_WORD1_CF_INST(0x00000017)
230 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_KILL                            EG_S_SQ_CF_WORD1_CF_INST(0x00000018)
231 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_RSVD_25                         EG_S_SQ_CF_WORD1_CF_INST(0x00000019)
232 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_WAIT_ACK                        EG_S_SQ_CF_WORD1_CF_INST(0x0000001a)
233 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_TC_ACK                          EG_S_SQ_CF_WORD1_CF_INST(0x0000001b)
234 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_VC_ACK                          EG_S_SQ_CF_WORD1_CF_INST(0x0000001c)
235 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_RSVD_28                         EG_S_SQ_CF_WORD1_CF_INST(0x0000001c)
236 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_JUMPTABLE                       EG_S_SQ_CF_WORD1_CF_INST(0x0000001d)
237 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_GLOBAL_WAVE_SYNC                EG_S_SQ_CF_WORD1_CF_INST(0x0000001e)
238 #define     EG_V_SQ_CF_WORD1_SQ_CF_INST_HALT                            EG_S_SQ_CF_WORD1_CF_INST(0x0000001f)
239 
240 /* cayman extras */
241 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_END                             EG_S_SQ_CF_WORD1_CF_INST(0x00000020)
242 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_LDS_DEALLOC                     EG_S_SQ_CF_WORD1_CF_INST(0x00000021)
243 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_PUSH_WQM                        EG_S_SQ_CF_WORD1_CF_INST(0x00000022)
244 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_POP_WQM                         EG_S_SQ_CF_WORD1_CF_INST(0x00000023)
245 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_ELSE_WQM                        EG_S_SQ_CF_WORD1_CF_INST(0x00000024)
246 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_JUMP_ANY                        EG_S_SQ_CF_WORD1_CF_INST(0x00000025)
247 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_REACTIVATE                      EG_S_SQ_CF_WORD1_CF_INST(0x00000026)
248 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_REACTIVATE_WQM                  EG_S_SQ_CF_WORD1_CF_INST(0x00000027)
249 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_INTERRUPT                       EG_S_SQ_CF_WORD1_CF_INST(0x00000028)
250 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_INTERRUPT_AND_SLEEP             EG_S_SQ_CF_WORD1_CF_INST(0x00000029)
251 #define     CM_V_SQ_CF_WORD1_SQ_CF_INST_SET_PRIORITY                    EG_S_SQ_CF_WORD1_CF_INST(0x00000030)
252 
253 #define     EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU                         EG_S_SQ_CF_ALU_WORD1_CF_INST(0x00000008)
254 #define     EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE             EG_S_SQ_CF_ALU_WORD1_CF_INST(0x00000009)
255 #define     EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER               EG_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000A)
256 #define     EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP2_AFTER              EG_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000B)
257 #define     EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_EXTENDED                    EG_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000C)
258 #define     EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_CONTINUE                EG_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000D) /* different on CAYMAN */
259 #define     EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_BREAK                   EG_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000E) /* different on CAYMAN */
260 #define     EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_ELSE_AFTER              EG_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000F)
261 
262 #define     CM_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_REACTIVATE_BEFORE       EG_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000D)
263 #define     CM_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_VALID_PIXEL_MODE        EG_S_SQ_CF_ALU_WORD1_CF_INST(0x0000000E)
264 
265 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD                       0x00000000
266 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL                       0x00000001
267 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_IEEE                  0x00000002
268 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX                       0x00000003
269 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN                       0x00000004
270 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_DX10                  0x00000005
271 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_DX10                  0x00000006
272 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE                      0x00000008
273 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT                     0x00000009
274 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE                     0x0000000A
275 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE                     0x0000000B
276 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE_DX10                 0x0000000C
277 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_DX10                0x0000000D
278 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_DX10                0x0000000E
279 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE_DX10                0x0000000F
280 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT                     0x00000010
281 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC                     0x00000011
282 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CEIL                      0x00000012
283 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RNDNE                     0x00000013
284 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR                     0x00000014
285 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ASHR_INT                  0x00000015
286 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHR_INT                  0x00000016
287 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHL_INT                  0x00000017
288 /* same again from here */
289 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV                       0x00000019
290 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP                       0x0000001A
291 /* same */
292 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_UINT           0x0000001E
293 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_UINT           0x0000001F
294 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE                 0x00000020
295 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT                0x00000021
296 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE                0x00000022
297 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE                0x00000023
298 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_INV              0x00000024
299 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_POP              0x00000025
300 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_CLR              0x00000026
301 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_RESTORE          0x00000027
302 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH            0x00000028
303 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH           0x00000029
304 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH           0x0000002A
305 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH           0x0000002B
306 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE                     0x0000002C
307 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT                    0x0000002D
308 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE                    0x0000002E
309 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE                    0x0000002F
310 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_AND_INT                   0x00000030
311 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_OR_INT                    0x00000031
312 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_XOR_INT                   0x00000032
313 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOT_INT                   0x00000033
314 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT                   0x00000034
315 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SUB_INT                   0x00000035
316 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_INT                   0x00000036
317 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_INT                   0x00000037
318 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_UINT                  0x00000038
319 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_UINT                  0x00000039
320 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE_INT                  0x0000003A
321 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_INT                 0x0000003B
322 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_INT                 0x0000003C
323 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE_INT                 0x0000003D
324 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_UINT                0x0000003E
325 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_UINT                0x0000003F
326 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_UINT               0x00000040
327 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_UINT               0x00000041
328 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_INT             0x00000042
329 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_INT            0x00000043
330 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_INT            0x00000044
331 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_INT            0x00000045
332 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE_INT                 0x00000046
333 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_INT                0x00000047
334 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_INT                0x00000048
335 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE_INT                0x00000049
336 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH_INT        0x0000004A
337 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH_INT       0x0000004B
338 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH_INT       0x0000004C
339 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH_INT       0x0000004D
340 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLT_PUSH_INT       0x0000004E
341 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLE_PUSH_INT       0x0000004F
342 /* same up to here */
343 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT                0x00000050
344 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_BFREV_INT                 0x00000051
345 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADDC_UINT                 0x00000052
346 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SUBB_UINT                 0x00000053
347 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_GROUP_BARRIER             0x00000054
348 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_GROUP_SEQ_BEGIN           0x00000055 /* not on CAYMAN */
349 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_GROUP_SEQ_END             0x00000056 /* not on CAYMAN */
350 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SET_MODE                  0x00000057
351 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SET_CF_IDX0               0x00000058 /* not on CAYMAN */
352 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SET_CF_IDX1               0x00000059 /* not on CAYMAN */
353 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SET_LDS_SIZE              0x0000005A
354 
355 #define     CM_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_INT24                 0x0000005B /* not on evergreen*/
356 #define     CM_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_INT24               0x0000005C /* not on evergreen*/
357 #define     CM_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_TRUNC          0x0000005D /* not on evergreen*/
358 
359 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE                  0x00000081
360 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED               0x00000082
361 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE                  0x00000083
362 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED             0x00000084
363 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_FF                  0x00000085
364 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE                0x00000086
365 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED         0x00000087
366 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_FF              0x00000088
367 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE            0x00000089
368 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SQRT_IEEE                 0x0000008A
369 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN                       0x0000008D
370 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS                       0x0000008E
371 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_INT                 0x0000008F
372 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_INT                 0x00000090
373 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_UINT                0x00000091
374 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT                0x00000092
375 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_INT                 0x00000093 /* not on CAYMAN */
376 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_UINT                0x00000094 /* not on CAYMAN */
377 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_64                  0x00000095
378 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED_64          0x00000096
379 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_64              0x00000097
380 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED_64      0x00000098
381 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SQRT_64                   0x00000099
382 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_UINT               0x0000009A
383 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT                0x0000009B
384 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UINT_TO_FLT               0x0000009C
385 
386 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_BFM_INT                   0x000000A0
387 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT32_TO_FLT16            0x000000A2
388 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT16_TO_FLT32            0x000000A3
389 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UBYTE0_FLT                0x000000A4
390 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UBYTE1_FLT                0x000000A5
391 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UBYTE2_FLT                0x000000A6
392 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UBYTE3_FLT                0x000000A7
393 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_BCNT_INT                  0x000000AA
394 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FFBH_UINT                 0x000000AB
395 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FFBL_INT                  0x000000AC
396 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FFBH_INT                  0x000000AD
397 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_UINT4              0x000000AE
398 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT_IEEE                  0x000000AF
399 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_RPI            0x000000B0
400 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR          0x000000B1
401 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT24              0x000000B2
402 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MBCNT_32HI_INT            0x000000B3
403 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_OFFSET_TO_FLT             0x000000B4
404 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_UINT24                0x000000B5
405 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_BCNT_ACCUM_PREV_INT       0x000000B6
406 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MBCNT_32LO_ACCUM_PREV_INT 0x000000B7
407 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE_64                   0x000000B8
408 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE_64                  0x000000B9
409 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_64                  0x000000BA
410 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_64                  0x000000BB
411 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_64                    0x000000BC
412 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_64                    0x000000BD
413 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4                      0x000000BE
414 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE                 0x000000BF
415 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE                      0x000000C0
416 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX4                      0x000000C1
417 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FREXP_64                  0x000000C4
418 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LDEXP_64                  0x000000C5
419 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT_64                  0x000000C6
420 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_64             0x000000C7
421 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_64              0x000000C8
422 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_64             0x000000C9
423 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_64                    0x000000CA
424 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_64                    0x000000CB
425 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT                  0x000000CC
426 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT64_TO_FLT32            0x000000CD
427 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT32_TO_FLT64            0x000000CE
428 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SAD_ACCUM_PREV_UINT       0x000000CF
429 
430 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT                       0x000000D0
431 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_PREV                  0x000000D1
432 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_IEEE_PREV             0x000000D2
433 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_PREV                  0x000000D3
434 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULADD_PREV               0x000000D4
435 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULADD_IEEE_PREV          0x000000D5
436 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INTERP_XY                 0x000000D6
437 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INTERP_ZW                 0x000000D7
438 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INTERP_X                  0x000000D8
439 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INTERP_Z                  0x000000D9
440 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_STORE_FLAGS               0x000000DA
441 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOAD_STORE_FLAGS          0x000000DB
442 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LDS_1A                    0x000000DC
443 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LDS_1A1D                  0x000000DD
444 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LDS_2A                    0x000000DF
445 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INTERP_LOAD_P0            0x000000E0
446 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INTERP_LOAD_P10           0x000000E1
447 #define     EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INTERP_LOAD_P20           0x000000E2
448 
449 /* OP3 */
450 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_BFE_UINT                  0x00000004
451 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_BFE_INT                   0x00000005
452 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_BFI_INT                   0x00000006
453 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_FMA                       0x00000007
454 #define     CM_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_INT24              0x00000008 /* not on evergreen*/
455 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDNE_64                  0x00000009
456 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_FMA_64                    0x0000000A
457 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_LERP_UINT                 0x0000000B
458 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_BIT_ALIGN_INT             0x0000000C
459 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_BYTE_ALIGN_INT            0x0000000D
460 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_SAD_ACCUM_UINT            0x0000000E
461 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_SAD_ACCUM_HI_UINT         0x0000000F
462 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_UINT24             0x00000010
463 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_LDS_IDX_OP                0x00000011
464 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD                    0x00000014
465 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_M2                 0x00000015
466 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_M4                 0x00000016
467 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_D2                 0x00000017
468 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE               0x00000018
469 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDE                      0x00000019
470 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT                     0x0000001A
471 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGE                     0x0000001B
472 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDE_INT                  0x0000001C
473 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT_INT                 0x0000001D
474 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGE_INT                 0x0000001E
475 #define     EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT                   0x0000001F
476 
477 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM0_BUF0   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000040)
478 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM0_BUF1   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000041)
479 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM0_BUF2   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000042)
480 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM0_BUF3   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000043)
481 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM1_BUF0   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000044)
482 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM1_BUF1   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000045)
483 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM1_BUF2   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000046)
484 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM1_BUF3   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000047)
485 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM2_BUF0   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000048)
486 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM2_BUF1   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000049)
487 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM2_BUF2   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000004A)
488 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM2_BUF3   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000004B)
489 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3_BUF0   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000004C)
490 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3_BUF1   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000004D)
491 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3_BUF2   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000004E)
492 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_STREAM3_BUF3   EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000004F)
493 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_SCRATCH        EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000050)
494 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_RING           EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000052)
495 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT             EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000053)
496 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT_DONE        EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000054)
497 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_EXPORT         EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000055)
498 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_RAT            EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000056)
499 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_RAT_CACHELESS  EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000057)
500 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_RING1          EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000058)
501 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_RING2          EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x00000059)
502 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_RING3          EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000005A)
503 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_EXPORT_COMBINED EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000005B)
504 #define     EG_V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_MEM_RAT_COMBINED_CACHELESS  EG_S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(0x0000005C)
505 
506 #define BC_INST(bc, x) ((bc)->chip_class >= EVERGREEN ? EG_##x : x)
507 
508 #define CTX_INST(x) (ctx->bc->chip_class >= EVERGREEN ? EG_##x : x)
509 
510 #endif
511