Changeset 2498 in CLRX


Ignore:
Timestamp:
Oct 29, 2016, 7:55:47 PM (4 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Refactor AMDBIN* flags for AmdCL2Binaries module.

Location:
CLRadeonExtender/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdbin/AmdCL2Binaries.h

    r2386 r2498  
    4040
    4141enum : Flags {
    42     AMDBIN_CREATE_KERNELDATA = 0x10,    ///< create kernel setup
    43     AMDBIN_CREATE_KERNELDATAMAP = 0x20,    ///< create kernel setups map
    44     AMDBIN_CREATE_KERNELSTUBS = 0x40,    ///< create kernel stub
    45    
    46     AMDBIN_INNER_CREATE_KERNELDATA = 0x10000,    ///< create kernel setup
    47     AMDBIN_INNER_CREATE_KERNELDATAMAP = 0x20000,    ///< create kernel setups map
    48     AMDBIN_INNER_CREATE_KERNELSTUBS = 0x40000    ///< create kernel stub
     42    AMDCL2BIN_CREATE_KERNELDATA = 0x10,    ///< create kernel setup
     43    AMDCL2BIN_CREATE_KERNELDATAMAP = 0x20,    ///< create kernel setups map
     44    AMDCL2BIN_CREATE_KERNELSTUBS = 0x40,    ///< create kernel stub
     45   
     46    AMDCL2BIN_INNER_CREATE_KERNELDATA = 0x10000,    ///< create kernel setup
     47    AMDCL2BIN_INNER_CREATE_KERNELDATAMAP = 0x20000,    ///< create kernel setups map
     48    AMDCL2BIN_INNER_CREATE_KERNELSTUBS = 0x40000    ///< create kernel stub
    4949};
    5050
     
    131131    /// return if binary has kernel datas
    132132    bool hasKernelData() const
    133     { return creationFlags & AMDBIN_CREATE_KERNELDATA; }
     133    { return creationFlags & AMDCL2BIN_CREATE_KERNELDATA; }
    134134    /// return if binary has kernel datas map
    135135    bool hasKernelDataMap() const
    136     { return creationFlags & AMDBIN_CREATE_KERNELDATAMAP; }
     136    { return creationFlags & AMDCL2BIN_CREATE_KERNELDATAMAP; }
    137137    /// return if binary has kernel stubs
    138138    bool hasKernelStubs() const
    139     { return creationFlags & AMDBIN_CREATE_KERNELSTUBS; }
     139    { return creationFlags & AMDCL2BIN_CREATE_KERNELSTUBS; }
    140140   
    141141    /// get kernel stub for specified index
     
    184184    /// return if binary has kernel datas
    185185    bool hasKernelData() const
    186     { return creationFlags & AMDBIN_CREATE_KERNELDATA; }
     186    { return creationFlags & AMDCL2BIN_CREATE_KERNELDATA; }
    187187    /// return if binary has kernel datas map
    188188    bool hasKernelDataMap() const
    189     { return creationFlags & AMDBIN_CREATE_KERNELDATAMAP; }
     189    { return creationFlags & AMDCL2BIN_CREATE_KERNELDATAMAP; }
    190190   
    191191    /// get global data size
  • CLRadeonExtender/trunk/amdbin/AmdCL2Binaries.cpp

    r2260 r2498  
    5353        : creationFlags(_creationFlags), binarySize(binaryCodeSize), binary(binaryCode)
    5454{
    55     if ((creationFlags & (AMDBIN_CREATE_KERNELDATA|AMDBIN_CREATE_KERNELSTUBS)) == 0)
     55    if ((creationFlags & (AMDCL2BIN_CREATE_KERNELDATA|AMDCL2BIN_CREATE_KERNELSTUBS)) == 0)
    5656        return; // nothing to initialize
    5757    uint16_t textIndex = SHN_UNDEF;
  • CLRadeonExtender/trunk/programs/clrxdisasm.cpp

    r2474 r2498  
    130130                else if (isAmdCL2Binary(binaryData.size(), binaryData.data()))
    131131                {   // AMD OpenCL 2.0 binary
    132                     binFlags |= AMDBIN_INNER_CREATE_KERNELDATA |
    133                                 AMDBIN_INNER_CREATE_KERNELDATAMAP |
    134                                 AMDBIN_INNER_CREATE_KERNELSTUBS;
     132                    binFlags |= AMDCL2BIN_INNER_CREATE_KERNELDATA |
     133                                AMDCL2BIN_INNER_CREATE_KERNELDATAMAP |
     134                                AMDCL2BIN_INNER_CREATE_KERNELSTUBS;
    135135                    AmdCL2MainGPUBinary amdBin(binaryData.size(),
    136136                                       binaryData.data(), binFlags);
  • CLRadeonExtender/trunk/tests/amdasm/DisasmDataTest.cpp

    r2492 r2498  
    12881288                AMDBIN_CREATE_INNERBINMAP | AMDBIN_CREATE_KERNELHEADERS |
    12891289                AMDBIN_CREATE_KERNELHEADERMAP | AMDBIN_INNER_CREATE_CALNOTES |
    1290                 AMDBIN_CREATE_INFOSTRINGS | AMDBIN_INNER_CREATE_KERNELDATA |
    1291                 AMDBIN_INNER_CREATE_KERNELDATAMAP | AMDBIN_INNER_CREATE_KERNELSTUBS);
     1290                AMDBIN_CREATE_INFOSTRINGS | AMDCL2BIN_INNER_CREATE_KERNELDATA |
     1291                AMDCL2BIN_INNER_CREATE_KERNELDATAMAP | AMDCL2BIN_INNER_CREATE_KERNELSTUBS);
    12921292            Disassembler disasm(amdBin, disasmOss, disasmFlags);
    12931293            disasm.disassemble();
  • CLRadeonExtender/trunk/tests/amdbin/AmdCL2BinGen.cpp

    r2492 r2498  
    684684                AMDBIN_CREATE_INNERBINMAP | AMDBIN_CREATE_KERNELHEADERS |
    685685                AMDBIN_CREATE_KERNELHEADERMAP | AMDBIN_CREATE_INFOSTRINGS |
    686                 AMDBIN_INNER_CREATE_KERNELDATA | AMDBIN_INNER_CREATE_KERNELDATAMAP |
    687                 AMDBIN_INNER_CREATE_KERNELSTUBS);
     686                AMDCL2BIN_INNER_CREATE_KERNELDATA | AMDCL2BIN_INNER_CREATE_KERNELDATAMAP |
     687                AMDCL2BIN_INNER_CREATE_KERNELSTUBS);
    688688   
    689689    amdCL2Input = genAmdCL2Input(reconf, amdCL2GpuBin, false, false);
Note: See TracChangeset for help on using the changeset viewer.