Changes between Version 9 and Version 10 of GcnInstrsVop1


Ignore:
Timestamp:
Nov 29, 2015, 2:00:16 PM (4 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsVop1

    v9 v10  
    10841084    F += 1.0
    10851085VDST = F</code></p>
     1086<h4>V_COS_F32</h4>
     1087<p>Opcode VOP1: 54 (0x36) for GCN 1.0/1.1; 42 (0x2a) for GCN 1.2<br />
     1088Opcode VOP3A: 438 (0x1b6) for GCN 1.0/1.1; 362 (0x16a) for GCN 1.2<br />
     1089Syntax: V_COS_F32 VDST, SRC0<br />
     1090Description: Compute cosine of FP value from SRC0. Input value must be normalized to range
     10911.0 - 1.0 (-360 degree : 360 degree). If SRC0 value is out of range then store 1.0 to VDST.
     1092If SRC0 value is infinity, store -NAN to VDST.<br />
     1093Operation:<br />
     1094<code>FLOAT SF = ASFLOAT(SRC0)
     1095VDST = 1.0
     1096if (SF &gt;= -1.0 &amp;&amp; SF &lt;= 1.0)
     1097    VDST = APPROX_COS(SF)
     1098else if (ABS(SF)==INF)
     1099    VDST = -NAN
     1100else if (ABS(SF)==NAN)
     1101    VDST = SRC0</code></p>
    10861102<h4>V_CVT_F16_F32</h4>
    10871103<p>Opcode VOP1: 10 (0xa)<br />
     
    12301246If value is higher/lower than maximal/minimal integer then store MAX_INT32/MIN_INT32 to VDST.
    12311247If input value is NaN/-NaN then store MAX_INT32/MIN_INT32 to VDST.<br />
    1232 Description:<br />
     1248Operation:<br />
    12331249<code>FLOAT SF = ASFLOAT(SRC0)
    12341250if (ABS(SF)!=NAN)
     
    13511367Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
    13521368Guaranted error below 1ulp. Result is clamped to MAX_FLOAT including sign of a result.<br />
    1353 Description:<br />
     1369Operation:<br />
    13541370<code>VDST = APPROX_RCP(ASFLOAT(SRC0))
    13551371if (ABS(ASFLOAT(VDST))==INF)
    13561372    VDST = SIGN(ASFLOAT(VDST)) * MAX_FLOAT</code></p>
     1373<h4>V_RCP_CLAMP_F64</h4>
     1374<p>Opcode VOP1: 48 (0x30) for GCN 1.0/1.1<br />
     1375Opcode VOP3A: 432 (0x1b0) for GCN 1.0/1.1<br />
     1376Syntax: V_RCP_CLAMP_F64 VDST(2), SRC0(2)<br />
     1377Description: Approximate reciprocal from double FP value SRC0 and store it to VDST.
     1378Relative error of approximation is ~1e-8.
     1379Result is clamped to MAX_DOUBLE value including sign of a result.<br />
     1380Operation:<br />
     1381<code>VDST = APPROX_RCP(ASDOUBLE(SRC0))
     1382if (ABS(ASDOUBLE(VDST))==INF)
     1383    VDST = SIGN(ASDOUBLE(VDST)) * MAX_DOUBLE</code></p>
    13571384<h4>V_RCP_F32</h4>
    13581385<p>Opcode VOP1: 42 (0x2a) for GCN 1.0/1.1; 34 (0x22) for GCN 2.0<br />
     
    13611388Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
    13621389Guaranted error below 1ulp.<br />
    1363 Description:<br />
     1390Operation:<br />
    13641391<code>VDST = APPROX_RCP(ASFLOAT(SRC0))</code></p>
    13651392<h4>V_RCP_F64</h4>
     
    13691396Description: Approximate reciprocal from double FP value SRC0 and store it to VDST.
    13701397Relative error of approximation is ~1e-8.<br />
    1371 Description:<br />
     1398Operation:<br />
    13721399<code>VDST = APPROX_RCP(ASDOUBLE(SRC0))</code></p>
    1373 <h4>V_RCP_CLAMP_F64</h4>
    1374 <p>Opcode VOP1: 48 (0x30) for GCN 1.0/1.1<br />
    1375 Opcode VOP3A: 432 (0x1b0) for GCN 1.0/1.1<br />
    1376 Syntax: V_RCP_CLAMP_F64 VDST(2), SRC0(2)<br />
    1377 Description: Approximate reciprocal from double FP value SRC0 and store it to VDST.
    1378 Relative error of approximation is ~1e-8.
    1379 Result is clamped to MAX_DOUBLE value including sign of a result.<br />
    1380 Description:<br />
    1381 <code>VDST = APPROX_RCP(ASDOUBLE(SRC0))
    1382 if (ABS(ASDOUBLE(VDST))==INF)
    1383     VDST = SIGN(ASDOUBLE(VDST)) * MAX_DOUBLE</code></p>
    13841400<h4>V_RCP_IFLAG_F32</h4>
    13851401<p>Opcode VOP1: 43 (0x2b) for GCN 1.0/1.1; 35 (0x23) for GCN 2.0<br />
     
    13891405Guaranted error below 1ulp. This instruction signals integer division by zero, instead
    13901406any floating point exception when error is occurred.<br />
    1391 Description:<br />
     1407Operation:<br />
    13921408<code>VDST = APPROX_RCP_IFLAG(ASFLOAT(SRC0))</code></p>
    13931409<h4>V_RCP_LEGACY_F32</h4>
     
    14311447<p>Opcode VOP1: 44 (0x2c) for GCN 1.0/1.1<br />
    14321448Opcode VOP3A: 428 (0x1ac) for GCN 1.0/1.1<br />
    1433 Syntax: V_RCP_CLAMP_F32 VDST, SRC0<br />
     1449Syntax: V_RSQ_CLAMP_F32 VDST, SRC0<br />
    14341450Description: Approximate reciprocal square root from floating point value SRC0 with
    14351451clamping to MAX_FLOAT, and store result to VDST.
    14361452If SRC0 is negative value, store -NAN to VDST.
    14371453This instruction doesn't handle denormalized values regardless FLOAT MODE register setup.<br />
    1438 Description:<br />
     1454Operation:<br />
    14391455<code>VDST = APPROX_RSQRT(ASFLOAT(SRC0))
    14401456if (ASFLOAT(VDST)==INF)
    14411457    VDST = MAX_FLOAT</code></p>
     1458<h4>V_RSQ_CLAMP_F64</h4>
     1459<p>Opcode VOP1: 50 (0x32) for GCN 1.0/1.1
     1460Opcode VOP3A: 434 (0x1b2) for GCN 1.0/1.1
     1461Syntax: V_RSQ_CLAMP_F64 VDST(2), SRC0(2)<br />
     1462Description: Approximate reciprocal square root from double floating point value SRC0
     1463with clamping to MAX_DOUBLE ,and store it to VDST. If SRC0 is negative value,
     1464store -NAN to VDST.<br />
     1465Operation:<br />
     1466<code>VDST = APPROX_RSQRT(ASDOUBLE(SRC0))
     1467if (ASDOUBLE(VDST)==INF)
     1468    VDST = MAX_DOUBLE</code></p>
    14421469<h4>V_RSQ_F32</h4>
    14431470<p>Opcode VOP1: 46 (0x2e) for GCN 1.0/1.1; 36 (0x24) for GCN 2.0<br />
    14441471Opcode VOP3A: 430 (0x1ae) for GCN 1.0/1.1; 356 (0x164) for GCN 2.0<br />
    1445 Syntax: V_RCP_F32 VDST, SRC0<br />
     1472Syntax: V_RSQ_F32 VDST, SRC0<br />
    14461473Description: Approximate reciprocal square root from floating point value SRC0 and
    14471474store it to VDST. If SRC0 is negative value, store -NAN to VDST.
    14481475This instruction doesn't handle denormalized values regardless FLOAT MODE register setup.<br />
    1449 Description:<br />
     1476Operation:<br />
    14501477<code>VDST = APPROX_RSQRT(ASFLOAT(SRC0))</code></p>
     1478<h4>V_RSQ_F64</h4>
     1479<p>Opcode VOP1: 49 (0x31) for GCN 1.0/1.1; 38 (0x26) for GCN 2.0<br />
     1480Opcode VOP3A: 433 (0x1b1) for GCN 1.0/1.1; 358 (0x166) for GCN 2.0<br />
     1481Syntax: V_RSQ_F64 VDST(2), SRC0(2)<br />
     1482Description: Approximate reciprocal square root from double floating point value SRC0 and
     1483store it to VDST. If SRC0 is negative value, store -NAN to VDST.<br />
     1484Operation:<br />
     1485<code>VDST = APPROX_RSQRT(ASDOUBLE(SRC0))</code></p>
    14511486<h4>V_RSQ_LEGACY_F32</h4>
    14521487<p>Opcode VOP1: 45 (0x2d) for GCN 1.0/1.1<br />
     
    14571492If result is zero then store 0.0 to VDST.
    14581493This instruction doesn't handle denormalized values regardless FLOAT MODE register setup.<br />
    1459 Description:<br />
     1494Operation:<br />
    14601495<code>VDST = APPROX_RSQRT(ASFLOAT(SRC0))
    14611496if (ASFLOAT(VDST)==INF)
    14621497    VDST = 0.0</code></p>
     1498<h4>V_SIN_F32</h4>
     1499<p>Opcode VOP1: 53 (0x35) for GCN 1.0/1.1; 41 (0x29) for GCN 1.2<br />
     1500Opcode VOP3A: 437 (0x1b5) for GCN 1.0/1.1; 361 (0x169) for GCN 1.2<br />
     1501Syntax: V_SIN_F32 VDST, SRC0<br />
     1502Description: Compute sine of FP value from SRC0. Input value must be normalized to range
     15031.0 - 1.0 (-360 degree : 360 degree). If SRC0 value is out of range then store 0.0 to VDST.
     1504If SRC0 value is infinity, store -NAN to VDST.<br />
     1505Operation:<br />
     1506<code>FLOAT SF = ASFLOAT(SRC0)
     1507VDST = 0.0
     1508if (SF &gt;= -1.0 &amp;&amp; SF &lt;= 1.0)
     1509    VDST = APPROX_SIN(SF)
     1510else if (ABS(SF)==INF)
     1511    VDST = -NAN
     1512else if (ABS(SF)==NAN)
     1513    VDST = SRC0</code></p>
     1514<h4>V_SQRT_F32</h4>
     1515<p>Opcode VOP1: 51 (0x33) for GCN 1.0/1.1; 39 (0x27) for GCN 1.2<br />
     1516Opcode VOP3A: 435 (0x1b3) for GCN 1.0/1.1; 359 (0x167) for GCN 1.2<br />
     1517Syntax: V_SQRT_F32 VDST, SRC0<br />
     1518Description: Compute square root of floating point value SRC0, and store result to VDST.
     1519If SRC0 is negative value then store -NaN to VDST.<br />
     1520Operation:<br />
     1521<code>if (ASFLOAT(SRC0)&gt;=0.0)
     1522    VDST = APPROX_SQRT(ASFLOAT(SRC0))
     1523else
     1524    VDST = -NAN</code></p>
     1525<h4>V_SQRT_F64</h4>
     1526<p>Opcode VOP1: 52 (0x34) for GCN 1.0/1.1; 40 (0x28) for GCN 1.2<br />
     1527Opcode VOP3A: 436 (0x1b4) for GCN 1.0/1.1; 360 (0x168) for GCN 1.2<br />
     1528Syntax: V_SQRT_F64 VDST(2), SRC0(2)<br />
     1529Description: Compute square root of double floating point value SRC0, and store result
     1530to VDST. Relative error of approximation is ~1e-8.
     1531If SRC0 is negative value then store -NaN to VDST.<br />
     1532Operation:<br />
     1533<code>if (ASDOUBLE(SRC0)&gt;=0.0)
     1534    VDST = APPROX_SQRT(ASDOUBLE(SRC0))
     1535else
     1536    VDST = -NAN</code></p>
    14631537<h4>V_TRUNC_F32</h4>
    14641538<p>Opcode VOP1: 33 (0x21) for GCN 1.0/1.1; 28 (0x1c) for GCN 1.2<br />