Changeset 1742 in CLRX


Ignore:
Timestamp:
Nov 22, 2015, 3:57:50 PM (5 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Doc updates: Fixed description of the S_SUBB_U32, added description for V_ADDC_U32, V_SUBB_U32 and V_SUBBREV_U32.

Location:
CLRadeonExtender/trunk/doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/doc/GcnInstrsSop2.md

    r1741 r1742  
    560560Opcode: 5 (0x5) 
    561561Syntax: S_SUBB_U32 SDST, SSRC0, SSRC1 
    562 Descrition: Subtract SSRC0 to SSRC1 with SCC value and store result into SDST and store
     562Descrition: Subtract SSRC1 with SCC from SSRC0 value and store result into SDST and store
    563563carry-out flag into SCC. 
    564564Operation: 
  • CLRadeonExtender/trunk/doc/GcnInstrsVop2.md

    r1741 r1742  
    150150Syntax VOP3b GCN 1.2: V_ADD_U32 VDST, SDST(2), SRC0, SRC1 
    151151Description: Add SRC0 to SRC1 and store result to VDST and store carry flag to
    152 SDST bit with number that equal to lane id. SDST is 64-bit. 
     152SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit. 
    153153Operation: 
    154154```
     
    156156VDST = temp
    157157UINT64 mask = (1ULL<<LANEID)
     158SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)
     159```
     160
     161#### V_ADDC_U32
     162
     163Opcode VOP2: 40 (0x28) for GCN 1.0/1.1; 28 (0x1c) for GCN 1.2 
     164Opcode VOP3b: 296 (0x128) for GCN 1.0/1.1; 284 (0x11c) for GCN 1.2 
     165Syntax VOP2 GCN 1.0/1.1: V_ADDC_U32 VDST, VCC, SRC0, SRC1, VCC 
     166Syntax VOP3b GCN 1.2: V_ADDC_U32 VDST, SDST(2), SRC0, SRC1, SSRC2(2) 
     167Description: Add SRC0 to SRC1 with carry stored in SSRC2 bit with number that equal lane id,
     168and store result to VDST and store carry flag to SDST (or VCC) bit with number
     169that equal to lane id. SDST and SSRC2 are 64-bit. 
     170Operation: 
     171```
     172UINT64 mask = (1ULL<<LANEID)
     173UINT8 CC = ((SSRC2&mask) ? 1 : 0)
     174UINT64 temp = (UINT64)SRC0 + (UINT64)SRC1 + CC
     175VDST = temp
    158176SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)
    159177```
     
    581599Syntax VOP3b GCN 1.2: V_SUB_U32 VDST, SDST(2), SRC0, SRC1 
    582600Description: Subtract SRC1 from SRC0 and store result to VDST and store borrow flag to
    583 SDST bit with number that equal to lane id. SDST is 64-bit. 
     601SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit. 
    584602Operation: 
    585603```
     
    590608```
    591609
     610#### V_SUBB_U32
     611
     612Opcode VOP2: 41 (0x29) for GCN 1.0/1.1; 29 (0x1d) for GCN 1.2 
     613Opcode VOP3b: 297 (0x129) for GCN 1.0/1.1; 285 (0x11d) for GCN 1.2 
     614Syntax VOP2 GCN 1.0/1.1: V_SUBB_U32 VDST, VCC, SRC0, SRC1, VCC 
     615Syntax VOP3b GCN 1.2: V_SUBB_U32 VDST, SDST(2), SRC0, SRC1, SSRC2(2) 
     616Description: Subtract SRC1 with borrow from SRC0,
     617and store result to VDST and store carry flag to SDST (or VCC) bit with number
     618that equal to lane id. Borrow is stored in SSRC2 bit with number of lane id.
     619SDST and SSRC2 are 64-bit. 
     620Operation: 
     621```
     622UINT64 mask = (1ULL<<LANEID)
     623UINT8 CC = ((SSRC2&mask) ? 1 : 0)
     624UINT64 temp = (UINT64)SRC0 - (UINT64)SRC1 - CC
     625VDST = temp
     626SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)
     627```
     628
    592629#### V_SUBREV_F32
    593630
     
    599636```
    600637VDST = (FLOAT)SRC1 - (FLOAT)SRC0
     638```
     639
     640#### V_SUBBREV_U32
     641
     642Opcode VOP2: 42 (0x2a) for GCN 1.0/1.1; 30 (0x1e) for GCN 1.2 
     643Opcode VOP3b: 298 (0x12a) for GCN 1.0/1.1; 286 (0x11e) for GCN 1.2 
     644Syntax VOP2 GCN 1.0/1.1: V_SUBBREV_U32 VDST, VCC, SRC0, SRC1, VCC 
     645Syntax VOP3b GCN 1.2: V_SUBBREV_U32 VDST, SDST(2), SRC0, SRC1, SSRC2(2) 
     646Description: Subtract SRC0 with borrow from SRC1,
     647and store result to VDST and store carry flag to SDST (or VCC) bit with number
     648that equal to lane id. Borrow is stored in SSRC2 bit with number of lane id.
     649SDST and SSRC2 are 64-bit. 
     650Operation: 
     651```
     652UINT64 mask = (1ULL<<LANEID)
     653UINT8 CC = ((SSRC2&mask) ? 1 : 0)
     654UINT64 temp = (UINT64)SRC1 - (UINT64)SRC0 - CC
     655VDST = temp
     656SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)
    601657```
    602658
     
    610666Syntax VOP3b GCN 1.2: V_SUBREV_U32 VDST, SDST(2), SRC0, SRC1 
    611667Description: Subtract SRC0 from SRC1 and store result to VDST and store borrow flag to
    612 SDST bit with number that equal to lane id. SDST is 64-bit. 
     668SDST (or VCC) bit with number that equal to lane id. SDST is 64-bit. 
    613669Operation: 
    614670```
Note: See TracChangeset for help on using the changeset viewer.