Changes between Version 5 and Version 6 of GcnInstrsSop2


Ignore:
Timestamp:
11/13/15 23:00:18 (8 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsSop2

    v5 v6  
    132132Syntax: S_ABSDIFF_I32 SDST, SSRC0, SSRC1<br />
    133133Description: Compute absolute difference from SSRC0 and SSRC1 and store result to SDST.
    134 If result is non-zero store 1 to SCC, otherwise store 0 to SCC.<br />
    135 Operation:<br />
    136 <code>INT32 temp = SSRC0-SSRC1
    137 SDST = temp&gt;=0 ? temp : -temp
     134If result is non-zero, store 1 to SCC, otherwise store 0 to SCC.<br />
     135Operation:<br />
     136<code>SDST = ABS(SSRC0 - SSRC1)
    138137SCC = SDST!=0</code></p>
    139138<h4>S_ADDC_U32</h4>
     
    145144<code>UINT64 temp = (UINT64)SSRC0 + (UINT64)SSRC1 + SCC
    146145SDST = temp
    147 SCC = temp&gt;&gt;32</code></p>
     146SCC = temp &gt;&gt; 32</code></p>
    148147<h4>S_ADD_I32</h4>
    149148<p>Opcode: 2 (0x2)<br />
     
    152151Operation:<br />
    153152<code>SDST = SSRC0 + SSRC1
    154 INT64 temp = (INT64)SSRC0 + (INT64)SSRC1
     153INT64 temp = SEXT64(SSRC0) + SEXT64(SSRC1)
    155154SCC = temp &gt; ((1LL&lt;&lt;31)-1) || temp &lt; (-1LL&lt;&lt;31)</code></p>
    156155<h4>S_ADD_U32</h4>
     
    159158Description: Add SSRC0 to SSRC1 and store result into SDST and store carry-out into SCC.<br />
    160159Operation:<br />
    161 <code>SDST = SSRC0 + SSRC1
    162 SCC = ((UINT64)SSRC0 + (UINT64)SSRC1)&gt;&gt;32</code></p>
     160<code>UINT64 temp = (UINT64)SSRC0 + (UINT64)SSRC1
     161SDST = temp
     162SCC = temp &gt;&gt; 32</code></p>
    163163<h4>S_AND_B32</h4>
    164164<p>Opcode: 14 (0xe)<br />
     
    205205<p>Opcode: 35 (0x23)<br />
    206206Syntax: S_ASHR_I64 SDST(2), SSRC0(2), SSRC1<br />
    207 Description: Arithmetic Shift to right SSRC0 by (SSRC1&amp;31) bits and store result into SDST.
     207Description: Arithmetic Shift to right SSRC0 by (SSRC1&amp;63) bits and store result into SDST.
    208208If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit,
    209209SSRC1 is 32 bit.<br />
     
    313313<p>Opcode: 31 (0x1f)
    314314Syntax: S_LSHL_B64 SDST(2), SSRC0(2), SSRC1<br />
    315 Description: Shift to left SSRC0 by (SSRC1&amp;31) bits and store result into SDST.
     315Description: Shift to left SSRC0 by (SSRC1&amp;63) bits and store result into SDST.
    316316If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit,
    317317SSRC1 is 32 bit.<br />
     
    330330<p>Opcode: 33 (0x21)
    331331Syntax: S_LSHR_B64 SDST(2), SSRC0(2), SSRC1<br />
    332 Description: Shift to right SSRC0 by (SSRC1&amp;31) bits and store result into SDST.
     332Description: Shift to right SSRC0 by (SSRC1&amp;63) bits and store result into SDST.
    333333If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit,
    334334SSRC1 is 32 bit.<br />
     
    340340Syntax: S_MIN_I32 SDST, SSRC0, SSRC1<br />
    341341Description: Choose largest signed value value from SSRC0 and SSRC1 and store its into SDST,
    342 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC<br />
    343 Operation:<br />
    344 <code>SDST = (INT32)SSSRC0 &gt; (INT32)SSSRC1 ? SSSRC0 : SSSRC1
    345 SCC = (INT32)SSSRC0 &gt; (INT32)SSSRC1</code></p>
     342and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC.<br />
     343Operation:<br />
     344<code>SDST = (INT32)SSRC0 &gt; (INT32)SSRC1 ? SSRC0 : SSRC1
     345SCC = (INT32)SSRC0 &gt; (INT32)SSRC1</code></p>
    346346<h4>S_MAX_U32</h4>
    347347<p>Opcode: 9 (0x9)<br />
    348348Syntax: S_MAX_U32 SDST, SSRC0, SSRC1<br />
    349349Description: Choose largest unsigned value value from SSRC0 and SSRC1 and store its into SDST,
    350 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC<br />
    351 Operation:<br />
    352 <code>SDST = (UINT32)SSSRC0 &gt; (UINT32)SSSRC1 ? SSSRC0 : SSSRC1
    353 SCC = (UINT32)SSSRC0 &gt; (UINT32)SSSRC1</code></p>
     350and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC.<br />
     351Operation:<br />
     352<code>SDST = SSRC0 &gt; SSRC1 ? SSRC0 : SSRC1
     353SCC = SSRC0 &gt; SSRC1</code></p>
    354354<h4>S_MIN_I32</h4>
    355355<p>Opcode: 6 (0x6)
    356356Syntax: S_MIN_I32 SDST, SSRC0, SSRC1<br />
    357357Description: Choose smallest signed value value from SSRC0 and SSRC1 and store its into SDST,
    358 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC<br />
    359 Operation:<br />
    360 <code>SDST = (INT32)SSSRC0 &lt; (INT32)SSSRC1 ? SSSRC0 : SSSRC1
    361 SCC = (INT32)SSSRC0 &lt; (INT32)SSSRC1</code></p>
     358and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC.<br />
     359Operation:<br />
     360<code>SDST = (INT32)SSRC0 &lt; (INT32)SSRC1 ? SSRC0 : SSRC1
     361SCC = (INT32)SSRC0 &lt; (INT32)SSRC1</code></p>
    362362<h4>S_MIN_U32</h4>
    363363<p>Opcode: 7 (0x7)<br />
    364364Syntax: S_MIN_U32 SDST, SSRC0, SSRC1<br />
    365365Description: Choose smallest unsigned value value from SSRC0 and SSRC1 and store its into SDST,
    366 and store 1 to SCC if SSSRC0 value has been choosen, otherwise store 0 to SCC<br />
    367 Operation:<br />
    368 <code>SDST = (UINT32)SSSRC0 &lt; (UINT32)SSSRC1 ? SSSRC0 : SSSRC1
    369 SCC = (UINT32)SSSRC0 &lt; (UINT32)SSSRC1</code></p>
     366and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC.<br />
     367Operation:<br />
     368<code>SDST = SSRC0 &lt; SSRC1 ? SSRC0 : SSRC1
     369SCC = SSRC0 &lt; SSRC1</code></p>
    370370<h4>S_MUL_I32</h4>
    371371<p>Opcode: 38 (0x26)
     
    447447<code>UINT64 temp = (UINT64)SSRC0 - (UINT64)SSRC1 - SCC
    448448SDST = temp
    449 SCC = temp&gt;&gt;32</code></p>
     449SCC = (temp&gt;&gt;32) &amp; 1</code></p>
    450450<h4>S_SUB_I32</h4>
    451451<p>Opcode: 3 (0x3)<br />
     
    456456Operation:<br />
    457457<code>SDST = SSRC0 - SSRC1
    458 INT64 temp = (INT64)SSRC0 - (INT64)SSRC1
     458INT64 temp = SEXT64(SSRC0) - SEXT64(SSRC1)
    459459SCC = temp &gt; ((1LL&lt;&lt;31)-1) || temp &lt; (-1LL&lt;&lt;31)</code></p>
    460460<h4>S_SUB_U32</h4>
     
    463463Description: Subtract SSRC0 to SSRC1 and store result into SDST and store borrow into SCC.<br />
    464464Operation:<br />
    465 <code>SDST = SSRC0 - SSRC1
    466 SCC = ((INT64)SSRC0 - (INT64)SSRC1)&gt;&gt;32</code></p>
     465<code>UINT64 temp = (UINT64)SSRC0 - (UINT64)SSRC1
     466SDST = temp
     467SCC = (temp&gt;&gt;32)!=0</code></p>
    467468<h4>S_XNOR_B32</h4>
    468469<p>Opcode: 28 (0x1c)<br />