Changeset 4967 in CLRX


Ignore:
Timestamp:
Sep 18, 2019, 8:24:51 AM (4 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: Asm: Replace wave32 by codeFlags.

Location:
CLRadeonExtender/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdasm/Assembler.h

    r4963 r4967  
    6868    ASM_ALL = FLAGS_ALL&~(ASM_TESTRUN|ASM_TESTRESOLVE|ASM_BUGGYFPLIT|ASM_MACRONOCASE|
    6969                    ASM_WAVE32|ASM_OLDMODPARAM)  ///< all flags
     70};
     71
     72enum: Flags
     73{
     74    ASM_CODE_WAVE32 = 1
    7075};
    7176
     
    584589    bool macroCase;
    585590    bool oldModParam;
    586     bool wave32;
     591    Flags codeFlags;
    587592   
    588593    cxuint inclusionLevel;
     
    892897    void setFlags(Flags flags)
    893898    { this->flags = flags; }
     899    /// get code flags
     900    Flags getCodeFlags() const
     901    { return codeFlags; }
     902    /// set code flags
     903    void setCodeFlags(Flags flags)
     904    { this->codeFlags = flags; }
    894905    /// get true if altMacro enabled
    895906    bool isAltMacro() const
  • CLRadeonExtender/trunk/amdasm/AsmPseudoOps.cpp

    r4875 r4967  
    600600        case ASMOP_NOWAVE32:
    601601            if (AsmPseudoOps::checkGarbagesAtEnd(*this, linePtr))
    602                 wave32 = false;
     602                codeFlags &= ~ASM_CODE_WAVE32;
    603603            break;
    604604        case ASMOP_OCTA:
     
    704704        case ASMOP_WAVE32:
    705705            if (AsmPseudoOps::checkGarbagesAtEnd(*this, linePtr))
    706                 wave32 = true;
     706                codeFlags |= ASM_CODE_WAVE32;
    707707            break;
    708708        case ASMOP_WEAK:
  • CLRadeonExtender/trunk/amdasm/Assembler.cpp

    r4963 r4967  
    781781    macroCase = (flags & ASM_MACRONOCASE)==0;
    782782    oldModParam = (flags & ASM_OLDMODPARAM)!=0;
    783     wave32 = (flags & ASM_WAVE32)!=0;
     783    codeFlags = ((flags & ASM_WAVE32)!=0)?ASM_CODE_WAVE32:0;
    784784    localCount = macroCount = inclusionLevel = 0;
    785785    macroSubstLevel = repetitionLevel = 0;
     
    824824    macroCase = (flags & ASM_MACRONOCASE)==0;
    825825    oldModParam = (flags & ASM_OLDMODPARAM)!=0;
    826     wave32 = (flags & ASM_WAVE32)!=0;
     826    codeFlags = ((flags & ASM_WAVE32)!=0)?ASM_CODE_WAVE32:0;
    827827    localCount = macroCount = inclusionLevel = 0;
    828828    macroSubstLevel = repetitionLevel = 0;
  • CLRadeonExtender/trunk/amdasm/GCNAsmEncode1.cpp

    r4875 r4967  
    13301330    const bool isGCN15 = (arch & ARCH_GCN_1_5)!=0;
    13311331    GCNAssembler* gcnAsm = static_cast<GCNAssembler*>(asmr.isaAssembler);
     1332    const bool wave32 = (asmr.codeFlags & ASM_CODE_WAVE32)!=0;
    13321333   
    13331334    RegRange dstReg(0, 0);
     
    13541355    const bool haveSrcCC = mode1 == GCN_DS2_VCC || mode1 == GCN_SRC2_VCC;
    13551356   
    1356     const cxuint waveRegSize = (!isGCN15 || !asmr.wave32 ||
     1357    const cxuint waveRegSize = (!isGCN15 || !wave32 ||
    13571358                        (gcnInsn.mode&GCN_VOP_NOWVSZ)!=0) ? 2 : 1;
    13581359    if (haveDstCC) /* VOP3b */
     
    17691770    const bool isGCN14 = (arch & ARCH_GCN_1_4_5)!=0;
    17701771    const bool isGCN15 = (arch & ARCH_GCN_1_5)!=0;
     1772    const bool wave32 = (asmr.codeFlags & ASM_CODE_WAVE32)!=0;
    17711773   
    17721774    GCNAssembler* gcnAsm = static_cast<GCNAssembler*>(asmr.isaAssembler);
     
    17821784    {
    17831785        gcnAsm->setCurrentRVU(0);
    1784         const cxuint regSize = (!isGCN15 || !asmr.wave32 ||
     1786        const cxuint regSize = (!isGCN15 || !wave32 ||
    17851787                        (gcnInsn.mode&GCN_VOP_NOWVSZ)!=0) ? 2 : 1;
    17861788        good &= parseSRegRange(asmr, linePtr, dstReg, arch, regSize, GCNFIELD_VOP3_SDST0,
     
    19611963    const bool vop3p = (gcnInsn.mode & GCN_VOP3_VOP3P) != 0 ||
    19621964                    (gcnInsn.encoding == GCNENC_VOP3P);
     1965    const bool wave32 = (asmr.codeFlags & ASM_CODE_WAVE32)!=0;
    19631966    if (gcnVOPEnc!=GCNVOPEnc::NORMAL)
    19641967        ASM_FAIL_BY_ERROR(instrPlace, "DPP and SDWA encoding is illegal for VOP3")
     
    20112014            // SDST (VCC) (2 SGPR's)
    20122015            gcnAsm->setCurrentRVU(1);
    2013             const cxuint regSize = (!isGCN15 || !asmr.wave32 ||
     2016            const cxuint regSize = (!isGCN15 || !wave32 ||
    20142017                        (gcnInsn.mode&GCN_VOP_NOWVSZ)!=0) ? 2 : 1;
    20152018            good &= parseSRegRange(asmr, linePtr, sdstReg, arch, regSize,
Note: See TracChangeset for help on using the changeset viewer.