Changeset 4746 in CLRX


Ignore:
Timestamp:
Jul 5, 2019, 9:56:42 PM (9 months ago)
Author:
matszpk
Message:

CLRadeonExtender: GCNDisasm: Detect wrong encoding for VOP3P (GFX10).

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/GCNDisasm.cpp

    r4745 r4746  
    133133    { 0x1e62+0x0bec, 0x1 }, /* GCNENC_EXP, opcode = none */
    134134    { 0x1e62+0x0bed, 0x80 }, /* GCNENC_FLAT, opcode = (8bit)<<18 (???8bit) */
    135     { 0x1e62+0x0c6d, 0x40 }, /* GCNENC_VOP3P */
     135    { 0x1e62+0x0c6d, 0x80 }, /* GCNENC_VOP3P */
    136136};
    137137
    138138// total instruction table length
    139 static const size_t gcnInstrTableByCodeLength = 0x1e62 + 0x0cad;
     139static const size_t gcnInstrTableByCodeLength = 0x1e62 + 0x0ced;
    140140
    141141enum: cxuint {
     
    567567    { 0, 0 }, /* GCNENC_EXP, opcode = none */
    568568    { 18, 7 }, /* GCNENC_FLAT, opcode = (8bit)<<18 (???8bit) */
    569     { 16, 10 } /* GCNENC_VOP3P, opcode = (10bit)<<16 */
     569    { 16, 7 } /* GCNENC_VOP3P, opcode = (7bit)<<16 */
    570570};
    571571
     
    844844        }
    845845       
     846        if (isGCN15 && gcnEncoding == GCNENC_VOP3P && (insnCode & 0x3000000U)!=0)
     847        {
     848            // unknown encoding
     849            gcnEncoding = GCNENC_NONE;
     850            pos--;
     851        }
     852       
    846853        if (gcnEncoding == GCNENC_NONE)
    847854        {
  • CLRadeonExtender/trunk/tests/amdasm/GCNDisasmOpc15.cpp

    r4744 r4746  
    24762476    { 0xcc214037U, 0x1f974d4fU, true, "        v_fma_mixlo_f16 v55, v79, v166, v229\n" },
    24772477    { 0xcc224037U, 0x1f974d4fU, true, "        v_fma_mixhi_f16 v55, v79, v166, v229\n" },
     2478    { 0xcd024037U, 0x18034d4fU, true, "        .int 0xcd024037\n"
     2479            "        v_mul_hi_u32_u24 v1, v79, v166\n" }, // wrong encoding
    24782480    /* VINTRP */
    24792481    { 0xc9746bd3U, 0, false, "        v_interp_p1_f32 v93, v211, attr26.w\n" },
Note: See TracChangeset for help on using the changeset viewer.