Changes between Version 26 and Version 27 of GcnInstrsVop3


Ignore:
Timestamp:
Jun 17, 2017, 5:00:29 PM (22 months ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsVop3

    v26 v27  
    13011301Operation:<br />
    13021302<code>VDST = ASFLOAT(SRC0) * ASFLOAT(SRC1) + ASFLOAT(SRC2)</code></p>
     1303<h4>V_MAD_I16</h4>
     1304<p>Opcode: 492 (0x1ec) for GCN 1.2<br />
     1305Syntax: V_MAD_I16 VDST, SRC0, SRC1, SRC2<br />
     1306Description: Multiply 16-bit signed value from SRC0 by 16-bit signed value from
     1307SRC1 and add 16-bit signed value from SRC2, and store 16-bit signed result to VDST.<br />
     1308Operation:<br />
     1309<code>VDST = (INT16)((INT16)SRC0*(INT16)SRC1 + (INT16)SRC2)</code></p>
    13031310<h4>V_MAD_I32_I24</h4>
    13041311<p>Opcode: 322 (0x142) for GCN 1.0/1.1; 450 (0x1c2) for GCN 1.2<br />
     
    13321339<code>if (ASFLOAT(SRC0)!=0.0 &amp;&amp; ASFLOAT(SRC1)!=0.0)
    13331340    VDST = ASFLOAT(SRC0) * ASFLOAT(SRC1) + ASFLOAT(SRC2)</code></p>
     1341<h4>V_MAD_U16</h4>
     1342<p>Opcode: 491 (0x1eb) for GCN 1.2<br />
     1343Syntax: V_MAD_U16 VDST, SRC0, SRC1, SRC2<br />
     1344Description: Multiply 16-bit unsigned value from SRC0 by 16-bit unsigned value from
     1345SRC1 and add 16-bit unsigned value from SRC2, and store 16-bit unsigned result to VDST.<br />
     1346Operation:<br />
     1347<code>VDST = ((UINT16)SRC0*(UINT16)SRC1 + (UINT16)SRC2) &amp; 0xffff</code></p>
    13341348<h4>V_MAD_U32_U24</h4>
    13351349<p>Opcode: 323 (0x143) for GCN 1.0/1.1; 451 (0x1c3) for GCN 1.2<br />
     
    16041618        VDST = ASFLOAT(SRC0) * ASFLOAT(SRC1)
    16051619}</code></p>
     1620<h4>V_PERM_B32</h4>
     1621<p>Opcode: 493 (0x1ed) for GCN 1.2<br />
     1622Syntax: V_PERM_B32 VDST, SRC0, SRC1, SRC2<br />
     1623Description: Permute bytes. Choose for every byte in dword, specified value. Bytes in
     1624SRC2 dword selects value for result dword. Value 0-7 choose byte of this index of quadword
     1625(64-bit value) built from SRC0 (higher bits) and SRC1 (lower bits). Value from 8-11
     1626choose 0xff<em>BIT, where BIT is last bit from 2</em>N+1 from 64-bit value (SRC0,SRC1).
     1627Value 12 choose zero. Value equal or greater than 13 choose 0xff.<br />
     1628Operation:<br />
     1629<code>VDST = 0
     1630UINT64 qword = (((UINT64)SRC0)&lt;&lt;32) | SRC1
     1631for (int i = 0; i &lt; 4; i++)
     1632{
     1633    BYTE choice = (SRC2 &gt;&gt; (8*i)) &amp; 0xff
     1634    BYTE result
     1635    if (choice &gt;= 13)
     1636        result = 0xff
     1637    else if (choice == 12)
     1638        result = 0
     1639    else if (choice &gt;= 8)
     1640        result = 0xff * qword&gt;&gt;((choice-8)*16 + 15)
     1641    else
     1642        result = (qword &gt;&gt; (choice*8)) &amp; 0xff
     1643    VDST |= (result &lt;&lt; (i*8))
     1644}</code></p>
    16061645<h4>V_QSAD_U8, V_QSAD_PK_U16_U8</h4>
    16071646<p>Opcode: 370 (0x172) for GCN 1.0/1.1; 485 (0x1e5) for GCN 1.2<br />