Changeset 1718 in CLRX


Ignore:
Timestamp:
Nov 15, 2015, 1:38:45 PM (5 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Doc updates: Updated SOP1 instruction list.

File:
1 edited

Legend:

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

    r1717 r1718  
    7777Alphabetically sorted instruction list:
    7878
    79 ### S_BREV_B32
     79#### S_BCNT0_I32_B32
     80
     81Opcode: 13 (0xd) for GCN 1.0/1.1; 10 (0xa) for GCN 1.2 
     82Syntax: S_BCNT0_I32_B32 SDST, SSRC0 
     83Description: Count zero bits in SSRC0 and store result to SDST.
     84If result is non-zero, store 1 to SCC, otherwise store 0 to SCC. 
     85```
     86SDST = 0
     87for (UINT8 i = 0; i < 32; i++)
     88    SDST += ((1U<<i) & SSRC0) == 0
     89SCC = SDST!=0
     90```
     91
     92#### S_BCNT0_I32_B64
     93
     94Opcode: 14 (0xd) for GCN 1.0/1.1; 11 (0xb) for GCN 1.2 
     95Syntax: S_BCNT0_I32_B64 SDST, SSRC0(2) 
     96Description: Count zero bits in SSRC0 and store result to SDST.
     97If result is non-zero, store 1 to SCC, otherwise store 0 to SCC. SSRC0 is 64-bit. 
     98```
     99SDST = 0
     100for (UINT8 i = 0; i < 64; i++)
     101    SDST += ((1ULL<<i) & SSRC0) == 0
     102SCC = SDST!=0
     103```
     104
     105#### S_BCNT1_I32_B32
     106
     107Opcode: 15 (0xf) for GCN 1.0/1.1; 12 (0xc) for GCN 1.2 
     108Syntax: S_BCNT1_I32_B65 SDST, SSRC0 
     109Description: Count one bits in SSRC0 and store result to SDST.
     110If result is non-zero, store 1 to SCC, otherwise store 0 to SCC. 
     111```
     112SDST = 0
     113for (UINT8 i = 0; i < 32; i++)
     114    SDST += ((1U<<i) & SSRC0) != 0
     115SCC = SDST!=0
     116```
     117
     118#### S_BCNT1_I32_B64
     119
     120Opcode: 16 (0x10) for GCN 1.0/1.1; 13 (0xd) for GCN 1.2 
     121Syntax: S_BCNT1_I32_B64 SDST, SSRC0(2) 
     122Description: Count one bits in SSRC0 and store result to SDST.
     123If result is non-zero, store 1 to SCC, otherwise store 0 to SCC. SSRC0 is 64-bit. 
     124```
     125SDST = 0
     126for (UINT8 i = 0; i < 64; i++)
     127    SDST += ((1ULL<<i) & SSRC0) != 0
     128SCC = SDST!=0
     129```
     130
     131#### S_BREV_B32
    80132
    81133Opcode: 11 (0xb) for GCN 1.0/1.1; 8 (0x8) for GCN 1.2 
     
    86138```
    87139
    88 ### S_BREV_B64
     140#### S_BREV_B64
    89141
    90142Opcode: 12 (0xc) for GCN 1.0/1.1; 9 (0x9) for GCN 1.2 
     
    96148```
    97149
    98 ### S_CMOV_B32
     150#### S_CMOV_B32
    99151
    100152Opcode: 5 (0x5) for GCN 1.0/1.1; 2 (0x2) for GCN 1.2 
     
    107159```
    108160
    109 ### S_CMOV_B64
     161#### S_CMOV_B64
    110162
    111163Opcode: 6 (0x6) for GCN 1.0/1.1; 3 (0x3) for GCN 1.2 
     
    118170```
    119171
    120 ### S_MOV_B32
     172#### S_FF0_I32_B32
     173
     174Opcode: 17 (0x11) for GCN 1.0/1.1; 14 (0xe) for GCN 1.2 
     175Syntax: S_FF0_I32_B32 SDST, SSRC0 
     176Description: Find first zero bit in SSRC0. If found store number of bit to SDST,
     177otherwise set SDST to -1. 
     178```
     179SDST = -1
     180for (UINT8 i = 0; i < 32; i++)
     181    if ((1U<<i) & SSRC0) == 0)
     182    { SDST = i; break; }
     183```
     184
     185#### S_FF0_I32_B64
     186
     187Opcode: 18 (0x12) for GCN 1.0/1.1; 15 (0xf) for GCN 1.2 
     188Syntax: S_FF0_I32_B64 SDST, SSRC0(2) 
     189Description: Find first zero bit in SSRC0. If found store number of bit to SDST,
     190otherwise set SDST to -1. SSRC0 is 64-bit. 
     191```
     192SDST = -1
     193for (UINT8 i = 0; i < 64; i++)
     194    if ((1ULL<<i) & SSRC0) == 0)
     195    { SDST = i; break; }
     196```
     197
     198#### S_FF1_I32_B32
     199
     200Opcode: 19 (0x13) for GCN 1.0/1.1; 16 (0x10) for GCN 1.2 
     201Syntax: S_FF1_I32_B32 SDST, SSRC0 
     202Description: Find first one bit in SSRC0. If found store number of bit to SDST,
     203otherwise set SDST to -1. 
     204```
     205SDST = -1
     206for (UINT8 i = 0; i < 32; i++)
     207    if ((1U<<i) & SSRC0) != 0)
     208    { SDST = i; break; }
     209```
     210
     211#### S_FF1_I32_B64
     212
     213Opcode: 20 (0x14) for GCN 1.0/1.1; 17 (0x11) for GCN 1.2 
     214Syntax: S_FF0_I32_B64 SDST, SSRC0(2) 
     215Description: Find first one bit in SSRC0. If found store number of bit to SDST,
     216otherwise set SDST to -1. SSRC0 is 64-bit. 
     217```
     218SDST = -1
     219for (UINT8 i = 0; i < 64; i++)
     220    if ((1ULL<<i) & SSRC0) != 0)
     221    { SDST = i; break; }
     222```
     223
     224#### S_FLBIT_I32_B32
     225
     226Opcode: 21 (0x15) for GCN 1.0/1.1; 18 (0x12) for GCN 1.2 
     227Syntax: S_FLBIT_I32_B32 SDST, SSRC0 
     228Description: Find last one bit in SSRC0. If found store number of skipped bits to SDST,
     229otherwise set SDST to -1. 
     230```
     231SDST = -1
     232for (INT8 i = 31; i >= 0; i++)
     233    if ((1U<<i) & SSRC0) != 0)
     234    { SDST = 31-i; break; }
     235```
     236
     237#### S_FLBIT_I32_B64
     238
     239Opcode: 22 (0x16) for GCN 1.0/1.1; 19 (0x13) for GCN 1.2 
     240Syntax: S_FLBIT_I32_B64 SDST, SSRC0(2) 
     241Description: Find last one bit in SSRC0. If found store number of skipped bits to SDST,
     242otherwise set SDST to -1.  SSRC0 is 64-bit 
     243```
     244SDST = -1
     245for (INT8 i = 63; i >= 0; i++)
     246    if ((1ULL<<i) & SSRC0) != 0)
     247    { SDST = 63-i; break; }
     248```
     249
     250#### S_MOV_B32
    121251
    122252Opcode: 3 (0x3) for GCN 1.0/1.1; 0 (0x0) for GCN 1.2 
     
    128258```
    129259
    130 ### S_MOV_B64
     260#### S_MOV_B64
    131261
    132262Opcode: 4 (0x4) for GCN 1.0/1.1; 1 (0x1) for GCN 1.2 
     
    138268```
    139269
    140 ### S_MOV_B32
     270#### S_MOV_B32
    141271
    142272Opcode: 3 (0x3) for GCN 1.0/1.1; 0 (0x0) for GCN 1.2 
     
    148278```
    149279
    150 ### S_NOT_B32
     280#### S_NOT_B32
    151281
    152282Opcode: 7 (0x7) for GCN 1.0/1.1; 4 (0x4) for GCN 1.2 
     
    160290```
    161291
    162 ### S_NOT_B64
     292#### S_NOT_B64
    163293
    164294Opcode: 8 (0x8) for GCN 1.0/1.1; 5 (0x5) for GCN 1.2 
     
    173303```
    174304
    175 ### S_WQM_B32
     305#### S_WQM_B32
    176306
    177307Opcode: 9 (0x9) for GCN 1.0/1.1; 6 (0x6) for GCN 1.2 
     
    189319```
    190320
    191 ### S_WQM_B64
     321#### S_WQM_B64
    192322
    193323Opcode: 10 (0xa) for GCN 1.0/1.1; 7 (0x7) for GCN 1.2 
Note: See TracChangeset for help on using the changeset viewer.