Changeset 3766 in CLRX


Ignore:
Timestamp:
Feb 10, 2018, 9:39:44 AM (15 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Asm: Add relSpace to AsmFormatHandler::SectionInfo?. Set relSpace while adding new section.

Location:
CLRadeonExtender/trunk
Files:
3 edited

Legend:

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

    r3761 r3766  
    2929#include <vector>
    3030#include <utility>
     31#include <memory>
    3132#include <unordered_set>
    3233#include <unordered_map>
     
    126127        AsmSectionType type;    ///< section type
    127128        Flags flags;        ///< section flags
     129        cxuint relSpace;    ///< relative space
     130       
     131        SectionInfo() : name(nullptr), type(AsmSectionType::DATA), flags(0),
     132                    relSpace(UINT_MAX)
     133        { }
     134        SectionInfo(const char* _name, AsmSectionType _type, Flags _flags = 0,
     135                cxuint _relSpace = UINT_MAX) : name(_name), type(_type), flags(_flags),
     136                    relSpace(_relSpace)
     137        { }
    128138    };
    129139protected:
     
    490500    friend struct AsmROCmPseudoOps;
    491501    ROCmInput output;
     502    std::unique_ptr<ROCmBinGenerator> binGen;
    492503    struct Section
    493504    {
  • CLRadeonExtender/trunk/amdasm/AsmROCmFormat.cpp

    r3760 r3766  
    278278    else if (info.type != AsmSectionType::CONFIG)
    279279        info.flags = ASMSECT_ADDRESSABLE | ASMSECT_WRITEABLE | ASMSECT_ABS_ADDRESSABLE;
     280   
     281    if (info.type == AsmSectionType::CODE || info.type == AsmSectionType::DATA)
     282        info.relSpace = 0;  // first rel space
    280283   
    281284    info.name = sections[sectionId].name;
  • CLRadeonExtender/trunk/amdasm/Assembler.cpp

    r3765 r3766  
    24112411        }
    24122412        auto info = formatHandler->getSectionInfo(sectionId);
    2413         sections.push_back({ info.name, currentKernel, info.type, info.flags, align });
     2413        sections.push_back({ info.name, currentKernel, info.type, info.flags, align,
     2414                    0, info.relSpace });
    24142415        currentOutPos = 0;
    24152416    }
Note: See TracChangeset for help on using the changeset viewer.