Changes between Version 10 and Version 11 of GcnInstrsVop3


Ignore:
Timestamp:
12/10/15 22:00:21 (8 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsVop3

    v10 v11  
    987987    VDST = SF0</code></p>
    988988<h4>V_DIV_SCALE_F32</h4>
     989<p>Opcode (VOP3B): 365 (0x16d) for GCN 1.0/1.1; 480 (0x1e0) for GCN 1.2<br />
     990Syntax: V_DIV_SCALE_F32 VDST, SDST(2), SRC0, SRC1, SRC2<br />
     991Description: Special case divide preop and flags. SRC0 is quotient, SRC1 is denominator,
     992SRC2 is nominator. All input values are floating point values. SRC0 must be equal SRC1
     993or SRC2 (register can be different, only values must be equal). If input different than
     994SRC0 is greater or equal than T2=POW(2.0, 96+EXP0), (EXP0 is exponent part (base 2)
     995of SRC0), then instruction multiply SRC0 by POW(2.0, 64), and store that value to VDST,
     996and set flag in bit for current lane in SDST. Otherwise store SRC0 to VDST and clear flag.<br />
     997Operation:<br />
     998<code>FLOAT SF0 = ASFLOAT(SRC0)
     999FLOAT SF1 = ASFLOAT(SRC1)
     1000FLOAT SF2 = ASFLOAT(SRC2)
     1001FLOAT S12 = (SRC0!=SRC1) ? SF1 : SF2
     1002if (S12 &gt;= POW(2.0, 96+FREXP(SF0)-1)
     1003{
     1004    VDST = SF0 * POW2(2.0, 64)
     1005    UINT64 MASK = (1ULL&lt;&lt;LANEID)
     1006    SDST = (SDST &amp; ~MASK) | MASK
     1007}
     1008else
     1009{
     1010    VDST = SRC0
     1011    SDST = (SDST &amp; ~MASK)
     1012}</code></p>
    9891013<h4>V_DIV_SCALE_F64</h4>
     1014<p>Opcode (VOP3B): 366 (0x16e) for GCN 1.0/1.1; 481 (0x1e1) for GCN 1.2<br />
     1015Syntax: V_DIV_SCALE_F64 VDST(2), SDST(2), SRC0(2), SRC1(2), SRC2(2)<br />
     1016Description: Special case divide preop and flags. SRC0 is quotient, SRC1 is denominator,
     1017SRC2 is nominator. All input values are double floating point values.
     1018SRC0 must be equal SRC1 or SRC2 (register can be different, only values must be equal).
     1019If input different than SRC0 is greater or equal than T2=POW(2.0, 768+EXP0),
     1020(EXP0 is exponent part (base 2) of SRC0), then instruction multiply SRC0 by POW(2.0, 128),
     1021and store that value to VDST, and set flag in bit for current lane in SDST.
     1022Otherwise store SRC0 to VDST and clear flag.<br />
     1023Operation:<br />
     1024<code>DOUBLE SD0 = ASDOUBLE(SRC0)
     1025DOUBLE SD1 = ASDOUBLE(SRC1)
     1026DOUBLE SD2 = ASDOUBLE(SRC2)
     1027DOUBLE S12 = (SRC0!=SRC1) ? SD1 : SD2
     1028UINT64 MASK = (1ULL&lt;&lt;LANEID)
     1029if (S12 &gt;= POW(2.0, 768+FREXP(SD0)-1)
     1030{
     1031    VDST = SD0 * POW2(2.0, 128)
     1032    SDST = (SDST &amp; ~MASK) | MASK
     1033}
     1034else
     1035{
     1036    VDST = SRC0
     1037    SDST = (SDST &amp; ~MASK)
     1038}</code></p>
    9901039<h4>V_FMA_F32</h4>
    9911040<p>Opcode: 331 (0x14b) for GCN 1.0/1.1; 459 (0x1cb) for GCN 1.2<br />