| 1296 | <h4>V_FFBH_U32</h4> |
| 1297 | <p>Opcode VOP1: 57 (0x39) for GCN 1.0/1.1; 45 (0x2d) for GCN 1.2<br /> |
| 1298 | Opcode VOP3A: 441 (0x1b9) for GCN 1.0/1.1; 365 (0x16d) for GCN 1.2<br /> |
| 1299 | Syntax: V_FFBH_U32 VDST, SRC0<br /> |
| 1300 | Description: Find last one bit in SRC0. If found, store number of skipped bits to VDST, |
| 1301 | otherwise set VDST to -1.<br /> |
| 1302 | Operation:<br /> |
| 1303 | <code>VDST = -1 |
| 1304 | for (INT8 i = 31; i >= 0; i--) |
| 1305 | if ((1U<<i) & SRC0) != 0) |
| 1306 | { VDST = 31-i; break; }</code></p> |
| 1307 | <h4>V_FFBL_B32</h4> |
| 1308 | <p>Opcode VOP1: 58 (0x3a) for GCN 1.0/1.1; 46 (0x2e) for GCN 1.2<br /> |
| 1309 | Opcode VOP3A: 442 (0x1ba) for GCN 1.0/1.1; 366 (0x16e) for GCN 1.2<br /> |
| 1310 | Syntax: V_FFBL_B32 VDST, SRC0<br /> |
| 1311 | Description: Find first one bit in SRC0. If found, store number of bit to VDST, |
| 1312 | otherwise set VDST to -1.<br /> |
| 1313 | Operation:<br /> |
| 1314 | <code>VDST = -1 |
| 1315 | for (UINT8 i = 0; i < 32; i++) |
| 1316 | if ((1U<<i) & SRC0) != 0) |
| 1317 | { VDST = i; break; }</code></p> |
| 1318 | <h4>V_FFBH_I32</h4> |
| 1319 | <p>Opcode VOP1: 59 (0x3b) for GCN 1.0/1.1; 47 (0x2f) for GCN 1.2<br /> |
| 1320 | Opcode VOP3A: 443 (0x1bb) for GCN 1.0/1.1; 367 (0x16f) for GCN 1.2<br /> |
| 1321 | Syntax: V_FFBH_I32 VDST, SRC0<br /> |
| 1322 | Description: Find last opposite bit to sign in SRC0. If found, store number of skipped bits |
| 1323 | to VDST, otherwise set VDST to -1.<br /> |
| 1324 | Operation:<br /> |
| 1325 | <code>VDST = -1 |
| 1326 | UINT32 bitval = (INT32)SRC0>=0 ? 1 : 0 |
| 1327 | for (INT8 i = 31; i >= 0; i--) |
| 1328 | if ((1U<<i) & SRC0) == (bitval<<i)) |
| 1329 | { VDST = 31-i; break; }</code></p> |