| 1154 | <h4>DS_ADD_RTN_U32</h4> |
| 1155 | <p>Opcode: 32 (0x20)<br /> |
| 1156 | Syntax: DS_ADD_RTN_U32 VDST, ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1157 | Description: Adds unsigned integer value from LDS/GDS at address (ADDR+OFFSET) & ~3 and |
| 1158 | VDATA0, and store result back to LDS/GDS at this address. Previous value from |
| 1159 | LDS/GDS are stored in VDST. Operation is atomic.<br /> |
| 1160 | Operation:<br /> |
| 1161 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1162 | VDST = *V; *V = *V + VDATA0 // atomic operation</code></p> |
| 1180 | <h4>DS_DEC_RTN_U32</h4> |
| 1181 | <p>Opcode: 36 (0x24)<br /> |
| 1182 | Syntax: DS_DEC_RTN_U32 VDST, ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1183 | Description: Load unsigned value from LDS/GDS at address (ADDR+OFFSET) & ~3, and |
| 1184 | compare with unsigned value from VDATA0. If VDATA0 greater or equal and loaded |
| 1185 | unsigned value is zero, then increment value from LDS/GDS, otherwise store |
| 1186 | VDATA0 to LDS/GDS. Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br /> |
| 1187 | Operation:<br /> |
| 1188 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1189 | VDST = *V; *V = (VDATA0 >= *V && *V!=0) ? *V-1 : VDATA0 // atomic operation</code></p> |
| 1200 | <h4>DS_INC_RTN_U32</h4> |
| 1201 | <p>Opcode: 35 (0x23)<br /> |
| 1202 | Syntax: DS_INC_RTN_U32 VDST, ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1203 | Description: Load unsigned value from LDS/GDS at address (ADDR+OFFSET) & ~3, and |
| 1204 | compare with unsigned value from VDATA0. If VDATA0 greater, then increment value |
| 1205 | from LDS/GDS, otherwise store 0 to LDS/GDS. |
| 1206 | Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br /> |
| 1207 | Operation:<br /> |
| 1208 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1209 | VDST = *V; *V = (VDATA0 > *V) ? *V+1 : 0 // atomic operation</code></p> |
| 1274 | <h4>DS_RSUB_RTN_U32</h4> |
| 1275 | <p>Opcode: 34 (0x22)<br /> |
| 1276 | Syntax: DS_RSUB_RTN_U32 VDST, ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1277 | Description: Subtract unsigned integer value from LDS/GDS at address (ADDR+OFFSET) & ~3 |
| 1278 | from value in VDATA0, and store result back to LDS/GDS at this same address. |
| 1279 | Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br /> |
| 1280 | Operation:<br /> |
| 1281 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1282 | VDST= *V; *V = VDATA0 - *V // atomic operation</code></p> |
| 1292 | <h4>DS_SUB_RTN_U32</h4> |
| 1293 | <p>Opcode: 33 (0x21)<br /> |
| 1294 | Syntax: DS_SUB_RTN_U32 VDST, ADDR, VDATA0 [OFFSET:OFFSET]<br /> |
| 1295 | Description: Subtract VDATA0 from unsigned integer value from LDS/GDS at address |
| 1296 | (ADDR+OFFSET) & ~3, and store result back to LDS/GDS at this same address. |
| 1297 | Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br /> |
| 1298 | Operation:<br /> |
| 1299 | <code>UINT32* V = (UINT32*)(DS + (ADDR+OFFSET)&~3) |
| 1300 | VDST = *V; *V = *V - VDATA0 // atomic operation</code></p> |
| 1325 | *V0 = VDATA0 |
| 1326 | *V1 = VDATA1</code></p> |
| 1327 | <h4>DS_WRITE2ST64_B32</h4> |
| 1328 | <p>Opcode: 15 (0xf)<br /> |
| 1329 | Syntax: DS_WRITE2ST64_B32 ADDR, VDATA0, VDATA1 [OFFSET0:OFFSET0] [OFFSET1:OFFSET1]<br /> |
| 1330 | Description: Store one dword from VDATA0 into LDS/GDS at address (ADDR+OFFSET0<em>256) & ~3, |
| 1331 | and second into LDS/GDS at address (ADDR+OFFSET1</em>256) & ~3.<br /> |
| 1332 | Operation:<br /> |
| 1333 | <code>UINT32* V0 = (UINT32*)(DS + (ADDR + OFFSET0*256)&~3) |
| 1334 | UINT32* V1 = (UINT32*)(DS + (ADDR + OFFSET1*256)&~3) |