Changeset 3171 in CLRX


Ignore:
Timestamp:
Jun 17, 2017, 10:53:01 AM (2 years ago)
Author:
matszpk
Message:

CLRadeonExtender: CLRXDocs: Update info about special cases for V_FREXP_* (for GCN 1.0 and later).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/doc/GcnInstrsVop1.md

    r3170 r3171  
    768768Description: Get exponent plus 1 from half FP value SRC0, and store that exponent to VDST
    769769as 16-bit signed integer. This instruction realizes frexp function.
    770 If SRC0 is infinity or NAN then store -1 to VDST. 
     770If SRC0 is infinity or NAN then store 0 to VDST. 
    771771Operation: 
    772772```
     
    775775    VDST = (INT16)FREXP_EXP(SF)
    776776else
    777     VDST = (INT16)-1
     777    VDST = 0
    778778```
    779779
     
    785785Description: Get exponent plus 1 from single FP value SRC0, and store that exponent to VDST.
    786786This instruction realizes frexp function.
    787 If SRC0 is infinity or NAN then store -1 to VDST. 
     787If SRC0 is infinity or NAN then store -1 if GCN 1.0 or 0 to VDST. 
    788788Operation: 
    789789```
     
    792792    VDST = FREXP_EXP(SF)
    793793else
    794     VDST = -1
     794    VDST = -1 // GCN 1.0
     795    VDST = 0 // later
    795796```
    796797
     
    802803Description: Get exponent plus 1 from double FP value SRC0, and store that exponent to VDST.
    803804This instruction realizes frexp function.
    804 If SRC0 is infinity or NAN then store -1 to VDST. 
     805If SRC0 is infinity or NAN then store -1 if GCN 1.0 or 0 to VDST. 
    805806Operation: 
    806807```
     
    809810    VDST = FREXP_EXP(SD)
    810811else
    811     VDST = -1
     812    VDST = -1 // GCN 1.0
     813    VDST = 0 // later
    812814```
    813815
     
    818820Syntax: V_FREXP_MANT_F16 VDST, SRC0 
    819821Description: Get mantisa from half FP value SRC0, and store it to VDST. Mantisa includes
    820 sign of input. If SRC0 is infinity then store -NAN to VDST.
     822sign of input.
    821823Operation: 
    822824```
    823825HALF SF = ASHALF(SRC0)
    824826if (ABS(SF) == INF)
    825     VDST = -NAN_H
     827    VDST = SF
    826828else if (!ISNAN(SF))
    827829    VDST = FREXP_MANT(SF) * SIGN(SF)
     
    836838Syntax: V_FREXP_MANT_F32 VDST, SRC0 
    837839Description: Get mantisa from single FP value SRC0, and store it to VDST. Mantisa includes
    838 sign of input. If SRC0 is infinity then store -NAN to VDST. 
     840sign of input. For GCN 1.0, if SRC0 is infinity then store -NAN to VDST. 
    839841Operation: 
    840842```
    841843FLOAT SF = ASFLOAT(SRC0)
    842844if (ABS(SF) == INF)
    843     VDST = -NAN
     845    VDST = -NAN // GCN 1.0
     846    VDST = SF // later
    844847else if (!ISNAN(SF))
    845848    VDST = FREXP_MANT(SF) * SIGN(SF)
     
    859862DOUBLE SD = ASDOUBLE(SRC0)
    860863if (ABS(SD) == INF)
    861     VDST = -NAN
     864    VDST = -NAN // GCN 1.0
     865    VDST = SF // later
    862866else if (!ISNAN(SD))
    863867    VDST = FREXP_MANT(SD) * SIGN(SD)
Note: See TracChangeset for help on using the changeset viewer.