Changeset 1741 in CLRX


Ignore:
Timestamp:
Nov 22, 2015, 2:14:41 PM (5 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Fixed *_SUB_* instruction description. Updated VOP2 instruction list.

Location:
CLRadeonExtender/trunk/doc
Files:
2 edited

Legend:

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

    r1738 r1741  
    573573Opcode: 3 (0x3) 
    574574Syntax: S_SUB_I32 SDST, SSRC0, SSRC1 
    575 Description: Subtract SSRC0 to SSRC1 and store result into SDST and
     575Description: Subtract SSRC1 from SSRC0 and store result into SDST and
    576576store overflow flag into SCC. SCC register value can be BROKEN for some
    577577architectures (GCN1.0) 
     
    587587Opcode: 1 (0x1) 
    588588Syntax: S_SUB_U32 SDST, SSRC0, SSRC1 
    589 Description: Subtract SSRC0 to SSRC1 and store result into SDST and store borrow into SCC. 
     589Description: Subtract SSRC1 from SSRC0 and store result into SDST and store borrow into SCC. 
    590590Operation: 
    591591```
  • CLRadeonExtender/trunk/doc/GcnInstrsVop2.md

    r1740 r1741  
    156156VDST = temp
    157157UINT64 mask = (1ULL<<LANEID)
    158 SDST = (SDST&~mask) | ((temp >> 32) ? MASK : 0)
     158SDST = (SDST&~mask) | ((temp >> 32) ? mask : 0)
    159159```
    160160
     
    566566Opcode VOP3a: 260 (0x104) for GCN 1.0/1.1; 258 (0x102) for GCN 1.2 
    567567Syntax: V_SUB_F32 VDST, SRC0, SRC1 
    568 Description: Subtract FP value from SRC0 and FP value from SRC1 and store result to VDST. 
     568Description: Subtract FP value of SRC1 from FP value of SRC0 and store result to VDST. 
    569569Operation: 
    570570```
    571571VDST = (FLOAT)SRC0 - (FLOAT)SRC1
     572```
     573
     574#### V_SUB_I32, V_SUB_U32
     575
     576Opcode VOP2: 38 (0x26) for GCN 1.0/1.1; 26 (0x1a) for GCN 1.2 
     577Opcode VOP3b: 294 (0x126) for GCN 1.0/1.1; 282 (0x11a) for GCN 1.2 
     578Syntax VOP2 GCN 1.0/1.1: V_SUB_I32 VDST, VCC, SRC0, SRC1 
     579Syntax VOP3b GCN 1.0/1.1: V_SUB_I32 VDST, SDST(2), SRC0, SRC1 
     580Syntax VOP2 GCN 1.2: V_SUB_U32 VDST, VCC, SRC0, SRC1 
     581Syntax VOP3b GCN 1.2: V_SUB_U32 VDST, SDST(2), SRC0, SRC1 
     582Description: Subtract SRC1 from SRC0 and store result to VDST and store borrow flag to
     583SDST bit with number that equal to lane id. SDST is 64-bit. 
     584Operation: 
     585```
     586UINT64 temp = (UINT64)SRC0 - (UINT64)SRC1
     587VDST = temp
     588UINT64 mask = (1ULL<<LANEID)
     589SDST = (SDST&~mask) | ((temp>>32) ? mask : 0)
    572590```
    573591
     
    577595Opcode VOP3a: 261 (0x105) for GCN 1.0/1.1; 259 (0x103) for GCN 1.2 
    578596Syntax: V_SUBREV_F32 VDST, SRC0, SRC1 
    579 Description: Subtract FP value from SRC1 and FP value from SRC0 and store result to VDST. 
     597Description: Subtract FP value of SRC0 from FP value of SRC1 and store result to VDST. 
    580598Operation: 
    581599```
    582600VDST = (FLOAT)SRC1 - (FLOAT)SRC0
     601```
     602
     603#### V_SUBREV_I32, V_SUBREV_U32
     604
     605Opcode VOP2: 39 (0x27) for GCN 1.0/1.1; 27 (0x1b) for GCN 1.2 
     606Opcode VOP3b: 295 (0x127) for GCN 1.0/1.1; 283 (0x11b) for GCN 1.2 
     607Syntax VOP2 GCN 1.0/1.1: V_SUBREV_I32 VDST, VCC, SRC0, SRC1 
     608Syntax VOP3b GCN 1.0/1.1: V_SUBREV_I32 VDST, SDST(2), SRC0, SRC1 
     609Syntax VOP2 GCN 1.2: V_SUBREV_U32 VDST, VCC, SRC0, SRC1 
     610Syntax VOP3b GCN 1.2: V_SUBREV_U32 VDST, SDST(2), SRC0, SRC1 
     611Description: Subtract SRC0 from SRC1 and store result to VDST and store borrow flag to
     612SDST bit with number that equal to lane id. SDST is 64-bit. 
     613Operation: 
     614```
     615UINT64 temp = (UINT64)SRC1 - (UINT64)SRC0
     616VDST = temp
     617UINT64 mask = (1ULL<<LANEID)
     618SDST = (SDST&~mask) | ((temp>>32) ? mask : 0)
    583619```
    584620
Note: See TracChangeset for help on using the changeset viewer.