Changeset 1702 in CLRX


Ignore:
Timestamp:
Nov 13, 2015, 8:36:12 PM (5 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Updated GcnInstrsSop2.md.

File:
1 edited

Legend:

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

    r1701 r1702  
    6363Description: Add SSRC0 to SSRC1 and store result into SDST and store overflow flag into SCC. 
    6464Operation: 
    65 
    6665```
    6766SDST = SSRC0 + SSRC1
     
    8786Description: Do bitwise AND operation on SSRC0 and SSRC1 and store it to SDST, and store
    88871 to SCC if result is not zero, otherwise store 0 to SCC. 
    89 Operation:
     88Operation: 
    9089```
    9190SDST = SSRC0 & SSRC1
     
    9998Description: Do bitwise AND operation on SSRC0 and SSRC1 and store it to SDST, and store
    100991 to SCC if result is not zero, otherwise store 0 to SCC. SDST, SSRC0, SSRC1 are 64-bit. 
    101 Operation:
     100Operation: 
    102101```
    103102SDST = SSRC0 & SSRC1
     
    111110Description: Do bitwise AND operation on SSRC0 and negated SSRC1 and store it to SDST,
    112111and store 1 to SCC if result is not zero, otherwise store 0 to SCC. 
    113 Operation:
     112Operation: 
    114113```
    115114SDST = SSRC0 & ~SSRC1
     
    124123it to SDST, and store 1 to SCC if result is not zero, otherwise store 0 to SCC.
    125124SDST, SSRC0, SSRC1 are 64-bit. 
    126 Operation:
     125Operation: 
    127126```
    128127SDST = SSRC0 & ~SSRC1
    129128SCC = SDST!=0
     129```
     130
     131#### S_ASHR_I32
     132
     133Opcode: 34 (0x22)
     134Syntax: S_ASHR_I32 SDST, SSRC0, SSRC1 
     135Description: Arithmetic shift to right SSRC0 by (SSRC1&31) bits and store result into SDST.
     136If result is non-zero store 1 to SCC, otherwise store 0 to SCC. 
     137Operation: 
     138```
     139SDST = (INT32)SSRC0 >> (SSRC1 & 31)
     140SCC = SDST!=0
     141```
     142
     143#### S_ASHR_I64
     144
     145Opcode: 35 (0x23) 
     146Syntax: S_ASHR_I64 SDST(2), SSRC0(2), SSRC1 
     147Description: Arithmetic Shift to right SSRC0 by (SSRC1&31) bits and store result into SDST.
     148If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit,
     149SSRC1 is 32 bit. 
     150Operation: 
     151```
     152SDST = (INT64)SSRC0 >> (SSRC1 & 63)
     153SCC = SDST!=0
     154```
     155
     156#### S_BFE_U32
     157Opcode: 39 (0x27) 
     158Syntax: S_BFE_U32 SDST, SSRC0, SSRC1 
     159Description: Extracts bits in SSRC0 from range (SSRC1&31) with length ((SSRC1>>16)&0x7f).
     160If result is non-zero store 1 to SCC, otherwise store 0 to SCC. 
     161Operation: 
     162```
     163shift = length & 31
     164length = (SSRC1>>16) & 0x7f
     165if (length==0)
     166    SDST = 0
     167if (shift+length < 32)
     168    SDST = SSRC0 << (32 - shift - length) >> (32 - length)
     169else
     170    SDST = SSRC0 >> shift
     171SCC = SDST!=0
     172```
     173
     174#### S_BFE_I32
     175Opcode: 40 (0x28) 
     176Syntax: S_BFE_I32 SDST, SSRC0, SSRC1 
     177Description: Extracts bits in SSRC0 from range (SSRC1&31) with length ((SSRC1>>16)&0x7f)
     178and extend sign from last bit of extracted value.
     179If result is non-zero store 1 to SCC, otherwise store 0 to SCC. 
     180Operation: 
     181```
     182shift = length&31
     183length = (SSRC1>>16) & 0x7f
     184if (length==0)
     185    SDST = 0
     186if (shift+length < 32)
     187    SDST = (INT32)(SSRC0 << (32 - shift - length)) >> (32 - length)
     188else
     189    SDST = (INT32)SSRC0 >> shift
     190SCC = SDST!=0
     191```
     192
     193#### S_BFM_B32
     194Opcode: 36 (0x24)
     195Syntax: S_BFM_B32 SDST, SSRC0, SSRC1 
     196Description: Make 32-bit bitmask from (SSRC1 & 31) bit that have length (SSRC0 & 31) and
     197store it to SDST. SCC not touched. 
     198Operation: 
     199```
     200SDST = ((1U << (SSRC0&31))-1) << (SSRC1&31)
     201```
     202
     203#### S_BFM_B64
     204Opcode: 37 (0x25)
     205Syntax: S_BFM_B64 SDST(2), SSRC0, SSRC1 
     206Description: Make 64-bit bitmask from (SSRC1 & 63) bit that have length (SSRC0 & 63) and
     207store it to SDST. SCC not touched. 
     208Operation: 
     209```
     210SDST = ((1ULL << (SSRC0&63))-1) << (SSRC1&63)
    130211```
    131212
     
    136217Description: If SCC is 1 then store SSRC0 into SDST, otherwise store SSRC1 into SDST.
    137218SCC has not been changed. 
    138 Operation:
     219Operation: 
    139220```
    140221SDST = SCC ? SSRC0 : SSRC1
     
    147228Description: If SCC is 1 then store 64-bit SSRC0 into SDST, otherwise store
    14822964-bit SSRC1 into SDST. SCC has not been changed. 
    149 Operation:
     230Operation: 
    150231```
    151232SDST = SCC ? SSRC0 : SSRC1
     
    160241Operation: 
    161242```
    162 SDST = (SSRC0) << (SSRC1 & 31)
     243SDST = SSRC0 << (SSRC1 & 31)
    163244SCC = SDST!=0
    164245```
     
    173254Operation: 
    174255```
    175 SDST = (SSRC0) << (SSRC1 & 63)
    176 SCC = SDST!=0
     256SDST = SSRC0 << (SSRC1 & 63)
     257SCC = SDST!=0
     258```
     259
     260#### S_LSHR_B32
     261
     262Opcode: 32 (0x20)
     263Syntax: S_LSHR_B32 SDST, SSRC0, SSRC1 
     264Description: Shift to right SSRC0 by (SSRC1&31) bits and store result into SDST.
     265If result is non-zero store 1 to SCC, otherwise store 0 to SCC. 
     266Operation: 
     267```
     268SDST = SSRC0 >> (SSRC1 & 31)
     269SCC = SDST!=0
     270```
     271
     272#### S_LSHR_B64
     273
     274Opcode: 33 (0x21)
     275Syntax: S_LSHR_B64 SDST(2), SSRC0(2), SSRC1 
     276Description: Shift to right SSRC0 by (SSRC1&31) bits and store result into SDST.
     277If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit,
     278SSRC1 is 32 bit. 
     279Operation: 
     280```
     281SDST = SSRC0 >> (SSRC1 & 63)
     282SCC = SDST!=0
     283```
     284
     285#### S_MAX_I32
     286
     287Opcode: 8 (0x9)
     288Syntax: S_MIN_I32 SDST, SSRC0, SSRC1 
     289Description: Choose largest signed value value from SSRC0 and SSRC1 and store its into SDST,
     290and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC 
     291Operation: 
     292```
     293SDST = (INT32)SSSRC0 > (INT32)SSSRC1 ? SSSRC0 : SSSRC1
     294SCC = (INT32)SSSRC0 > (INT32)SSSRC1
     295```
     296
     297#### S_MAX_U32
     298
     299Opcode: 9 (0x9) 
     300Syntax: S_MAX_U32 SDST, SSRC0, SSRC1 
     301Description: Choose largest unsigned value value from SSRC0 and SSRC1 and store its into SDST,
     302and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC 
     303Operation: 
     304```
     305SDST = (UINT32)SSSRC0 > (UINT32)SSSRC1 ? SSSRC0 : SSSRC1
     306SCC = (UINT32)SSSRC0 > (UINT32)SSSRC1
    177307```
    178308
     
    201331```
    202332
    203 #### S_MAX_I32
    204 
    205 Opcode: 8 (0x9)
    206 Syntax: S_MIN_I32 SDST, SSRC0, SSRC1 
    207 Description: Choose largest signed value value from SSRC0 and SSRC1 and store its into SDST,
    208 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC 
    209 Operation: 
    210 ```
    211 SDST = (INT32)SSSRC0 > (INT32)SSSRC1 ? SSSRC0 : SSSRC1
    212 SCC = (INT32)SSSRC0 > (INT32)SSSRC1
    213 ```
    214 
    215 #### S_MAX_U32
    216 
    217 Opcode: 9 (0x9) 
    218 Syntax: S_MAX_U32 SDST, SSRC0, SSRC1 
    219 Description: Choose largest unsigned value value from SSRC0 and SSRC1 and store its into SDST,
    220 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC 
    221 Operation: 
    222 ```
    223 SDST = (UINT32)SSSRC0 > (UINT32)SSSRC1 ? SSSRC0 : SSSRC1
    224 SCC = (UINT32)SSSRC0 > (UINT32)SSSRC1
     333#### S_MUL_I32
     334Opcode: 38 (0x26)
     335Syntax: S_MUL_I32 SDST, SSRC0, SSRC1
     336Description: Multiply SSRC0 and SSRC1 and store result into SDST. Do not change SCC. 
     337Operation: 
     338```
     339SDST = SSRC0 * SSRC1
    225340```
    226341
     
    231346Description: Do bitwise NAND operation on SSRC0 and SSRC1 and store it to SDST, and store
    2323471 to SCC if result is not zero, otherwise store 0 to SCC. 
    233 Operation:
     348Operation: 
    234349```
    235350SDST = ~(SSRC0 & SSRC1)
     
    243358Description: Do bitwise NAND operation on SSRC0 and SSRC1 and store it to SDST, and store
    2443591 to SCC if result is not zero, otherwise store 0 to SCC. SDST, SSRC0, SSRC1 are 64-bit. 
    245 Operation:
     360Operation: 
    246361```
    247362SDST = ~(SSRC0 & SSRC1)
     
    255370Description: Do bitwise NOR operation on SSRC0 and SSRC1 and store it to SDST, and store
    2563711 to SCC if result is not zero, otherwise store 0 to SCC. 
    257 Operation:
     372Operation: 
    258373```
    259374SDST = ~(SSRC0 | SSRC1)
     
    267382Description: Do bitwise NOR operation on SSRC0 and SSRC1 and store it to SDST, and store
    2683831 to SCC if result is not zero, otherwise store 0 to SCC. SDST, SSRC0, SSRC1 are 64-bit. 
    269 Operation:
     384Operation: 
    270385```
    271386SDST = ~(SSRC0 | SSRC1)
     
    279394Description: Do bitwise OR operation on SSRC0 and SSRC1 and store it to SDST, and store
    2803951 to SCC if result is not zero, otherwise store 0 to SCC. 
    281 Operation:
     396Operation: 
    282397```
    283398SDST = SSRC0 | SSRC1
     
    291406Description: Do bitwise OR operation on SSRC0 and SSRC1 and store it to SDST, and store
    2924071 to SCC if result is not zero, otherwise store 0 to SCC. SDST, SSRC0, SSRC1 are 64-bit. 
    293 Operation:
     408Operation: 
    294409```
    295410SDST = SSRC0 | SSRC1
     
    303418Description: Do bitwise OR operation on SSRC0 and negated SSRC1 and store it to SDST,
    304419and store 1 to SCC if result is not zero, otherwise store 0 to SCC. 
    305 Operation:
     420Operation: 
    306421```
    307422SDST = SSRC0 | ~SSRC1
     
    316431and store 1 to SCC if result is not zero, otherwise store 0 to SCC.
    317432SDST, SSRC0, SSRC1 are 64-bit. 
    318 Operation:
     433Operation: 
    319434```
    320435SDST = SSRC0 | ~SSRC1
     
    366481Description: Do bitwise XNOR operation on SSRC0 and SSRC1 and store it to SDST, and store
    3674821 to SCC if result is not zero, otherwise store 0 to SCC. 
    368 Operation:
     483Operation: 
    369484```
    370485SDST = ~(SSRC0 ^ SSRC1)
     
    378493Description: Do bitwise XNOR operation on SSRC0 and SSRC1 and store it to SDST, and store
    3794941 to SCC if result is not zero, otherwise store 0 to SCC. SDST, SSRC0, SSRC1 are 64-bit. 
    380 Operation:
     495Operation: 
    381496```
    382497SDST = ~(SSRC0 ^ SSRC1)
Note: See TracChangeset for help on using the changeset viewer.