Changeset 4963 in CLRX


Ignore:
Timestamp:
Sep 15, 2019, 8:46:38 AM (5 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmROCm: Next stuff.

Location:
CLRadeonExtender/trunk
Files:
5 edited

Legend:

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

    r4517 r4963  
    572572        AsmSectionId configSection;
    573573        std::unique_ptr<AsmROCmKernelConfig> config;
     574        std::unique_ptr<ROCmKernelDescriptor> desc;
    574575        bool isFKernel;
    575576        AsmSectionId ctrlDirSection;
     
    577578       
    578579        explicit Kernel(AsmSectionId _configSection = ASMSECT_NONE): KernelBase{},
    579                 configSection(_configSection), config(nullptr), isFKernel(false),
    580                 ctrlDirSection(ASMSECT_NONE), savedSection(ASMSECT_NONE)
     580                configSection(_configSection), config(nullptr), desc(nullptr),
     581                isFKernel(false), ctrlDirSection(ASMSECT_NONE), savedSection(ASMSECT_NONE)
    581582        { }
    582583       
  • CLRadeonExtender/trunk/CLRX/amdasm/Assembler.h

    r4875 r4963  
    554554    bool _64bit;    ///
    555555    bool newROCmBinFormat;
     556    bool llvm10BinFormat;
     557    bool rocmMetadataV3;
    556558    bool good;
    557559    bool resolvingRelocs;
     
    866868    void setNewROCmBinFormat(bool newFmt)
    867869    { newROCmBinFormat = newFmt; }
     870    /// is new ROCm LLVM10 binary format
     871    bool isLLVM10BinFormat() const
     872    { return llvm10BinFormat; }
     873    /// set new ROCm LLVM10 binary format
     874    void setLLVM10BinFormat(bool newFmt)
     875    { llvm10BinFormat = newFmt; }
     876    /// is new ROCm metadata V3 format
     877    bool isROCmMetadataV3() const
     878    { return rocmMetadataV3; }
     879    /// is new ROCm metadata V3 format
     880    void setROCmMetadataV3(bool newFmt)
     881    { rocmMetadataV3 = newFmt; }
    868882    /// get policy version
    869883    cxuint getPolicyVersion() const
  • CLRadeonExtender/trunk/amdasm/AsmROCmFormat.cpp

    r4962 r4963  
    127127    sectionDiffsResolvable = true;
    128128    output.newBinFormat = assembler.isNewROCmBinFormat();
     129    output.llvm10BinFormat = assembler.isLLVM10BinFormat();
     130    output.metadataV3Format = assembler.isROCmMetadataV3();
    129131    output.metadataInfo.initialize();
    130132    output.archMinor = output.archStepping = UINT32_MAX;
     
    455457        return;
    456458    handler.output.newBinFormat = true;
     459}
     460
     461void AsmROCmPseudoOps::setLLVM10BinFormat(AsmROCmHandler& handler, const char* linePtr)
     462{
     463    Assembler& asmr = handler.assembler;
     464    if (!checkGarbagesAtEnd(asmr, linePtr))
     465        return;
     466    handler.output.llvm10BinFormat = true;
     467}
     468
     469void AsmROCmPseudoOps::setMetadataV3Format(AsmROCmHandler& handler, const char* linePtr)
     470{
     471    Assembler& asmr = handler.assembler;
     472    if (!checkGarbagesAtEnd(asmr, linePtr))
     473        return;
     474    handler.output.metadataV3Format = true;
    457475}
    458476
     
    19631981            break;
    19641982        case ROCMOP_LLVMBINFMT:
     1983            AsmROCmPseudoOps::setLLVM10BinFormat(*this, linePtr);
    19651984            break;
    19661985        case ROCMOP_LOCALSIZE:
     
    19832002            break;
    19842003        case ROCMOP_METADATAV3:
     2004            AsmROCmPseudoOps::setMetadataV3Format(*this, linePtr);
    19852005            break;
    19862006        case ROCMOP_MD_GROUP_SEGMENT_FIXED_SIZE:
  • CLRadeonExtender/trunk/amdasm/AsmROCmInternals.h

    r4414 r4963  
    159159    static void setNewBinFormat(AsmROCmHandler& handler, const char* linePtr);
    160160   
     161    static void setLLVM10BinFormat(AsmROCmHandler& handler, const char* linePtr);
     162    static void setMetadataV3Format(AsmROCmHandler& handler, const char* linePtr);
     163   
    161164    // checkConfigValue, setConfigValueMain routines used by other handlers
    162165    // to check and set AMD HSA config value
  • CLRadeonExtender/trunk/amdasm/Assembler.cpp

    r4875 r4963  
    761761          driverVersion(0), llvmVersion(0),
    762762          _64bit(false), newROCmBinFormat(false),
     763          llvm10BinFormat(false), rocmMetadataV3(false),
    763764          policyVersion(ASM_POLICY_DEFAULT),
    764765          isaAssembler(nullptr),
     
    802803          driverVersion(0), llvmVersion(0),
    803804          _64bit(false), newROCmBinFormat(false),
     805          llvm10BinFormat(false), rocmMetadataV3(false),
    804806          policyVersion(ASM_POLICY_DEFAULT),
    805807          isaAssembler(nullptr),
Note: See TracChangeset for help on using the changeset viewer.