Changeset 2494 in CLRX


Ignore:
Timestamp:
Oct 27, 2016, 7:11:43 PM (4 years ago)
Author:
matszpk
Message:

CLRadeonExtender: small fixes for handling arch minor and arch stepping.

Location:
CLRadeonExtender/trunk/amdasm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmAmdCL2Format.cpp

    r2492 r2494  
    358358    skipSpacesToEnd(linePtr, end);
    359359    uint64_t value;
     360    const char* valuePlace = linePtr;
    360361    if (!getAbsoluteValueArg(asmr, value, linePtr, true))
    361362        return;
     363    asmr.printWarningForRange(sizeof(cxuint)<<3, value,
     364                 asmr.getSourcePos(valuePlace), WS_UNSIGNED);
    362365    if (!checkGarbagesAtEnd(asmr, linePtr))
    363366        return;
     
    371374    skipSpacesToEnd(linePtr, end);
    372375    uint64_t value;
     376    const char* valuePlace = linePtr;
    373377    if (!getAbsoluteValueArg(asmr, value, linePtr, true))
    374378        return;
     379    asmr.printWarningForRange(sizeof(cxuint)<<3, value,
     380                 asmr.getSourcePos(valuePlace), WS_UNSIGNED);
    375381    if (!checkGarbagesAtEnd(asmr, linePtr))
    376382        return;
  • CLRadeonExtender/trunk/amdasm/DisasmAmdCL2.cpp

    r2492 r2494  
    191191                size_t namesz = ULEV(nhdr->n_namesz);
    192192                size_t descsz = ULEV(nhdr->n_descsz);
    193                 if (ULEV(nhdr->n_type) == 0x3 && namesz==4 && descsz==0x1a &&
     193                if (usumGt(offset, namesz+descsz, notesSize))
     194                    throw Exception("Note offset+size out of range");
     195                if (ULEV(nhdr->n_type) == 0x3 && namesz==4 && descsz>=0x1a &&
    194196                    ::strcmp((const char*)noteContent+offset+sizeof(Elf64_Nhdr), "AMD")==0)
    195197                {    // AMDGPU type
Note: See TracChangeset for help on using the changeset viewer.