Changes between Version 29 and Version 30 of GcnInstrsVop1


Ignore:
Timestamp:
06/17/17 11:00:27 (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsVop1

    v29 v30  
    14531453else
    14541454    VDST = NAN * SIGN(SD)</code></p>
     1455<h4>V_FREXP_EXP_I16_F16</h4>
     1456<p>Opcode VOP1: 67 (0x43) for GCN 1.2<br />
     1457Opcode VOP3A: 387 (0x183) for GCN 1.2<br />
     1458Syntax: V_FREXP_EXP_I16_F16 VDST, SRC0<br />
     1459Description: Get exponent plus 1 from half FP value SRC0, and store that exponent to VDST
     1460as 16-bit signed integer. This instruction realizes frexp function.
     1461If SRC0 is infinity or NAN then store 0 to VDST.<br />
     1462Operation:<br />
     1463<code>HALF SF = ASHALF(SRC0)
     1464if (ABS(SF) != INF_H &amp;&amp; !ISNAN(SF))
     1465    VDST = (INT16)FREXP_EXP(SF)
     1466else
     1467    VDST = 0</code></p>
    14551468<h4>V_FREXP_EXP_I32_F32</h4>
    14561469<p>Opcode VOP1: 63 (0x3f) for GCN 1.0/1.1; 51 (0x33) for GCN 1.2<br />
     
    14591472Description: Get exponent plus 1 from single FP value SRC0, and store that exponent to VDST.
    14601473This instruction realizes frexp function.
    1461 If SRC0 is infinity or NAN then store -1 to VDST.<br />
     1474If SRC0 is infinity or NAN then store -1 if GCN 1.0 or 0 to VDST.<br />
    14621475Operation:<br />
    14631476<code>FLOAT SF = ASFLOAT(SRC0)
     
    14651478    VDST = FREXP_EXP(SF)
    14661479else
    1467     VDST = -1</code></p>
     1480    VDST = -1 // GCN 1.0
     1481    VDST = 0 // later</code></p>
    14681482<h4>V_FREXP_EXP_I32_F64</h4>
    14691483<p>Opcode VOP1: 60 (0x3c) for GCN 1.0/1.1; 48 (0x30) for GCN 1.2<br />
     
    14721486Description: Get exponent plus 1 from double FP value SRC0, and store that exponent to VDST.
    14731487This instruction realizes frexp function.
    1474 If SRC0 is infinity or NAN then store -1 to VDST.<br />
     1488If SRC0 is infinity or NAN then store -1 if GCN 1.0 or 0 to VDST.<br />
    14751489Operation:<br />
    14761490<code>DOUBLE SD = ASDOUBLE(SRC0)
     
    14781492    VDST = FREXP_EXP(SD)
    14791493else
    1480     VDST = -1</code></p>
     1494    VDST = -1 // GCN 1.0
     1495    VDST = 0 // later</code></p>
     1496<h4>V_FREXP_MANT_F16</h4>
     1497<p>Opcode VOP1: 66 (0x42) for GCN 1.2<br />
     1498Opcode VOP3A: 386 (0x182) for GCN 1.2<br />
     1499Syntax: V_FREXP_MANT_F16 VDST, SRC0<br />
     1500Description: Get mantisa from half FP value SRC0, and store it to VDST. Mantisa includes
     1501sign of input.<br />
     1502Operation:<br />
     1503<code>HALF SF = ASHALF(SRC0)
     1504if (ABS(SF) == INF)
     1505    VDST = SF
     1506else if (!ISNAN(SF))
     1507    VDST = FREXP_MANT(SF) * SIGN(SF)
     1508else
     1509    VDST = NAN_H * SIGN(SF)</code></p>
    14811510<h4>V_FREXP_MANT_F32</h4>
    14821511<p>Opcode VOP1: 64 (0x40) for GCN 1.0/1.1; 52 (0x34) for GCN 1.2<br />
    14831512Opcode VOP3A: 448 (0x1c0) for GCN 1.0/1.1; 372 (0x174) for GCN 1.2<br />
    14841513Syntax: V_FREXP_MANT_F32 VDST, SRC0<br />
    1485 Description: Get mantisa from double FP value SRC0, and store it to VDST. Mantisa includes
    1486 sign of input. If SRC0 is infinity then store -NAN to VDST.<br />
     1514Description: Get mantisa from single FP value SRC0, and store it to VDST. Mantisa includes
     1515sign of input. For GCN 1.0, if SRC0 is infinity then store -NAN to VDST.<br />
    14871516Operation:<br />
    14881517<code>FLOAT SF = ASFLOAT(SRC0)
    14891518if (ABS(SF) == INF)
    1490     VDST = -NAN
     1519    VDST = -NAN // GCN 1.0
     1520    VDST = SF // later
    14911521else if (!ISNAN(SF))
    14921522    VDST = FREXP_MANT(SF) * SIGN(SF)
     
    15021532<code>DOUBLE SD = ASDOUBLE(SRC0)
    15031533if (ABS(SD) == INF)
    1504     VDST = -NAN
     1534    VDST = -NAN // GCN 1.0
     1535    VDST = SF // later
    15051536else if (!ISNAN(SD))
    15061537    VDST = FREXP_MANT(SD) * SIGN(SD)