Changeset 1761 in CLRX


Ignore:
Timestamp:
Nov 28, 2015, 10:19:04 PM (4 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Updated VOP1 instruction list (added V_EXP/LOG/RCP/RSQ*_F32 instructions).

File:
1 edited

Legend:

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

    r1760 r1761  
    495495```
    496496
     497#### V_EXP_F32
     498
     499Opcode VOP1: 37 (0x25) for GCN 1.0/1.1; 32 (0x20) for GCN 1.2 
     500Opcode VOP3A: 421 (0x1a5) for GCN 1.0/1.1; 352 (0x160) for GCN 1.2 
     501Syntax: V_EXP_F32 VDST, SRC0 
     502Description: Approximate power of two from FP value SRC0 and store it to VDST. Instruction
     503for values smaller than -126.0 always returns 0 regardless floatmode in MODE register. 
     504Operation: 
     505```
     506if (ASFLOAT(SRC0)>=-126.0)
     507    VDST = APPROX_POW2(ASFLOAT(SRC0))
     508else
     509    VDST = 0.0
     510```
     511
    497512#### V_FLOOR_F32
    498513
    499 Opcode VOP1: 37 (0x25) for GCN 1.0/1.1; 31 (0x1f) for GCN 1.2 
    500 Opcode VOP3A: 421 (0x1a5) for GCN 1.0/1.1; 351 (0x15f) for GCN 1.2 
     514Opcode VOP1: 36 (0x24) for GCN 1.0/1.1; 31 (0x1f) for GCN 1.2 
     515Opcode VOP3A: 420 (0x1a4) for GCN 1.0/1.1; 351 (0x15f) for GCN 1.2 
    501516Syntax: V_FLOOR_F32 VDST, SRC0 
    502517Description: Truncate floating point valu from SRC0 with rounding to positive infinity
     
    524539```
    525540
     541#### V_LOG_CLAMP_F32
     542
     543Opcode VOP1: 38 (0x26) for GCN 1.0/1.1 
     544Opcode VOP3A: 422 (0x1a6) for GCN 1.0/1.1 
     545Syntax: V_LOG_CLAMP_F32 VDST, SRC0 
     546Description: Approximate logarithm of base 2 from floating point value SRC0 with
     547clamping infinities to -MAX_FLOAT. Result is stored in VDST.
     548If SRC0 is negative then store -NaN to VDST. This instruction doesn't handle denormalized
     549values regardless FLOAT MODE register setup. 
     550Operation: 
     551```
     552FLOAT F = ASFLOAT(SRC0)
     553if (F==1.0)
     554    VDST = 0.0f
     555if (F<0.0)
     556    VDST = -NaN
     557else
     558{
     559    VDST = APPROX_LOG2(F)
     560    if (ASFLOAT(VDST)==-INF)
     561        VDST = -MAX_FLOAT
     562}
     563```
     564
     565#### V_LOG_F32
     566
     567Opcode VOP1: 39 (0x27) for GCN 1.0/1.1; 33 (0x21) for GCN 2.0 
     568Opcode VOP3A: 422 (0x1a6) for GCN 1.0/1.1; 353 (0x161) for GCN 2.0 
     569Syntax: V_LOG_F32 VDST, SRC0 
     570Description: Approximate logarithm of base 2 from floating point value SRC0, and store result
     571to VDST. If SRC0 is negative then store -NaN to VDST.
     572This instruction doesn't handle denormalized values regardless FLOAT MODE register setup. 
     573Operation: 
     574```
     575FLOAT F = ASFLOAT(SRC0)
     576if (F==1.0)
     577    VDST = 0.0f
     578if (F<0.0)
     579    VDST = -NaN
     580else
     581    VDST = APPROX_LOG2(F)
     582```
     583
    526584#### V_MOV_FED_B32
    527585
     
    549607Syntax: V_NOP 
    550608Description: Do nothing.
     609
     610#### V_RCP_CLAMP_F32
     611
     612Opcode VOP1: 40 (0x28) for GCN 1.0/1.1 
     613Opcode VOP3A: 424 (0x1a8) for GCN 1.0/1.1 
     614Syntax: V_RCP_CLAMP_F32 VDST, SRC0 
     615Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
     616Guaranted error below 1ulp. Result is clamped maximum float value including its sign. 
     617Description: 
     618```
     619VDST = APPROX_RCP(ASFLOAT(SRC0))
     620if (ABS(ASFLOAT(VDST))==INF)
     621    VDST = SIGN(ASFLOAT(VDST)) * MAX_FLOAT
     622```
     623
     624#### V_RCP_F32
     625
     626Opcode VOP1: 42 (0x2a) for GCN 1.0/1.1; 34 (0x22) for GCN 2.0 
     627Opcode VOP3A: 426 (0x1aa) for GCN 1.0/1.1; 354 (0x162) for GCN 2.0 
     628Syntax: V_RCP_F32 VDST, SRC0 
     629Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
     630Guaranted error below 1ulp. 
     631Description: 
     632```
     633VDST = APPROX_RCP(ASFLOAT(SRC0))
     634```
     635
     636#### V_RCP_IFLAG_F32
     637
     638Opcode VOP1: 43 (0x2b) for GCN 1.0/1.1; 35 (0x23) for GCN 2.0 
     639Opcode VOP3A: 427 (0x1ab) for GCN 1.0/1.1; 355 (0x163) for GCN 2.0 
     640Syntax: V_RCP_IFLAG_F32 VDST, SRC0 
     641Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
     642Guaranted error below 1ulp. This instruction signals integer division by zero, instead
     643any floating point exception when error is occurred. 
     644Description: 
     645```
     646VDST = APPROX_RCP_IFLAG(ASFLOAT(SRC0))
     647```
     648
     649#### V_RCP_LEGACY_F32
     650
     651Opcode VOP1: 41 (0x29) for GCN 1.0/1.1 
     652Opcode VOP3A: 425 (0x1a9) for GCN 1.0/1.1 
     653Syntax: V_RCP_LEGACY_F32 VDST, SRC0 
     654Description: Approximate reciprocal from floating point value SRC0 and store it to VDST.
     655Guaranted error below 1ulp. If SRC0 or VDST is zero or infinity then store 0 with proper sign
     656to VDST. 
     657Operation: 
     658```
     659FLOAT SF = ASFLOAT(SRC0)
     660if (ABS(SF)==0.0)
     661    VDST = SIGN(SF)*0.0
     662else
     663{
     664    VDST = APPROX_RCP(SF)
     665    if (ABS(ASFLOAT(VDST)) == INF)
     666        VDST = SIGN(SF)*0.0
     667}
     668```
    551669
    552670#### V_READFIRSTLANE_B32
     
    578696```
    579697
     698#### V_RSQ_CLAMP_F32
     699
     700Opcode VOP1: 44 (0x2c) for GCN 1.0/1.1 
     701Opcode VOP3A: 428 (0x1ac) for GCN 1.0/1.1 
     702Syntax: V_RCP_CLAMP_F32 VDST, SRC0 
     703Description: Approximate reciprocal square root from floating point value SRC0 with
     704clamping to MAX_FLOAT, and store result to VDST.
     705If SRC0 is negative value, store -NAN to VDST.
     706This instruction doesn't handle denormalized values regardless FLOAT MODE register setup. 
     707Description: 
     708```
     709VDST = APPROX_RSQRT(ASFLOAT(SRC0))
     710if (ASFLOAT(VDST)==INF)
     711    VDST = MAX_FLOAT
     712```
     713
     714#### V_RSQ_LEGACY_F32
     715
     716Opcode VOP1: 45 (0x2d) for GCN 1.0/1.1 
     717Opcode VOP3A: 429 (0x1ad) for GCN 1.0/1.1 
     718Syntax: V_RCP_LEGACY_F32 VDST, SRC0 
     719Description: Approximate reciprocal square root from floating point value SRC0,
     720and store result to VDST. If SRC0 is negative value, store -NAN to VDST.
     721If result is zero then store 0.0 to VDST.
     722This instruction doesn't handle denormalized values regardless FLOAT MODE register setup. 
     723Description: 
     724```
     725VDST = APPROX_RSQRT(ASFLOAT(SRC0))
     726if (ASFLOAT(VDST)==INF)
     727    VDST = 0.0
     728```
     729
     730#### V_RSQ_F32
     731
     732Opcode VOP1: 46 (0x2e) for GCN 1.0/1.1; 36 (0x24) for GCN 2.0 
     733Opcode VOP3A: 430 (0x1ae) for GCN 1.0/1.1; 356 (0x164) for GCN 2.0 
     734Syntax: V_RCP_F32 VDST, SRC0 
     735Description: Approximate reciprocal square root from floating point value SRC0 and
     736store it to VDST. If SRC0 is negative value, store -NAN to VDST.
     737This instruction doesn't handle denormalized values regardless FLOAT MODE register setup. 
     738Description: 
     739```
     740VDST = APPROX_RSQRT(ASFLOAT(SRC0))
     741```
     742
    580743#### V_TRUNC_F32
    581744
Note: See TracChangeset for help on using the changeset viewer.