| 1154 | <h4>DS_ADD_U32</h4> |
| 1155 | <p>Opcode: 0 (0x0)<br /> |
| 1156 | Syntax: DS_ADD_U32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1157 | Description: Adds unsigned integer value from LDS/GDS under address (ADDR+OFFSET) & ~3 and |
| 1158 | VDATA0, and store result back to LDS/GDS under this address. Operation is atomic.<br /> |
| 1159 | Operation:<br /> |
| 1160 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1161 | *V = *V + VDATA0 // atomic operation</code></p> |
| 1162 | <h4>DS_AND_B32</h4> |
| 1163 | <p>Opcode: 9 (0x9)<br /> |
| 1164 | Syntax: DS_AND_B32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1165 | Operation: Do bitwise AND operatin on 32-bit value from LDS/GDS under address |
| 1166 | (ADDR+OFFSET) & ~3, and value from VDATA0; and store result to LDS/GDS under this same |
| 1167 | address. Operation is atomic.<br /> |
| 1168 | Operation:<br /> |
| 1169 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1170 | *V = *V & VDATA0 // atomic operation</code></p> |
| 1171 | <h4>DS_DEC_U32</h4> |
| 1172 | <p>Opcode: 4 (0x4)<br /> |
| 1173 | Syntax: DS_DEC_U32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1174 | Description: |
| 1175 | Operation: Load unsigned value from LDS/GDS under address (ADDR+OFFSET) & ~3, and |
| 1176 | compare with unsigned value from VDATA0. If VDATA0 greater or equal and loaded |
| 1177 | unsigned value is zero, then increment value from LDS/GDS, otherwise store |
| 1178 | VDATA0 to LDS/GDS. Operation is atomic.<br /> |
| 1179 | Operation:<br /> |
| 1180 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1181 | *V = (VDATA0 >= *V && *V!=0) ? *V-1 : VDATA0 // atomic operation</code></p> |
| 1182 | <h4>DS_INC_U32</h4> |
| 1183 | <p>Opcode: 3 (0x3)<br /> |
| 1184 | Syntax: DS_INC_U32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1185 | Description: Load unsigned value from LDS/GDS under address (ADDR+OFFSET) & ~3, and |
| 1186 | compare with unsigned value from VDATA0. If VDATA0 greater, then increment value |
| 1187 | from LDS/GDS, otherwise store 0 to LDS/GDS. Operation is atomic.<br /> |
| 1188 | Operation:<br /> |
| 1189 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1190 | *V = (VDATA0 > *V) ? *V+1 : 0 // atomic operation</code></p> |
| 1191 | <h4>DS_MAX_I32</h4> |
| 1192 | <p>Opcode: 6 (0x6)<br /> |
| 1193 | Syntax: DS_MAX_I32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1194 | Description: Choose greatest signed integer value from LDS/GDS under address |
| 1195 | (ADDR+OFFSET) & ~3 and VDATA0, and store result to LDS/GDS under this same address. |
| 1196 | Operation is atomic.<br /> |
| 1197 | Operation:<br /> |
| 1198 | <code>INT32* V = (INT32*)(DS + (ADDR+OFFSET)&~3) |
| 1199 | *V = MAX(*V, (INT32)VDATA0) // atomic operation</code></p> |
| 1200 | <h4>DS_MAX_U32</h4> |
| 1201 | <p>Opcode: 8 (0x8)<br /> |
| 1202 | Syntax: DS_MAX_U32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1203 | Description: Choose greatest unsigned integer value from LDS/GDS under address |
| 1204 | (ADDR+OFFSET) & ~3 and VDATA0, and store result to LDS/GDS under this same address. |
| 1205 | Operation is atomic.<br /> |
| 1206 | Operation:<br /> |
| 1207 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1208 | *V = MAX(*V, VDATA0) // atomic operation</code></p> |
| 1209 | <h4>DS_MIN_I32</h4> |
| 1210 | <p>Opcode: 5 (0x5)<br /> |
| 1211 | Syntax: DS_MIN_I32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1212 | Description: Choose smallest signed integer value from LDS/GDS under address |
| 1213 | (ADDR+OFFSET) & ~3 and VDATA0, and store result to LDS/GDS under this same address. |
| 1214 | Operation is atomic.<br /> |
| 1215 | Operation:<br /> |
| 1216 | <code>INT32* V = (INT32*)(DS + (ADDR+OFFSET)&~3) |
| 1217 | *V = MIN(*V, (INT32)VDATA0) // atomic operation</code></p> |
| 1218 | <h4>DS_MIN_U32</h4> |
| 1219 | <p>Opcode: 7 (0x7)<br /> |
| 1220 | Syntax: DS_MIN_U32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1221 | Description: Choose smallest unsigned integer value from LDS/GDS under address |
| 1222 | (ADDR+OFFSET) & ~3 and VDATA0, and store result to LDS/GDS under this same address. |
| 1223 | Operation is atomic.<br /> |
| 1224 | Operation:<br /> |
| 1225 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1226 | *V = MIN(*V, VDATA0) // atomic operation</code></p> |
| 1227 | <h4>DS_OR_B32</h4> |
| 1228 | <p>Opcode: 10 (0xa)<br /> |
| 1229 | Syntax: DS_OR_B32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1230 | Operation: Do bitwise OR operatin on 32-bit value from LDS/GDS under address |
| 1231 | (ADDR+OFFSET) & ~3, and value from VDATA0; and store result to LDS/GDS under this same |
| 1232 | address. Operation is atomic.<br /> |
| 1233 | Operation:<br /> |
| 1234 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1235 | *V = *V | VDATA0 // atomic operation</code></p> |
| 1236 | <h4>DS_RSUB_U32</h4> |
| 1237 | <p>Opcode: 2 (0x2)<br /> |
| 1238 | Syntax: DS_RSUB_U32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1239 | Description: Subtract unsigned integer value from LDS/GDS under address (ADDR+OFFSET) & ~3 |
| 1240 | from value in VDATA0, and store result back to LDS/GDS under this same address. |
| 1241 | Operation is atomic.<br /> |
| 1242 | Operation:<br /> |
| 1243 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1244 | *V = VDATA0 - *V // atomic operation</code></p> |
| 1245 | <h4>DS_SUB_U32</h4> |
| 1246 | <p>Opcode: 1 (0x1)<br /> |
| 1247 | Syntax: DS_SUB_U32 ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1248 | Description: Subtract VDATA0 from unsigned integer value from LDS/GDS under address |
| 1249 | (ADDR+OFFSET) & ~3, and store result back to LDS/GDS under this same address. |
| 1250 | Operation is atomic.<br /> |
| 1251 | Operation:<br /> |
| 1252 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1253 | *V = *V - VDATA0 // atomic operation</code></p> |