Changeset 4991 in CLRX


Ignore:
Timestamp:
Sep 23, 2019, 3:09:13 PM (3 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmROCm: Correct handling '.wave32' and '.nowave32' in ROCm format handling (setting codeFlags and enableSgprsFeatures).

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

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

    r4988 r4991  
    323323void AsmROCmHandler::setCodeFlags(Flags codeFlags)
    324324{
    325     if (assembler.currentKernel != ASMKERN_GLOBAL)
    326         kernelStates[assembler.currentKernel]->codeFlags = codeFlags;
     325    if (currentKcodeKernel != ASMKERN_GLOBAL)
     326    {
     327        Kernel* kernel = kernelStates[currentKcodeKernel];
     328        kernel->codeFlags = codeFlags;
     329        if (kernel->config != nullptr)
     330            kernel->config->enableSgprRegisterFlags =
     331                    (kernel->config->enableSgprRegisterFlags & ~ROCMFLAG_USE_WAVE32) |
     332                (((codeFlags & ASM_CODE_WAVE32)!=0) ? ROCMFLAG_USE_WAVE32 : 0);
     333    }
    327334}
    328335
  • CLRadeonExtender/trunk/tests/amdasm/AsmRegPool.cpp

    r4990 r4991  
    552552        { { "a1", 1, 1, ASM_CODE_WAVE32 }, { "a2", 2, 1, 0 },
    553553            { "a3", 2, 1, 0 }, { "a4", 1, 1, ASM_CODE_WAVE32 } }
    554     }
     554    },
     555    /* rocm wave32 flags 2 */
     556    {
     557        R"ffDXD(            .rocm; .gpu gfx1010
     558    .llvm10binfmt
     559    .metadatav3
     560    .kernel a1
     561    .config
     562    .kernel a2
     563    .config
     564    .globaldata
     565    .skip 128
     566    .text
     567.p2align 8
     568a1:
     569        .wave32
     570        v_cmp_gt_i32    vcc_lo, s1, v1
     571        s_endpgm
     572.p2align 8
     573a2:
     574        .nowave32
     575        v_cmp_gt_i32    vcc, s5, v2
     576        s_endpgm
     577        )ffDXD",
     578        { { "a1", 1, 1, ASM_CODE_WAVE32 }, { "a2", 2, 1, 0 } }
     579    },
    555580};
    556581
Note: See TracChangeset for help on using the changeset viewer.