Changeset 1763 in CLRX


Ignore:
Timestamp:
Nov 29, 2015, 1:31:21 PM (5 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Small fixes in VOP1 instruction's list, and new instructions (V_SQRT*, V_SIN_F32, V_COS_F32, V_RSQ_*).

File:
1 edited

Legend:

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

    r1762 r1763  
    243243```
    244244
     245#### V_COS_F32
     246
     247Opcode VOP1: 54 (0x36) for GCN 1.0/1.1; 42 (0x2a) for GCN 1.2 
     248Opcode VOP3A: 438 (0x1b6) for GCN 1.0/1.1; 362 (0x16a) for GCN 1.2 
     249Syntax: V_COS_F32 VDST, SRC0 
     250Description: Compute cosine of FP value from SRC0. Input value must be normalized to range
     2511.0 - 1.0 (-360 degree : 360 degree). If SRC0 value is out of range then store 1.0 to VDST.
     252If SRC0 value is infinity, store -NAN to VDST. 
     253Operation: 
     254```
     255FLOAT SF = ASFLOAT(SRC0)
     256VDST = 1.0
     257if (SF >= -1.0 && SF <= 1.0)
     258    VDST = APPROX_COS(SF)
     259else if (ABS(SF)==INF)
     260    VDST = -NAN
     261else if (ABS(SF)==NAN)
     262    VDST = SRC0
     263```
     264
    245265#### V_CVT_F16_F32
    246266
     
    454474If value is higher/lower than maximal/minimal integer then store MAX_INT32/MIN_INT32 to VDST.
    455475If input value is NaN/-NaN then store MAX_INT32/MIN_INT32 to VDST. 
    456 Description: 
     476Operation: 
    457477```
    458478FLOAT SF = ASFLOAT(SRC0)
     
    615635Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
    616636Guaranted error below 1ulp. Result is clamped to MAX_FLOAT including sign of a result. 
    617 Description: 
     637Operation: 
    618638```
    619639VDST = APPROX_RCP(ASFLOAT(SRC0))
    620640if (ABS(ASFLOAT(VDST))==INF)
    621641    VDST = SIGN(ASFLOAT(VDST)) * MAX_FLOAT
    622 ```
    623 
    624 #### V_RCP_F32
    625 
    626 Opcode VOP1: 42 (0x2a) for GCN 1.0/1.1; 34 (0x22) for GCN 2.0 
    627 Opcode VOP3A: 426 (0x1aa) for GCN 1.0/1.1; 354 (0x162) for GCN 2.0 
    628 Syntax: V_RCP_F32 VDST, SRC0 
    629 Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
    630 Guaranted error below 1ulp. 
    631 Description: 
    632 ```
    633 VDST = APPROX_RCP(ASFLOAT(SRC0))
    634 ```
    635 
    636 #### V_RCP_F64
    637 
    638 Opcode VOP1: 47 (0x2f) for GCN 1.0/1.1; 37 (0x25) for GCN 2.0 
    639 Opcode VOP3A: 431 (0x1af) for GCN 1.0/1.1; 357 (0x165) for GCN 2.0 
    640 Syntax: V_RCP_F64 VDST(2), SRC0(2) 
    641 Description: Approximate reciprocal from double FP value SRC0 and store it to VDST.
    642 Relative error of approximation is ~1e-8. 
    643 Description: 
    644 ```
    645 VDST = APPROX_RCP(ASDOUBLE(SRC0))
    646642```
    647643
     
    654650Relative error of approximation is ~1e-8.
    655651Result is clamped to MAX_DOUBLE value including sign of a result. 
    656 Description: 
     652Operation: 
    657653```
    658654VDST = APPROX_RCP(ASDOUBLE(SRC0))
    659655if (ABS(ASDOUBLE(VDST))==INF)
    660656    VDST = SIGN(ASDOUBLE(VDST)) * MAX_DOUBLE
     657```
     658
     659#### V_RCP_F32
     660
     661Opcode VOP1: 42 (0x2a) for GCN 1.0/1.1; 34 (0x22) for GCN 2.0 
     662Opcode VOP3A: 426 (0x1aa) for GCN 1.0/1.1; 354 (0x162) for GCN 2.0 
     663Syntax: V_RCP_F32 VDST, SRC0 
     664Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
     665Guaranted error below 1ulp. 
     666Operation: 
     667```
     668VDST = APPROX_RCP(ASFLOAT(SRC0))
     669```
     670
     671#### V_RCP_F64
     672
     673Opcode VOP1: 47 (0x2f) for GCN 1.0/1.1; 37 (0x25) for GCN 2.0 
     674Opcode VOP3A: 431 (0x1af) for GCN 1.0/1.1; 357 (0x165) for GCN 2.0 
     675Syntax: V_RCP_F64 VDST(2), SRC0(2) 
     676Description: Approximate reciprocal from double FP value SRC0 and store it to VDST.
     677Relative error of approximation is ~1e-8. 
     678Operation: 
     679```
     680VDST = APPROX_RCP(ASDOUBLE(SRC0))
    661681```
    662682
     
    669689Guaranted error below 1ulp. This instruction signals integer division by zero, instead
    670690any floating point exception when error is occurred. 
    671 Description: 
     691Operation: 
    672692```
    673693VDST = APPROX_RCP_IFLAG(ASFLOAT(SRC0))
     
    727747Opcode VOP1: 44 (0x2c) for GCN 1.0/1.1 
    728748Opcode VOP3A: 428 (0x1ac) for GCN 1.0/1.1 
    729 Syntax: V_RCP_CLAMP_F32 VDST, SRC0 
     749Syntax: V_RSQ_CLAMP_F32 VDST, SRC0 
    730750Description: Approximate reciprocal square root from floating point value SRC0 with
    731751clamping to MAX_FLOAT, and store result to VDST.
    732752If SRC0 is negative value, store -NAN to VDST.
    733753This instruction doesn't handle denormalized values regardless FLOAT MODE register setup. 
    734 Description: 
     754Operation: 
    735755```
    736756VDST = APPROX_RSQRT(ASFLOAT(SRC0))
     
    739759```
    740760
     761#### V_RSQ_CLAMP_F64
     762
     763Opcode VOP1: 50 (0x32) for GCN 1.0/1.1
     764Opcode VOP3A: 434 (0x1b2) for GCN 1.0/1.1
     765Syntax: V_RSQ_CLAMP_F64 VDST(2), SRC0(2) 
     766Description: Approximate reciprocal square root from double floating point value SRC0
     767with clamping to MAX_DOUBLE ,and store it to VDST. If SRC0 is negative value,
     768store -NAN to VDST. 
     769Operation: 
     770```
     771VDST = APPROX_RSQRT(ASDOUBLE(SRC0))
     772if (ASDOUBLE(VDST)==INF)
     773    VDST = MAX_DOUBLE
     774```
     775
    741776#### V_RSQ_F32
    742777
    743778Opcode VOP1: 46 (0x2e) for GCN 1.0/1.1; 36 (0x24) for GCN 2.0 
    744779Opcode VOP3A: 430 (0x1ae) for GCN 1.0/1.1; 356 (0x164) for GCN 2.0 
    745 Syntax: V_RCP_F32 VDST, SRC0 
     780Syntax: V_RSQ_F32 VDST, SRC0 
    746781Description: Approximate reciprocal square root from floating point value SRC0 and
    747782store it to VDST. If SRC0 is negative value, store -NAN to VDST.
    748783This instruction doesn't handle denormalized values regardless FLOAT MODE register setup. 
    749 Description: 
     784Operation: 
    750785```
    751786VDST = APPROX_RSQRT(ASFLOAT(SRC0))
     787```
     788
     789#### V_RSQ_F64
     790
     791Opcode VOP1: 49 (0x31) for GCN 1.0/1.1; 38 (0x26) for GCN 2.0 
     792Opcode VOP3A: 433 (0x1b1) for GCN 1.0/1.1; 358 (0x166) for GCN 2.0 
     793Syntax: V_RSQ_F64 VDST(2), SRC0(2) 
     794Description: Approximate reciprocal square root from double floating point value SRC0 and
     795store it to VDST. If SRC0 is negative value, store -NAN to VDST. 
     796Operation: 
     797```
     798VDST = APPROX_RSQRT(ASDOUBLE(SRC0))
    752799```
    753800
     
    761808If result is zero then store 0.0 to VDST.
    762809This instruction doesn't handle denormalized values regardless FLOAT MODE register setup. 
    763 Description: 
     810Operation: 
    764811```
    765812VDST = APPROX_RSQRT(ASFLOAT(SRC0))
    766813if (ASFLOAT(VDST)==INF)
    767814    VDST = 0.0
     815```
     816
     817#### V_SIN_F32
     818
     819Opcode VOP1: 53 (0x35) for GCN 1.0/1.1; 41 (0x29) for GCN 1.2 
     820Opcode VOP3A: 437 (0x1b5) for GCN 1.0/1.1; 361 (0x169) for GCN 1.2 
     821Syntax: V_SIN_F32 VDST, SRC0 
     822Description: Compute sine of FP value from SRC0. Input value must be normalized to range
     8231.0 - 1.0 (-360 degree : 360 degree). If SRC0 value is out of range then store 0.0 to VDST.
     824If SRC0 value is infinity, store -NAN to VDST. 
     825Operation: 
     826```
     827FLOAT SF = ASFLOAT(SRC0)
     828VDST = 0.0
     829if (SF >= -1.0 && SF <= 1.0)
     830    VDST = APPROX_SIN(SF)
     831else if (ABS(SF)==INF)
     832    VDST = -NAN
     833else if (ABS(SF)==NAN)
     834    VDST = SRC0
     835```
     836
     837#### V_SQRT_F32
     838
     839Opcode VOP1: 51 (0x33) for GCN 1.0/1.1; 39 (0x27) for GCN 1.2 
     840Opcode VOP3A: 435 (0x1b3) for GCN 1.0/1.1; 359 (0x167) for GCN 1.2 
     841Syntax: V_SQRT_F32 VDST, SRC0 
     842Description: Compute square root of floating point value SRC0, and store result to VDST.
     843If SRC0 is negative value then store -NaN to VDST. 
     844Operation: 
     845```
     846if (ASFLOAT(SRC0)>=0.0)
     847    VDST = APPROX_SQRT(ASFLOAT(SRC0))
     848else
     849    VDST = -NAN
     850```
     851
     852#### V_SQRT_F64
     853
     854Opcode VOP1: 52 (0x34) for GCN 1.0/1.1; 40 (0x28) for GCN 1.2 
     855Opcode VOP3A: 436 (0x1b4) for GCN 1.0/1.1; 360 (0x168) for GCN 1.2 
     856Syntax: V_SQRT_F64 VDST(2), SRC0(2) 
     857Description: Compute square root of double floating point value SRC0, and store result
     858to VDST. Relative error of approximation is ~1e-8.
     859If SRC0 is negative value then store -NaN to VDST. 
     860Operation: 
     861```
     862if (ASDOUBLE(SRC0)>=0.0)
     863    VDST = APPROX_SQRT(ASDOUBLE(SRC0))
     864else
     865    VDST = -NAN
    768866```
    769867
Note: See TracChangeset for help on using the changeset viewer.