Changeset 2594 in CLRX


Ignore:
Timestamp:
Nov 28, 2016, 11:21:02 AM (3 years ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmROCm: update.

Location:
CLRadeonExtender/trunk/amdasm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmInternals.h

    r2593 r2594  
    596596                      const char* linePtr);
    597597   
     598    static void setUseGridWorkGroupCount(AsmROCmHandler& handler,
     599                      const char* pseudoOpPlace, const char* linePtr);
     600   
    598601    static void doKCode(AsmROCmHandler& handler, const char* pseudoOpPlace,
    599602                      const char* linePtr);
  • CLRadeonExtender/trunk/amdasm/AsmROCmFormat.cpp

    r2593 r2594  
    643643}
    644644
     645void AsmROCmPseudoOps::setUseGridWorkGroupCount(AsmROCmHandler& handler,
     646                   const char* pseudoOpPlace, const char* linePtr)
     647{
     648    Assembler& asmr = handler.assembler;
     649    if (asmr.currentKernel==ASMKERN_GLOBAL ||
     650        asmr.sections[asmr.currentSection].type != AsmSectionType::CONFIG)
     651    {
     652        asmr.printError(pseudoOpPlace, "Illegal place of configuration pseudo-op");
     653        return;
     654    }
     655    cxuint dimMask = 0;
     656    if (!parseDimensions(asmr, linePtr, dimMask))
     657        return;
     658    if (!checkGarbagesAtEnd(asmr, linePtr))
     659        return;
     660    handler.kernelStates[asmr.currentKernel]->initializeKernelConfig();
     661    uint16_t& flags = handler.kernelStates[asmr.currentKernel]->config->
     662                enableSpgrRegisterFlags;
     663    flags = (flags & ~(7<<7)) | dimMask<<7;
     664}
     665
    645666void AsmROCmPseudoOps::updateKCodeSel(AsmROCmHandler& handler,
    646667                  const std::vector<cxuint>& oldset)
     
    769790            break;
    770791        case ROCMOP_CONFIG:
     792            AsmROCmPseudoOps::doConfig(*this, stmtPlace, linePtr);
    771793            break;
    772794        case ROCMOP_CONTROL_DIRECTIVE:
     
    785807            break;
    786808        case ROCMOP_DIMS:
     809            AsmROCmPseudoOps::setDimensions(*this, stmtPlace, linePtr);
    787810            break;
    788811        case ROCMOP_DX10CLAMP:
     
    811834            break;
    812835        case ROCMOP_KCODE:
     836            AsmROCmPseudoOps::doKCode(*this, stmtPlace, linePtr);
    813837            break;
    814838        case ROCMOP_KCODEEND:
     839            AsmROCmPseudoOps::doKCodeEnd(*this, stmtPlace, linePtr);
    815840            break;
    816841        case ROCMOP_KERNARG_SEGMENT_ALIGN:
     
    914939            break;
    915940        case ROCMOP_USE_GRID_WORKGROUP_COUNT:
     941            AsmROCmPseudoOps::setUseGridWorkGroupCount(*this, stmtPlace, linePtr);
    916942            break;
    917943        case ROCMOP_USE_KERNARG_SEGMENT_PTR:
Note: See TracChangeset for help on using the changeset viewer.