Changeset 3452 in CLRX


Ignore:
Timestamp:
Sep 30, 2017, 7:41:28 AM (17 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Asm: Add '.get_version' pseudo-op. CLRXDocs: Fixes in '.get_*' pseudo-op's descriptions.

Location:
CLRadeonExtender/trunk
Files:
7 edited

Legend:

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

    r3424 r3452  
    136136    BIT64,
    137137    FORMAT,
    138     GPU
     138    GPU,
     139    VERSION
    139140};
    140141
  • CLRadeonExtender/trunk/amdasm/AsmPseudoOps.cpp

    r3424 r3452  
    111111    "fail", "file", "fill", "fillq",
    112112    "float", "format", "gallium", "get_64bit", "get_arch",
    113     "get_format", "get_gpu", "global",
     113    "get_format", "get_gpu", "get_version", "global",
    114114    "globl", "gpu", "half", "hword", "if", "if32", "if64",
    115115    "ifarch", "ifb", "ifc", "ifdef", "ifeq",
     
    154154    ASMOP_FAIL, ASMOP_FILE, ASMOP_FILL, ASMOP_FILLQ,
    155155    ASMOP_FLOAT, ASMOP_FORMAT, ASMOP_GALLIUM, ASMOP_GET_64BIT, ASMOP_GET_ARCH,
    156     ASMOP_GET_FORMAT, ASMOP_GET_GPU, ASMOP_GLOBAL,
     156    ASMOP_GET_FORMAT, ASMOP_GET_GPU, ASMOP_GET_VERSION, ASMOP_GLOBAL,
    157157    ASMOP_GLOBL, ASMOP_GPU, ASMOP_HALF, ASMOP_HWORD, ASMOP_IF, ASMOP_IF32, ASMOP_IF64,
    158158    ASMOP_IFARCH, ASMOP_IFB, ASMOP_IFC, ASMOP_IFDEF, ASMOP_IFEQ,
     
    21822182            predefValue = cxuint(asmr.format);
    21832183            break;
     2184        case AsmPredefined::VERSION:
     2185            predefValue = CLRX_MAJOR_VERSION*10000U + CLRX_MINOR_VERSION*100U +
     2186                    CLRX_MICRO_VERSION;
     2187            break;
    21842188        default:
    21852189            break;
     
    24762480        case ASMOP_GET_GPU:
    24772481            AsmPseudoOps::getPredefinedValue(*this, linePtr, AsmPredefined::GPU);
     2482            break;
     2483        case ASMOP_GET_VERSION:
     2484            AsmPseudoOps::getPredefinedValue(*this, linePtr, AsmPredefined::VERSION);
    24782485            break;
    24792486        case ASMOP_GLOBAL:
  • CLRadeonExtender/trunk/doc/ClrxAsmAmd.md

    r3386 r3452  
    235235Syntax: .get_driver_version SYMBOL
    236236
    237 Store current driver version to SYMBOL.
     237Store current driver version to SYMBOL. Version in form `version*100 + revision`.
    238238
    239239### .globalbuffers
  • CLRadeonExtender/trunk/doc/ClrxAsmAmdCl2.md

    r3390 r3452  
    275275Syntax: .get_driver_version SYMBOL
    276276
    277 Store current driver version to SYMBOL.
     277Store current driver version to SYMBOL. Version in form `version*100 + revision`.
    278278
    279279### .globaldata
  • CLRadeonExtender/trunk/doc/ClrxAsmGallium.md

    r3390 r3452  
    237237Syntax: .get_driver_version SYMBOL
    238238
    239 Store current driver version to SYMBOL.
     239Store current driver version to SYMBOL. Version in form:
     240`major_version*10000 + minor_version*100 + micro_version`.
    240241
    241242### .get_llvm_version
     
    243244Syntax: .get_llvm_version SYMBOL
    244245
    245 Store current LLVM compiler version to SYMBOL.
     246Store current LLVM compiler version to SYMBOL. Version in form:
     247`major_version*10000 + minor_version*100 + micro_version`.
    246248
    247249### .globaldata
  • CLRadeonExtender/trunk/doc/ClrxAsmPseudoOps.md

    r3401 r3452  
    318318Choose GalliumCompute OpenCL program binary format.
    319319
    320 ### .get_64bit SYMBOL
     320### .get_64bit
     321
     322Syntax: .get_64bit SYMBOL
    321323
    322324Store 64-bitness in specified symbol. Store 1 to symbol if 64-bit mode enabled.
    323325
    324 ### .get_arch SYMBOL
     326### .get_arch
     327
     328Syntax: .get_arch SYMBOL
    325329
    326330Store GPU architecture identifier to symbol. List of architecture ids:
     
    333337 3 | VEGA (AMD RX VEGA)
    334338
    335 ### .get_format SYMBOL
     339### .get_format
     340
     341Syntax: .get_format SYMBOL
    336342
    337343Store binary format identifier to symbol. List of format ids:
     
    345351 4 | ROCm binary format
    346352
    347 ### .get_gpu SYMBOL
     353### .get_gpu
     354
     355Syntax: .get_gpu SYMBOL
    348356
    349357Store GPU device identifier to symbol. List of GPU device ids:
     
    375383 22 | Gfx900 (Radeon RX VEGA)
    376384
     385### .get_version
     386
     387Syntax: .get_version SYMBOL
     388
     389Store CLRadeonExtender version to symbol. Version stored as integer in form:
     390`major_version*10000 + minor_version*100 + micro_version`.
     391
    377392### .global, .globl
    378393
  • CLRadeonExtender/trunk/tests/amdasm/AsmBasicsCases2.cpp

    r3355 r3452  
    19461946        }, true, "", ""
    19471947    },
     1948    /* 69 - get_version */
     1949    {   R"ffDXD(.amdcl2
     1950            .get_version CLRX_VERSION
     1951)ffDXD",
     1952        BinaryFormat::AMDCL2, GPUDeviceType::CAPE_VERDE, false, { },
     1953        {
     1954            { ".rodata", ASMKERN_GLOBAL, AsmSectionType::DATA, { } }
     1955        },
     1956        {
     1957            { ".", 0U, 0, 0U, true, false, false, 0, 0 },
     1958            { "CLRX_VERSION", CLRX_MAJOR_VERSION*10000U + CLRX_MINOR_VERSION*100U +
     1959                    CLRX_MICRO_VERSION, ASMSECT_ABS, 0U, true, false, false, 0, 0 },
     1960        }, true, "", ""
     1961    },
    19481962    { nullptr }
    19491963};
Note: See TracChangeset for help on using the changeset viewer.