Changeset 4869 in CLRX


Ignore:
Timestamp:
Jul 28, 2019, 7:14:23 PM (4 months ago)
Author:
matszpk
Message:

CLRadeonExtender: GCNAsm: Next FLAT testcases for GFX10. Fix resolving FLAT field value (GFX10).

Location:
CLRadeonExtender/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdasm/GCNDefs.h

    r4857 r4869  
    4848    GCNTGT_INSTOFFSET,
    4949    GCNTGT_INSTOFFSET_S,
    50     GCNTGT_VOP3LITIMM
     50    GCNTGT_VOP3LITIMM,
     51    GCNTGT_INSTOFFSET_GFX10
    5152};
    5253
  • CLRadeonExtender/trunk/amdasm/GCNAsmEncode2.cpp

    r4868 r4869  
    12561256   
    12571257    if (instOffsetExpr!=nullptr)
    1258         instOffsetExpr->setTarget(AsmExprTarget(flatMode!=0 ?
    1259                     GCNTGT_INSTOFFSET_S : GCNTGT_INSTOFFSET, asmr.currentSection,
    1260                     output.size()));
     1258        instOffsetExpr->setTarget(AsmExprTarget(isGCN15 ? GCNTGT_INSTOFFSET_GFX10 :
     1259                    (flatMode!=0 ? GCNTGT_INSTOFFSET_S : GCNTGT_INSTOFFSET),
     1260                    asmr.currentSection, output.size()));
    12611261   
    12621262    // put data (instruction words)
  • CLRadeonExtender/trunk/amdasm/GCNAssembler.cpp

    r4839 r4869  
    445445            sectionData[offset+1] = (sectionData[offset+1]&0xf0) | ((value&0xf00)>>8);
    446446            printWarningForRange(12, value, sourcePos, WS_UNSIGNED);
     447            return true;
     448        case GCNTGT_INSTOFFSET_GFX10:
     449            // FLAT unsigned inst_offset
     450            if (sectionId != ASMSECT_ABS)
     451                GCN_FAIL_BY_ERROR(sourcePos,
     452                        "Relative value is illegal in offset expressions")
     453            sectionData[offset] = value;
     454            sectionData[offset+1] = (sectionData[offset+1]&0xf0) | ((value&0x700)>>8);
     455            printWarningForRange(11, value, sourcePos, WS_UNSIGNED);
    447456            return true;
    448457        case GCNTGT_INSTOFFSET_S:
  • CLRadeonExtender/trunk/tests/amdasm/GCNAsmOpc15.cpp

    r4868 r4869  
    32373237    { "flat_load_ubyte v47, v[187:188] glc", 0xdc210000U, 0x2f7d00bbU, true, true, "" },
    32383238    { "flat_load_ubyte v47, v[187:188] glc   ", 0xdc210000U, 0x2f7d00bbU, true, true, "" },
     3239    { "flat_load_ubyte v47, v[187:188] dlc glc", 0xdc211000U, 0x2f7d00bbU, true, true, "" },
    32393240    { "flat_load_ubyte v47, v[187:188]", 0xdc200000U, 0x2f7d00bbU, true, true, "" },
    32403241    { "flat_load_ubyte v47, v[187:188]   ", 0xdc200000U, 0x2f7d00bbU, true, true, "" },
     
    32423243        0xdc230000U, 0x2f7d00bbU, true, true, "" },
    32433244    { "flat_load_ubyte v47, v[187:188] slc\n", 0xdc220000U, 0x2f7d00bbU, true, true, "" },
     3245    { "flat_load_ubyte v47, v[187:188] inst_offset:2003 dlc\n",
     3246        0xdc2017d3U, 0x2f7d00bbU, true, true, "" },
     3247    { "flat_load_ubyte v47, v[187:188] offset:2003 dlc\n",
     3248        0xdc2017d3U, 0x2f7d00bbU, true, true, "" },
     3249    { "flat_load_ubyte v47, v[187:188] offset:0x13d4d dlc\n", 0xdc20154dU, 0x2f7d00bbU,
     3250        true, true, "test.s:1:40: Warning: Value 0x13d4d truncated to 0x54d\n" },
     3251    { "xv=2004; flat_load_ubyte v47, v[187:188] offset:xv dlc\n",
     3252        0xdc2017d4U, 0x2f7d00bbU, true, true, "" },
     3253    { "flat_load_ubyte v47, v[187:188] offset:xy dlc; xy=2005\n",
     3254        0xdc2017d5U, 0x2f7d00bbU, true, true, "" },
     3255    { "yb=0x13aa; flat_load_ubyte v47, v[187:188] offset:yb dlc\n",
     3256        0xdc2013aaU, 0x2f7d00bbU, true, true,
     3257        "test.s:1:51: Warning: Value 0x13aa truncated to 0x3aa\n" },
     3258    { "yb=0x1baa; flat_load_ubyte v47, v[187:188] offset:yb dlc\n",
     3259        0xdc2013aaU, 0x2f7d00bbU, true, true,
     3260        "test.s:1:51: Warning: Value 0x1baa truncated to 0x3aa\n" },
     3261    { "flat_load_ubyte v47, v[187:188] offset:yb dlc; yb=0x19ee\n",
     3262        0xdc2011eeU, 0x2f7d00bbU, true, true,
     3263        "test.s:1:40: Warning: Value 0x19ee truncated to 0x1ee\n" },
    32443264    /* FLAT errors */
    32453265    { "flat_load_ubyte v47, v[187:188] glc slcx", 0, 0, false, false,
Note: See TracChangeset for help on using the changeset viewer.