Changes between Version 22 and Version 23 of GcnInstrsVop2
- Timestamp:
- 12/12/15 23:01:08 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GcnInstrsVop2
v22 v23 549 549 Syntax VOP3B GCN 1.2: V_ADD_U32 VDST, SDST(2), SRC0, SRC1<br /> 550 550 Description: Add SRC0 to SRC1 and store result to VDST and store carry flag to 551 SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit.<br /> 551 SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit. 552 Bits for inactive threads in SDST are always zeroed.<br /> 552 553 Operation:<br /> 553 554 <code>UINT64 temp = (UINT64)SRC0 + (UINT64)SRC1 554 555 VDST = temp 556 SDS = 0 555 557 UINT64 mask = (1ULL<<LANEID) 556 558 SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)</code></p> … … 562 564 Description: Add SRC0 to SRC1 with carry stored in SSRC2 bit with number that equal lane id, 563 565 and store result to VDST and store carry flag to SDST (or VCC) bit with number 564 that equal to lane id. SDST and SSRC2 are 64-bit.<br /> 566 that equal to lane id. SDST and SSRC2 are 64-bit. 567 Bits for inactive threads in SDST are always zeroed.<br /> 565 568 Operation:<br /> 566 569 <code>UINT64 mask = (1ULL<<LANEID) 567 570 UINT8 CC = ((SSRC2&mask) ? 1 : 0) 568 571 UINT64 temp = (UINT64)SRC0 + (UINT64)SRC1 + CC 572 SDST = 0 569 573 VDST = temp 570 574 SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)</code></p> … … 936 940 Syntax VOP3B GCN 1.2: V_SUB_U32 VDST, SDST(2), SRC0, SRC1<br /> 937 941 Description: Subtract SRC1 from SRC0 and store result to VDST and store borrow flag to 938 SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit.<br /> 942 SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit. 943 Bits for inactive threads in SDST are always zeroed.<br /> 939 944 Operation:<br /> 940 945 <code>UINT64 temp = (UINT64)SRC0 - (UINT64)SRC1 941 946 VDST = temp 947 SDST = 0 942 948 UINT64 mask = (1ULL<<LANEID) 943 949 SDST = (SDST&~mask) | ((temp>>32) ? mask : 0)</code></p> … … 950 956 and store result to VDST and store carry flag to SDST (or VCC) bit with number 951 957 that equal to lane id. Borrow is stored in SSRC2 bit with number of lane id. 952 SDST and SSRC2 are 64-bit. <br />958 SDST and SSRC2 are 64-bit. Bits for inactive threads in SDST are always zeroed.<br /> 953 959 Operation:<br /> 954 960 <code>UINT64 mask = (1ULL<<LANEID) 955 961 UINT8 CC = ((SSRC2&mask) ? 1 : 0) 956 962 UINT64 temp = (UINT64)SRC0 - (UINT64)SRC1 - CC 963 SDST = 0 957 964 VDST = temp 958 965 SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)</code></p> … … 965 972 and store result to VDST and store carry flag to SDST (or VCC) bit with number 966 973 that equal to lane id. Borrow is stored in SSRC2 bit with number of lane id. 967 SDST and SSRC2 are 64-bit. <br />974 SDST and SSRC2 are 64-bit. Bits for inactive threads in SDST are always zeroed.<br /> 968 975 Operation:<br /> 969 976 <code>UINT64 mask = (1ULL<<LANEID) 970 977 UINT8 CC = ((SSRC2&mask) ? 1 : 0) 971 978 UINT64 temp = (UINT64)SRC1 - (UINT64)SRC0 - CC 979 SDST = 0 972 980 VDST = temp 973 981 SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)</code></p> … … 987 995 Syntax VOP3B GCN 1.2: V_SUBREV_U32 VDST, SDST(2), SRC0, SRC1<br /> 988 996 Description: Subtract SRC0 from SRC1 and store result to VDST and store borrow flag to 989 SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit.<br /> 997 SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit. 998 Bits for inactive threads in SDST are always zeroed.<br /> 990 999 Operation:<br /> 991 1000 <code>UINT64 temp = (UINT64)SRC1 - (UINT64)SRC0 992 1001 VDST = temp 1002 SDST = 0 993 1003 UINT64 mask = (1ULL<<LANEID) 994 1004 SDST = (SDST&~mask) | ((temp>>32) ? mask : 0)</code></p>