Changes between Version 1 and Version 2 of GcnInstrsSop2


Ignore:
Timestamp:
Nov 13, 2015, 12:00:15 AM (5 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsSop2

    v1 v2  
    4343<p>Syntax for all instructions: INSTRUCTION SDST, SSRC0, SSRC1</p>
    4444<p>Example: s_and_b32 s0, s1, s2</p>
    45 <p>List of the instruction by opcode:</p>
     45<p>List of the instructions by opcode:</p>
    4646<table>
    4747<thead>
     
    8383<td>7</td>
    8484<td>S_MIN_U32</td>
     85</tr>
     86<tr>
     87<td>8</td>
     88<td>S_MAX_I32</td>
     89</tr>
     90<tr>
     91<td>9</td>
     92<td>S_MAX_U32</td>
     93</tr>
     94<tr>
     95<td>10</td>
     96<td>S_CSELECT_B32</td>
     97</tr>
     98<tr>
     99<td>11</td>
     100<td>S_CSELECT_B64</td>
     101</tr>
     102<tr>
     103<td>14</td>
     104<td>S_AND_B32</td>
     105</tr>
     106<tr>
     107<td>15</td>
     108<td>S_AND_B64</td>
     109</tr>
     110<tr>
     111<td>16</td>
     112<td>S_OR_B32</td>
     113</tr>
     114<tr>
     115<td>17</td>
     116<td>S_OR_B64</td>
     117</tr>
     118<tr>
     119<td>18</td>
     120<td>S_XOR_B32</td>
     121</tr>
     122<tr>
     123<td>19</td>
     124<td>S_XOR_B64</td>
    85125</tr>
    86126</tbody>
     
    112152<code>SDST = SSRC0 + SSRC1
    113153SCC = ((UINT64)SSRC0 + (UINT64)SSRC1)&gt;&gt;32</code></p>
     154<h4>S_AND_B32</h4>
     155<p>Opcode: 14 (0xe)<br />
     156Syntax: S_AND_B32 SDST, SSRC0, SSRC1<br />
     157Description: Do bitwise AND operation on SSRC0 and SSRC1 and store it to SDST, and store
     1581 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     159Operation:
     160<code>SDST = SSRC0 &amp; SSRC1
     161SCC = (SSRC0 &amp; SSRC1)!=0</code></p>
     162<h4>S_AND_B64</h4>
     163<p>Opcode: 15 (0xf)<br />
     164Syntax: S_AND_B64 SDST(2), SSRC0(2), SSRC1(2)<br />
     165Description: Do bitwise AND operation on SSRC0 and SSRC1 and store it to SDST, and store
     1661 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     167Operation:
     168<code>SDST = SSRC0 &amp; SSRC1
     169SCC = (SSRC0 &amp; SSRC1)!=0</code></p>
     170<h4>S_ANDN2_B32</h4>
     171<p>Opcode: 20 (0x14)<br />
     172Syntax: S_ANDN2_B32 SDST, SSRC0, SSRC1<br />
     173Description: Do bitwise AND operation on SSRC0 and negated SSRC1 and store it to SDST,
     174and store 1 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     175Operation:
     176<code>SDST = SSRC0 &amp; ~SSRC1
     177SCC = (SSRC0 &amp; ~SSRC1)!=0</code></p>
     178<h4>S_ANDN2_B64</h4>
     179<p>Opcode: 21 (0x15)<br />
     180Syntax: S_ANDN2_B64 SDST(2), SSRC0(2), SSRC1(2)<br />
     181Description: Do bitwise AND operation on SSRC0 and bitwise negated SSRC1 and store
     182it to SDST, and store 1 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     183Operation:
     184<code>SDST = SSRC0 &amp; ~SSRC1
     185SCC = (SSRC0 &amp; ~SSRC1)!=0</code></p>
     186<h4>S_CSELECT_B32</h4>
     187<p>Opcode: 10 (0xa)<br />
     188Syntax: S_CSELECT_B32 SDST, SSRC0, SSRC1<br />
     189Description: If SCC is 1 then store SSRC0 into SDST, otherwise store SSRC1 into SDST.
     190SCC has not been changed.<br />
     191Operation:
     192<code>SDST = SCC ? SSRC0 : SSRC1</code></p>
     193<h4>S_CSELECT_B64</h4>
     194<p>Opcode: 11 (0xb)<br />
     195Syntax: S_CSELECT_B32 SDST(2), SSRC0(2), SSRC1(2)<br />
     196Description: If SCC is 1 then store 64-bit SSRC0 into SDST, otherwise store
     19764-bit SSRC1 into SDST. SCC has not been changed.<br />
     198Operation:
     199<code>SDST = SCC ? SSRC0 : SSRC1</code></p>
    114200<h4>S_MIN_I32</h4>
    115201<p>Opcode: 6 (0x6)
     
    128214<code>SDST = (UINT32)SSSRC0&lt;(UINT32)SSSRC1 ? SSSRC0 : SSSRC1
    129215SCC = (UINT32)SSSRC0&lt;(UINT32)SSSRC1</code></p>
     216<h4>S_MAX_I32</h4>
     217<p>Opcode: 8 (0x9)
     218Syntax: S_MIN_I32 SDST, SSRC0, SSRC1<br />
     219Description: Choose largest signed value value from SSRC0 and SSRC1 and store its into SDST,
     220and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC<br />
     221Operation:<br />
     222<code>SDST = (INT32)SSSRC0&gt;(INT32)SSSRC1 ? SSSRC0 : SSSRC1
     223SCC = (INT32)SSSRC0&gt;(INT32)SSSRC1</code></p>
     224<h4>S_MAX_U32</h4>
     225<p>Opcode: 9 (0x9)<br />
     226Syntax: S_MAX_U32 SDST, SSRC0, SSRC1<br />
     227Description: Choose largest unsigned value value from SSRC0 and SSRC1 and store its into SDST,
     228and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC<br />
     229Operation:<br />
     230<code>SDST = (UINT32)SSSRC0&gt;(UINT32)SSSRC1 ? SSSRC0 : SSSRC1
     231SCC = (UINT32)SSSRC0&gt;(UINT32)SSSRC1</code></p>
     232<h4>S_OR_B32</h4>
     233<p>Opcode: 16 (0x10)<br />
     234Syntax: S_OR_B32 SDST, SSRC0, SSRC1<br />
     235Description: Do bitwise OR operation on SSRC0 and SSRC1 and store it to SDST, and store
     2361 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     237Operation:
     238<code>SDST = SSRC0 | SSRC1
     239SCC = (SSRC0 | SSRC1)!=0</code></p>
     240<h4>S_OR_B64</h4>
     241<p>Opcode: 17 (0x11)<br />
     242Syntax: S_OR_B64 SDST(2), SSRC0(2), SSRC1(2)<br />
     243Description: Do bitwise OR operation on SSRC0 and SSRC1 and store it to SDST, and store
     2441 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     245Operation:
     246<code>SDST = SSRC0 | SSRC1
     247SCC = (SSRC0 | SSRC1)!=0</code></p>
     248<h4>S_ORN2_B32</h4>
     249<p>Opcode: 22 (0x16)<br />
     250Syntax: S_ORN2_B32 SDST, SSRC0, SSRC1<br />
     251Description: Do bitwise OR operation on SSRC0 and negated SSRC1 and store it to SDST,
     252and store 1 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     253Operation:
     254<code>SDST = SSRC0 | ~SSRC1
     255SCC = (SSRC0 | ~SSRC1)!=0</code></p>
     256<h4>S_ORN2_B64</h4>
     257<p>Opcode: 23 (0x17)<br />
     258Syntax: S_ORN2_B64 SDST(2), SSRC0(2), SSRC1(2)<br />
     259Description: Do bitwise OR operation on SSRC0 and negated SSRC1 and store it to SDST,
     260and store 1 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     261Operation:
     262<code>SDST = SSRC0 | ~SSRC1
     263SCC = (SSRC0 | ~SSRC1)!=0</code></p>
    130264<h4>S_SUBB_U32</h4>
    131265<p>Opcode: 5 (0x5)<br />
     
    154288<code>SDST = SSRC0 - SSRC1
    155289SCC = ((INT64)SSRC0 - (INT64)SSRC1)&gt;&gt;32</code></p>
     290<h4>S_XOR_B32</h4>
     291<p>Opcode: 18 (0x12)<br />
     292Syntax: S_XOR_B32 SDST, SSRC0, SSRC1<br />
     293Description: Do bitwise XOR operation on SSRC0 and SSRC1 and store it to SDST, and store
     2941 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     295Operation:<br />
     296<code>SDST = SSRC0 ^ SSRC1
     297SCC = (SSRC0 ^ SSRC1)!=0</code></p>
     298<h4>S_XOR_B64</h4>
     299<p>Opcode: 19 (0x13)<br />
     300Syntax: S_XOR_B64 SDST(2), SSRC0(2), SSRC1(2)<br />
     301Description: Do bitwise XOR operation on SSRC0 and SSRC1 and store it to SDST, and store
     3021 to SCC if result is not zero, otherwise store 0 to SCC.<br />
     303Operation:<br />
     304<code>SDST = SSRC0 ^ SSRC1
     305SCC = (SSRC0 ^ SSRC1)!=0</code></p>
    156306}}}