| 497 | SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)</code></p> |
| 498 | <h4>V_ADDC_U32</h4> |
| 499 | <p>Opcode VOP2: 40 (0x28) for GCN 1.0/1.1; 28 (0x1c) for GCN 1.2<br /> |
| 500 | Opcode VOP3b: 296 (0x128) for GCN 1.0/1.1; 284 (0x11c) for GCN 1.2<br /> |
| 501 | Syntax VOP2 GCN 1.0/1.1: V_ADDC_U32 VDST, VCC, SRC0, SRC1, VCC<br /> |
| 502 | Syntax VOP3b GCN 1.2: V_ADDC_U32 VDST, SDST(2), SRC0, SRC1, SSRC2(2)<br /> |
| 503 | Description: Add SRC0 to SRC1 with carry stored in SSRC2 bit with number that equal lane id, |
| 504 | and store result to VDST and store carry flag to SDST (or VCC) bit with number |
| 505 | that equal to lane id. SDST and SSRC2 are 64-bit.<br /> |
| 506 | Operation:<br /> |
| 507 | <code>UINT64 mask = (1ULL<<LANEID) |
| 508 | UINT8 CC = ((SSRC2&mask) ? 1 : 0) |
| 509 | UINT64 temp = (UINT64)SRC0 + (UINT64)SRC1 + CC |
| 510 | VDST = temp |
| 807 | <h4>V_SUBB_U32</h4> |
| 808 | <p>Opcode VOP2: 41 (0x29) for GCN 1.0/1.1; 29 (0x1d) for GCN 1.2<br /> |
| 809 | Opcode VOP3b: 297 (0x129) for GCN 1.0/1.1; 285 (0x11d) for GCN 1.2<br /> |
| 810 | Syntax VOP2 GCN 1.0/1.1: V_SUBB_U32 VDST, VCC, SRC0, SRC1, VCC<br /> |
| 811 | Syntax VOP3b GCN 1.2: V_SUBB_U32 VDST, SDST(2), SRC0, SRC1, SSRC2(2)<br /> |
| 812 | Description: Subtract SRC1 with borrow from SRC0, |
| 813 | and store result to VDST and store carry flag to SDST (or VCC) bit with number |
| 814 | that equal to lane id. Borrow is stored in SSRC2 bit with number of lane id. |
| 815 | SDST and SSRC2 are 64-bit.<br /> |
| 816 | Operation:<br /> |
| 817 | <code>UINT64 mask = (1ULL<<LANEID) |
| 818 | UINT8 CC = ((SSRC2&mask) ? 1 : 0) |
| 819 | UINT64 temp = (UINT64)SRC0 - (UINT64)SRC1 - CC |
| 820 | VDST = temp |
| 821 | SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)</code></p> |
| 829 | <h4>V_SUBBREV_U32</h4> |
| 830 | <p>Opcode VOP2: 42 (0x2a) for GCN 1.0/1.1; 30 (0x1e) for GCN 1.2<br /> |
| 831 | Opcode VOP3b: 298 (0x12a) for GCN 1.0/1.1; 286 (0x11e) for GCN 1.2<br /> |
| 832 | Syntax VOP2 GCN 1.0/1.1: V_SUBBREV_U32 VDST, VCC, SRC0, SRC1, VCC<br /> |
| 833 | Syntax VOP3b GCN 1.2: V_SUBBREV_U32 VDST, SDST(2), SRC0, SRC1, SSRC2(2)<br /> |
| 834 | Description: Subtract SRC0 with borrow from SRC1, |
| 835 | and store result to VDST and store carry flag to SDST (or VCC) bit with number |
| 836 | that equal to lane id. Borrow is stored in SSRC2 bit with number of lane id. |
| 837 | SDST and SSRC2 are 64-bit.<br /> |
| 838 | Operation:<br /> |
| 839 | <code>UINT64 mask = (1ULL<<LANEID) |
| 840 | UINT8 CC = ((SSRC2&mask) ? 1 : 0) |
| 841 | UINT64 temp = (UINT64)SRC1 - (UINT64)SRC0 - CC |
| 842 | VDST = temp |
| 843 | SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)</code></p> |