Changeset 3735 in CLRX


Ignore:
Timestamp:
Feb 7, 2018, 1:56:40 PM (15 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Check values in work group sizes (must not be zero).

File:
1 edited

Legend:

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

    r3734 r3735  
    870870    bool good = getAbsoluteValueArg(asmr, out[0], linePtr, true);
    871871    if (good)
     872    {
    872873        asmr.printWarningForRange(32, out[0], asmr.getSourcePos(valuePlace), WS_UNSIGNED);
     874        if (out[0] == 0)
     875            ASM_NOTGOOD_BY_ERROR(valuePlace, "Group size comment must be not zero");
     876    }
    873877    bool haveComma;
    874878    if (!skipComma(asmr, haveComma, linePtr))
     
    880884        valuePlace = linePtr;
    881885        if (getAbsoluteValueArg(asmr, out[1], linePtr, false))
     886        {
    882887            asmr.printWarningForRange(32, out[1], asmr.getSourcePos(valuePlace),
    883888                              WS_UNSIGNED);
     889            if (out[1] == 0)
     890                ASM_NOTGOOD_BY_ERROR(valuePlace, "Group size comment must be not zero");
     891        }
    884892        else
    885893            good = false;
     
    891899            valuePlace = linePtr;
    892900            if (getAbsoluteValueArg(asmr, out[2], linePtr, false))
     901            {
    893902                asmr.printWarningForRange(32, out[2], asmr.getSourcePos(valuePlace),
    894903                            WS_UNSIGNED);
     904                if (out[2] == 0)
     905                    ASM_NOTGOOD_BY_ERROR(valuePlace, "Group size comment must be not zero");
     906            }
    895907            else
    896908                good = false;
    897         }   
     909        }
    898910    }
    899911   
     
    911923        PSEUDOOP_RETURN_BY_ERROR("Illegal place of configuration pseudo-op")
    912924   
    913     uint64_t out[3] = { 0, 0, 0 };
     925    uint64_t out[3] = { 1, 1, 1 };
    914926    if (!parseCWS(asmr, pseudoOpPlace, linePtr, out))
    915927        return;
Note: See TracChangeset for help on using the changeset viewer.