Changeset 1705 in CLRX


Ignore:
Timestamp:
Nov 13, 2015, 10:21:18 PM (5 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Doc updates: Instr description fixes, fixing few typos. Added functions description.

Location:
CLRadeonExtender/trunk/doc
Files:
2 edited

Legend:

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

    r1704 r1705  
    4848Syntax: S_ABSDIFF_I32 SDST, SSRC0, SSRC1 
    4949Description: Compute absolute difference from SSRC0 and SSRC1 and store result to SDST.
    50 If result is non-zero store 1 to SCC, otherwise store 0 to SCC. 
    51 Operation: 
    52 ```
    53 INT32 temp = SSRC0-SSRC1
    54 SDST = temp>=0 ? temp : -temp
     50If result is non-zero, store 1 to SCC, otherwise store 0 to SCC. 
     51Operation: 
     52```
     53SDST = ABS(SSRC0 - SSRC1)
    5554SCC = SDST!=0
    5655```
     
    6665UINT64 temp = (UINT64)SSRC0 + (UINT64)SSRC1 + SCC
    6766SDST = temp
    68 SCC = temp>>32
     67SCC = temp >> 32
    6968```
    7069
     
    7776```
    7877SDST = SSRC0 + SSRC1
    79 INT64 temp = (INT64)SSRC0 + (INT64)SSRC1
     78INT64 temp = SEXT64(SSRC0) + SEXT64(SSRC1)
    8079SCC = temp > ((1LL<<31)-1) || temp < (-1LL<<31)
    8180```
     
    8887Operation: 
    8988```
    90 SDST = SSRC0 + SSRC1
    91 SCC = ((UINT64)SSRC0 + (UINT64)SSRC1)>>32
     89UINT64 temp = (UINT64)SSRC0 + (UINT64)SSRC1
     90SDST = temp
     91SCC = temp >> 32
    9292```
    9393
     
    157157Opcode: 35 (0x23) 
    158158Syntax: S_ASHR_I64 SDST(2), SSRC0(2), SSRC1 
    159 Description: Arithmetic Shift to right SSRC0 by (SSRC1&31) bits and store result into SDST.
     159Description: Arithmetic Shift to right SSRC0 by (SSRC1&63) bits and store result into SDST.
    160160If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit,
    161161SSRC1 is 32 bit. 
     
    299299Opcode: 31 (0x1f)
    300300Syntax: S_LSHL_B64 SDST(2), SSRC0(2), SSRC1 
    301 Description: Shift to left SSRC0 by (SSRC1&31) bits and store result into SDST.
     301Description: Shift to left SSRC0 by (SSRC1&63) bits and store result into SDST.
    302302If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit,
    303303SSRC1 is 32 bit. 
     
    324324Opcode: 33 (0x21)
    325325Syntax: S_LSHR_B64 SDST(2), SSRC0(2), SSRC1 
    326 Description: Shift to right SSRC0 by (SSRC1&31) bits and store result into SDST.
     326Description: Shift to right SSRC0 by (SSRC1&63) bits and store result into SDST.
    327327If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit,
    328328SSRC1 is 32 bit. 
     
    338338Syntax: S_MIN_I32 SDST, SSRC0, SSRC1 
    339339Description: Choose largest signed value value from SSRC0 and SSRC1 and store its into SDST,
    340 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC 
    341 Operation: 
    342 ```
    343 SDST = (INT32)SSSRC0 > (INT32)SSSRC1 ? SSSRC0 : SSSRC1
    344 SCC = (INT32)SSSRC0 > (INT32)SSSRC1
     340and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC 
     341Operation: 
     342```
     343SDST = (INT32)SSRC0 > (INT32)SSRC1 ? SSRC0 : SSRC1
     344SCC = (INT32)SSRC0 > (INT32)SSRC1
    345345```
    346346
     
    350350Syntax: S_MAX_U32 SDST, SSRC0, SSRC1 
    351351Description: Choose largest unsigned value value from SSRC0 and SSRC1 and store its into SDST,
    352 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC 
    353 Operation: 
    354 ```
    355 SDST = (UINT32)SSSRC0 > (UINT32)SSSRC1 ? SSSRC0 : SSSRC1
    356 SCC = (UINT32)SSSRC0 > (UINT32)SSSRC1
     352and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC 
     353Operation: 
     354```
     355SDST = SSRC0 > SSRC1 ? SSRC0 : SSRC1
     356SCC = SSRC0 > SSRC1
    357357```
    358358
     
    362362Syntax: S_MIN_I32 SDST, SSRC0, SSRC1 
    363363Description: Choose smallest signed value value from SSRC0 and SSRC1 and store its into SDST,
    364 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC 
    365 Operation: 
    366 ```
    367 SDST = (INT32)SSSRC0 < (INT32)SSSRC1 ? SSSRC0 : SSSRC1
    368 SCC = (INT32)SSSRC0 < (INT32)SSSRC1
     364and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC 
     365Operation: 
     366```
     367SDST = (INT32)SSRC0 < (INT32)SSRC1 ? SSRC0 : SSRC1
     368SCC = (INT32)SSRC0 < (INT32)SSRC1
    369369```
    370370
     
    374374Syntax: S_MIN_U32 SDST, SSRC0, SSRC1 
    375375Description: Choose smallest unsigned value value from SSRC0 and SSRC1 and store its into SDST,
    376 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC 
    377 Operation: 
    378 ```
    379 SDST = (UINT32)SSSRC0 < (UINT32)SSSRC1 ? SSSRC0 : SSSRC1
    380 SCC = (UINT32)SSSRC0 < (UINT32)SSSRC1
     376and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC 
     377Operation: 
     378```
     379SDST = SSRC0 < SSRC1 ? SSRC0 : SSRC1
     380SCC = SSRC0 < SSRC1
    381381```
    382382
     
    497497UINT64 temp = (UINT64)SSRC0 - (UINT64)SSRC1 - SCC
    498498SDST = temp
    499 SCC = temp>>32
     499SCC = (temp>>32) & 1
    500500```
    501501
     
    510510```
    511511SDST = SSRC0 - SSRC1
    512 INT64 temp = (INT64)SSRC0 - (INT64)SSRC1
     512INT64 temp = SEXT64(SSRC0) - SEXT64(SSRC1)
    513513SCC = temp > ((1LL<<31)-1) || temp < (-1LL<<31)
    514514```
     
    521521Operation: 
    522522```
    523 SDST = SSRC0 - SSRC1
    524 SCC = ((INT64)SSRC0 - (INT64)SSRC1)>>32
     523UINT64 temp = (UINT64)SSRC0 - (UINT64)SSRC1
     524SDST = temp
     525SCC = (temp>>32)!=0
    525526```
    526527
  • CLRadeonExtender/trunk/doc/GcnIsa.md

    r1697 r1705  
    2323* HALF, FLOAT, DOUBLE - half, single and double precision floating point
    2424
     25Special functions:
     26
     27* SEXT64(v) - sign extend to 64-bit from any signed value
     28* ABS(v) - absolute value
     29
    2530---
    2631
Note: See TracChangeset for help on using the changeset viewer.