323 | | <h3>S_BREV_B32</h3> |
| 323 | <h4>S_BCNT0_I32_B32</h4> |
| 324 | <p>Opcode: 13 (0xd) for GCN 1.0/1.1; 10 (0xa) for GCN 1.2<br /> |
| 325 | Syntax: S_BCNT0_I32_B32 SDST, SSRC0<br /> |
| 326 | Description: Count zero bits in SSRC0 and store result to SDST. |
| 327 | If result is non-zero, store 1 to SCC, otherwise store 0 to SCC.<br /> |
| 328 | <code>SDST = 0 |
| 329 | for (UINT8 i = 0; i < 32; i++) |
| 330 | SDST += ((1U<<i) & SSRC0) == 0 |
| 331 | SCC = SDST!=0</code></p> |
| 332 | <h4>S_BCNT0_I32_B64</h4> |
| 333 | <p>Opcode: 14 (0xd) for GCN 1.0/1.1; 11 (0xb) for GCN 1.2<br /> |
| 334 | Syntax: S_BCNT0_I32_B64 SDST, SSRC0(2)<br /> |
| 335 | Description: Count zero bits in SSRC0 and store result to SDST. |
| 336 | If result is non-zero, store 1 to SCC, otherwise store 0 to SCC. SSRC0 is 64-bit.<br /> |
| 337 | <code>SDST = 0 |
| 338 | for (UINT8 i = 0; i < 64; i++) |
| 339 | SDST += ((1ULL<<i) & SSRC0) == 0 |
| 340 | SCC = SDST!=0</code></p> |
| 341 | <h4>S_BCNT1_I32_B32</h4> |
| 342 | <p>Opcode: 15 (0xf) for GCN 1.0/1.1; 12 (0xc) for GCN 1.2<br /> |
| 343 | Syntax: S_BCNT1_I32_B65 SDST, SSRC0<br /> |
| 344 | Description: Count one bits in SSRC0 and store result to SDST. |
| 345 | If result is non-zero, store 1 to SCC, otherwise store 0 to SCC.<br /> |
| 346 | <code>SDST = 0 |
| 347 | for (UINT8 i = 0; i < 32; i++) |
| 348 | SDST += ((1U<<i) & SSRC0) != 0 |
| 349 | SCC = SDST!=0</code></p> |
| 350 | <h4>S_BCNT1_I32_B64</h4> |
| 351 | <p>Opcode: 16 (0x10) for GCN 1.0/1.1; 13 (0xd) for GCN 1.2<br /> |
| 352 | Syntax: S_BCNT1_I32_B64 SDST, SSRC0(2)<br /> |
| 353 | Description: Count one bits in SSRC0 and store result to SDST. |
| 354 | If result is non-zero, store 1 to SCC, otherwise store 0 to SCC. SSRC0 is 64-bit.<br /> |
| 355 | <code>SDST = 0 |
| 356 | for (UINT8 i = 0; i < 64; i++) |
| 357 | SDST += ((1ULL<<i) & SSRC0) != 0 |
| 358 | SCC = SDST!=0</code></p> |
| 359 | <h4>S_BREV_B32</h4> |
348 | | <h3>S_MOV_B32</h3> |
| 384 | <h4>S_FF0_I32_B32</h4> |
| 385 | <p>Opcode: 17 (0x11) for GCN 1.0/1.1; 14 (0xe) for GCN 1.2<br /> |
| 386 | Syntax: S_FF0_I32_B32 SDST, SSRC0<br /> |
| 387 | Description: Find first zero bit in SSRC0. If found store number of bit to SDST, |
| 388 | otherwise set SDST to -1.<br /> |
| 389 | <code>SDST = -1 |
| 390 | for (UINT8 i = 0; i < 32; i++) |
| 391 | if ((1U<<i) & SSRC0) == 0) |
| 392 | { SDST = i; break; }</code></p> |
| 393 | <h4>S_FF0_I32_B64</h4> |
| 394 | <p>Opcode: 18 (0x12) for GCN 1.0/1.1; 15 (0xf) for GCN 1.2<br /> |
| 395 | Syntax: S_FF0_I32_B64 SDST, SSRC0(2)<br /> |
| 396 | Description: Find first zero bit in SSRC0. If found store number of bit to SDST, |
| 397 | otherwise set SDST to -1. SSRC0 is 64-bit.<br /> |
| 398 | <code>SDST = -1 |
| 399 | for (UINT8 i = 0; i < 64; i++) |
| 400 | if ((1ULL<<i) & SSRC0) == 0) |
| 401 | { SDST = i; break; }</code></p> |
| 402 | <h4>S_FF1_I32_B32</h4> |
| 403 | <p>Opcode: 19 (0x13) for GCN 1.0/1.1; 16 (0x10) for GCN 1.2<br /> |
| 404 | Syntax: S_FF1_I32_B32 SDST, SSRC0<br /> |
| 405 | Description: Find first one bit in SSRC0. If found store number of bit to SDST, |
| 406 | otherwise set SDST to -1.<br /> |
| 407 | <code>SDST = -1 |
| 408 | for (UINT8 i = 0; i < 32; i++) |
| 409 | if ((1U<<i) & SSRC0) != 0) |
| 410 | { SDST = i; break; }</code></p> |
| 411 | <h4>S_FF1_I32_B64</h4> |
| 412 | <p>Opcode: 20 (0x14) for GCN 1.0/1.1; 17 (0x11) for GCN 1.2<br /> |
| 413 | Syntax: S_FF0_I32_B64 SDST, SSRC0(2)<br /> |
| 414 | Description: Find first one bit in SSRC0. If found store number of bit to SDST, |
| 415 | otherwise set SDST to -1. SSRC0 is 64-bit.<br /> |
| 416 | <code>SDST = -1 |
| 417 | for (UINT8 i = 0; i < 64; i++) |
| 418 | if ((1ULL<<i) & SSRC0) != 0) |
| 419 | { SDST = i; break; }</code></p> |
| 420 | <h4>S_FLBIT_I32_B32</h4> |
| 421 | <p>Opcode: 21 (0x15) for GCN 1.0/1.1; 18 (0x12) for GCN 1.2<br /> |
| 422 | Syntax: S_FLBIT_I32_B32 SDST, SSRC0<br /> |
| 423 | Description: Find last one bit in SSRC0. If found store number of skipped bits to SDST, |
| 424 | otherwise set SDST to -1.<br /> |
| 425 | <code>SDST = -1 |
| 426 | for (INT8 i = 31; i >= 0; i++) |
| 427 | if ((1U<<i) & SSRC0) != 0) |
| 428 | { SDST = 31-i; break; }</code></p> |
| 429 | <h4>S_FLBIT_I32_B64</h4> |
| 430 | <p>Opcode: 22 (0x16) for GCN 1.0/1.1; 19 (0x13) for GCN 1.2<br /> |
| 431 | Syntax: S_FLBIT_I32_B64 SDST, SSRC0(2)<br /> |
| 432 | Description: Find last one bit in SSRC0. If found store number of skipped bits to SDST, |
| 433 | otherwise set SDST to -1. SSRC0 is 64-bit<br /> |
| 434 | <code>SDST = -1 |
| 435 | for (INT8 i = 63; i >= 0; i++) |
| 436 | if ((1ULL<<i) & SSRC0) != 0) |
| 437 | { SDST = 63-i; break; }</code></p> |
| 438 | <h4>S_MOV_B32</h4> |