Changeset 1668 in CLRX


Ignore:
Timestamp:
Nov 6, 2015, 9:04:04 AM (5 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Accepts '@' before register symbol to force using that symbol instead of regname.

File:
1 edited

Legend:

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

    r1662 r1668  
    8080        {   // check whether is name of symbol with register
    8181            AsmSymbolEntry* symEntry = nullptr;
     82            if (*linePtr=='@')
     83                skipCharAndSpacesToEnd(linePtr, end);
    8284            if (asmr.parseSymbol(linePtr, symEntry, false, true)==
    8385                Assembler::ParseState::PARSED && symEntry!=nullptr &&
     
    209211        const char* oldLinePtr = linePtr;
    210212        char regName[20];
    211         if (!getNameArg(asmr, 20, regName, linePtr, "register name", required, true))
    212             return false;
     213        if (linePtr==end || *linePtr != '@')
     214        {   // if not '@'
     215            if (!getNameArg(asmr, 20, regName, linePtr, "register name", required, true))
     216                return false;
     217        }
     218        else // otherwise reset regName
     219            regName[0] = 0;
    213220        toLowerString(regName);
    214221       
     
    304311            AsmSymbolEntry* symEntry = nullptr;
    305312            linePtr = oldLinePtr;
     313            skipSpacesToEnd(linePtr, end);
     314            if (linePtr!=end && *linePtr=='@')
     315                skipCharAndSpacesToEnd(linePtr, end);
    306316            if (asmr.parseSymbol(linePtr, symEntry, false, true)==
    307317                Assembler::ParseState::PARSED && symEntry!=nullptr &&
Note: See TracChangeset for help on using the changeset viewer.