Changeset 3761 in CLRX


Ignore:
Timestamp:
Feb 9, 2018, 8:18:46 AM (20 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Asm: Preliminaries to section differences in expressions.

Location:
CLRadeonExtender/trunk
Files:
5 edited

Legend:

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

    r3630 r3761  
    667667    uint64_t alignment; ///< section alignment
    668668    uint64_t size;  ///< section size
     669    cxuint relSpace;    ///< relative space where is section
     670    uint64_t relAddress; ///< relative address
    669671    std::vector<cxbyte> content;    ///< content of section
    670672   
     
    675677    AsmSection();
    676678    /// constructor
    677     AsmSection(const char* _name, cxuint _kernelId, AsmSectionType _type,
    678             Flags _flags, uint64_t _alignment, uint64_t _size = 0)
     679    AsmSection(const char* _name, cxuint _kernelId, AsmSectionType _type, Flags _flags,
     680               uint64_t _alignment, uint64_t _size = 0, cxuint _relSpace = UINT_MAX,
     681               uint64_t _relAddress = UINT64_MAX)
    679682            : name(_name), kernelId(_kernelId), type(_type), flags(_flags),
    680               alignment(_alignment), size(_size)
     683              alignment(_alignment), size(_size), relSpace(_relSpace),
     684              relAddress(_relAddress)
    681685    { }
    682686   
  • CLRadeonExtender/trunk/CLRX/amdasm/AsmFormats.h

    r3668 r3761  
    129129protected:
    130130    Assembler& assembler;   ///< assembler reference
     131    bool sectionDiffsResolvable;
    131132   
    132133    /// constructor
     
    138139public:
    139140    virtual ~AsmFormatHandler();
     141   
     142    /// return true if format handler can resolve differences between sections
     143    bool isSectionDiffsResolvable() const
     144    { return sectionDiffsResolvable; }
    140145   
    141146    /// add/set kernel
     
    184189    /// write binary to array
    185190    virtual void writeBinary(Array<cxbyte>& array) const = 0;
     191   
     192    /// prepare before section diference resolving
     193    virtual void prepareSectionDiffsResolving();
    186194};
    187195
  • CLRadeonExtender/trunk/CLRX/amdbin/ElfBinaries.h

    r3738 r3761  
    886886    uint64_t countSize();
    887887   
     888    // return offset for specified region
     889    typename Types::Word getRegionOffset(cxuint i) const
     890    { return regionOffsets[i]; }
     891   
    888892    /// generate binary
    889893    void generate(FastOutputBuffer& fob);
  • CLRadeonExtender/trunk/amdasm/AsmFormats.cpp

    r3575 r3761  
    5757}
    5858
    59 AsmFormatHandler::AsmFormatHandler(Assembler& _assembler) : assembler(_assembler)
     59AsmFormatHandler::AsmFormatHandler(Assembler& _assembler) : assembler(_assembler),
     60        sectionDiffsResolvable(false)
    6061{ }
    6162
     
    166167}
    167168
     169void AsmFormatHandler::prepareSectionDiffsResolving()
     170{ }
     171
    168172/* raw code handler */
    169173
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r3760 r3761  
    20042004{ builtinTable[elfSectId - ELFSECTID_START] = sectionsNum++; }
    20052005
     2006// TODO: add GLOBAL OFFSET TABLE dynamic and (static?) relocations
     2007
    20062008void ROCmBinGenerator::generateInternal(std::ostream* osPtr, std::vector<char>* vPtr,
    20072009             Array<cxbyte>* aPtr) const
Note: See TracChangeset for help on using the changeset viewer.