| 1305 | <h4>S_SCRATCH_LOAD_DWORD</h4> |
| 1306 | <p>Opcode: 5 (0x5) only for GCN 1.4<br /> |
| 1307 | Syntax: S_SCRATCH_LOAD_DWORD SDATA, SBASE(2), SGPROFFSET OFFSET:OFFSET<br /> |
| 1308 | Description: Load single dword from read-only memory through constant cache (kcache).<br /> |
| 1309 | Operation:<br /> |
| 1310 | <code>SDATA = *(UINT32*)(SMEM + (OFFSET & ~3) + (SGPROFFSET & ~3)*64)</code></p> |
| 1311 | <h4>S_SCRATCH_LOAD_DWORDX2</h4> |
| 1312 | <p>Opcode: 6 (0x6) only for GCN 1.4<br /> |
| 1313 | Syntax: S_SCRATCH_LOAD_DWORDX2 SDATA, SBASE(2), SGPROFFSET OFFSET:OFFSET<br /> |
| 1314 | Description: Load two dwords from read-only memory through constant cache (kcache).<br /> |
| 1315 | Operation:<br /> |
| 1316 | <code>SDATA = *(UINT64*)(SMEM + (OFFSET & ~3) + (SGPROFFSET & ~3)*64)</code></p> |
| 1317 | <h4>S_SCRATCH_LOAD_DWORDX4</h4> |
| 1318 | <p>Opcode: 7 (0x7) only for GCN 1.4<br /> |
| 1319 | Syntax: S_SCRATCH_LOAD_DWORDX4 SDATA, SBASE(2), SGPROFFSET OFFSET:OFFSET<br /> |
| 1320 | Description: Load four dwords from read-only memory through constant cache (kcache).<br /> |
| 1321 | Operation:<br /> |
| 1322 | <code>for (BYTE i = 0; i < 4; i++) |
| 1323 | SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET & ~3) + (SGPROFFSET & ~3)*64)</code></p> |
| 1324 | <h4>S_SCRATCH_STORE_DWORD</h4> |
| 1325 | <p>Opcode: 21 (0x15) only for GCN 1.4<br /> |
| 1326 | Syntax: S_SCRATCH_STORE_DWORD SDATA, SBASE(2), SGPROFFSET OFFSET:OFFSET<br /> |
| 1327 | Description: Store single dword to memory.<br /> |
| 1328 | Operation:<br /> |
| 1329 | <code>*(UINT32*)(SMEM + (OFFSET & ~3) + (SGPROFFSET & ~3)*64) = SDATA</code></p> |
| 1330 | <h4>S_SCRATCH_STORE_DWORDX2</h4> |
| 1331 | <p>Opcode: 22 (0x16) only for GCN 1.4<br /> |
| 1332 | Syntax: S_SCRATCH_STORE_DWORDX2 SDATA(2), SBASE(2), SGPROFFSET OFFSET:OFFSET<br /> |
| 1333 | Description: Store two dwords to memory.<br /> |
| 1334 | Operation:<br /> |
| 1335 | <code>*(UINT64*)(SMEM + (OFFSET & ~3) + (SGPROFFSET & ~3)*64) = SDATA</code></p> |
| 1336 | <h4>S_SCRATCH_STORE_DWORDX4</h4> |
| 1337 | <p>Opcode: 23 (0x17) only for GCN 1.4<br /> |
| 1338 | Syntax: S_SCRATCH_STORE_DWORDX4 SDATA(4), SBASE(2), SGPROFFSET OFFSET:OFFSET<br /> |
| 1339 | Description: Store four dwords to memory.<br /> |
| 1340 | Operation:<br /> |
| 1341 | <code>for (BYTE i = 0; i < 4; i++) |
| 1342 | *(UINT32*)(SMEM + i*4 + (OFFSET & ~3) + (SGPROFFSET & ~3)*64) = SDATA[i]</code></p> |