Changeset 4824 in CLRX


Ignore:
Timestamp:
Jul 22, 2019, 4:24:29 PM (5 months ago)
Author:
matszpk
Message:

CLRadeonExtender: GCNAsm: Add VOPC instructions (GFX10). Fixed syntax parsing VOPC without SDST.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

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

    r4815 r4824  
    17721772   
    17731773    // parse SDST (2 SGPR's)
    1774     gcnAsm->setCurrentRVU(0);
    1775     good &= parseSRegRange(asmr, linePtr, dstReg, arch, 2, GCNFIELD_VOP3_SDST0, true,
    1776                            INSTROP_SYMREGRANGE|INSTROP_SGPR_UNALIGNED|INSTROP_WRITE);
    1777     if (!skipRequiredComma(asmr, linePtr))
    1778         return false;
     1774    if ((gcnInsn.mode & GCN_VOPC_NOVCC) == 0)
     1775    {
     1776        gcnAsm->setCurrentRVU(0);
     1777        good &= parseSRegRange(asmr, linePtr, dstReg, arch, 2, GCNFIELD_VOP3_SDST0, true,
     1778                            INSTROP_SYMREGRANGE|INSTROP_SGPR_UNALIGNED|INSTROP_WRITE);
     1779        if (!skipRequiredComma(asmr, linePtr))
     1780            return false;
     1781    }
    17791782   
    17801783    const Flags literalConstsFlags = (mode2==GCN_FLOATLIT) ? INSTROP_FLOAT :
     
    18171820                ((opMods.sextMod&2) ? VOPOP_SEXT : 0);
    18181821   
     1822    const cxuint vccCode = ((gcnInsn.mode & GCN_VOPC_NOVCC) == 0) ? 106 : 0;
    18191823    // determine whether SDWA is needed or VOP3 encoding needed
    18201824    extraMods.needSDWA |= ((src0Op.vopMods | src1Op.vopMods) & VOPOP_SEXT) != 0;
    18211825    bool vop3 = //(dstReg.start!=106) || (src1Op.range.start<256) ||
    1822         ((!isGCN14 || !extraMods.needSDWA) && !dstReg.isVal(106)) ||
     1826        ((!isGCN14 || !extraMods.needSDWA) && !dstReg.isVal(vccCode)) ||
    18231827        ((!isGCN14 || !extraMods.needSDWA) && src1Op.range.isNonVGPR()) ||
    18241828        (!isGCN12 && (src0Op.vopMods!=0 || src1Op.vopMods!=0)) ||
  • CLRadeonExtender/trunk/tests/amdasm/GCNAsmOpc15.cpp

    r4823 r4824  
    16811681    { "    v_cmp_t_f32  vcc, v79, v201", 0x7c1f934fU, 0, false, true, "" },
    16821682    { "    v_cmp_t_f32  s[42:43], v50, v107", 0xd40f002aU, 0x0002d732U, true, true, "" },
     1683   
     1684    { "    v_cmpx_f_f32  v79, v201", 0x7c21934fU, 0, false, true, "" },
     1685    { "    v_cmpx_f_f32  v50, v107 vop3", 0xd4100000U, 0x0002d732U, true, true, "" },
     1686    { "    v_cmpx_lt_f32  v79, v201", 0x7c23934fU, 0, false, true, "" },
     1687    { "    v_cmpx_lt_f32  v50, v107 vop3", 0xd4110000U, 0x0002d732U, true, true, "" },
     1688    { "    v_cmpx_eq_f32  v79, v201", 0x7c25934fU, 0, false, true, "" },
     1689    { "    v_cmpx_eq_f32  v50, v107 vop3", 0xd4120000U, 0x0002d732U, true, true, "" },
     1690    { "    v_cmpx_le_f32  v79, v201", 0x7c27934fU, 0, false, true, "" },
     1691    { "    v_cmpx_le_f32  v50, v107 vop3", 0xd4130000U, 0x0002d732U, true, true, "" },
     1692    { "    v_cmpx_gt_f32  v79, v201", 0x7c29934fU, 0, false, true, "" },
     1693    { "    v_cmpx_gt_f32  v50, v107 vop3", 0xd4140000U, 0x0002d732U, true, true, "" },
     1694    { "    v_cmpx_lg_f32  v79, v201", 0x7c2b934fU, 0, false, true, "" },
     1695    { "    v_cmpx_lg_f32  v50, v107 vop3", 0xd4150000U, 0x0002d732U, true, true, "" },
     1696    { "    v_cmpx_ge_f32  v79, v201", 0x7c2d934fU, 0, false, true, "" },
     1697    { "    v_cmpx_ge_f32  v50, v107 vop3", 0xd4160000U, 0x0002d732U, true, true, "" },
     1698    { "    v_cmpx_o_f32  v79, v201", 0x7c2f934fU, 0, false, true, "" },
     1699    { "    v_cmpx_o_f32  v50, v107 vop3", 0xd4170000U, 0x0002d732U, true, true, "" },
     1700    { "    v_cmpx_u_f32  v79, v201", 0x7c31934fU, 0, false, true, "" },
     1701    { "    v_cmpx_u_f32  v50, v107 vop3", 0xd4180000U, 0x0002d732U, true, true, "" },
     1702    { "    v_cmpx_nge_f32  v79, v201", 0x7c33934fU, 0, false, true, "" },
     1703    { "    v_cmpx_nge_f32  v50, v107 vop3", 0xd4190000U, 0x0002d732U, true, true, "" },
     1704    { "    v_cmpx_nlg_f32  v79, v201", 0x7c35934fU, 0, false, true, "" },
     1705    { "    v_cmpx_nlg_f32  v50, v107 vop3", 0xd41a0000U, 0x0002d732U, true, true, "" },
     1706    { "    v_cmpx_ngt_f32  v79, v201", 0x7c37934fU, 0, false, true, "" },
     1707    { "    v_cmpx_ngt_f32  v50, v107 vop3", 0xd41b0000U, 0x0002d732U, true, true, "" },
     1708    { "    v_cmpx_nle_f32  v79, v201", 0x7c39934fU, 0, false, true, "" },
     1709    { "    v_cmpx_nle_f32  v50, v107 vop3", 0xd41c0000U, 0x0002d732U, true, true, "" },
     1710    { "    v_cmpx_neq_f32  v79, v201", 0x7c3b934fU, 0, false, true, "" },
     1711    { "    v_cmpx_neq_f32  v50, v107 vop3", 0xd41d0000U, 0x0002d732U, true, true, "" },
     1712    { "    v_cmpx_nlt_f32  v79, v201", 0x7c3d934fU, 0, false, true, "" },
     1713    { "    v_cmpx_nlt_f32  v50, v107 vop3", 0xd41e0000U, 0x0002d732U, true, true, "" },
     1714    { "    v_cmpx_tru_f32  v79, v201", 0x7c3f934fU, 0, false, true, "" },
     1715    { "    v_cmpx_tru_f32  v50, v107 vop3", 0xd41f0000U, 0x0002d732U, true, true, "" },
     1716    { "    v_cmpx_t_f32  v79, v201", 0x7c3f934fU, 0, false, true, "" },
     1717    { "    v_cmpx_t_f32  v50, v107 vop3", 0xd41f0000U, 0x0002d732U, true, true, "" },
    16831718    { nullptr, 0, 0, false, false, 0 }
    16841719};
Note: See TracChangeset for help on using the changeset viewer.