diff options
Diffstat (limited to 'src/jit/lsrabuild.cpp')
-rw-r--r-- | src/jit/lsrabuild.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/jit/lsrabuild.cpp b/src/jit/lsrabuild.cpp index 5023b13069..62692d587a 100644 --- a/src/jit/lsrabuild.cpp +++ b/src/jit/lsrabuild.cpp @@ -664,7 +664,8 @@ regMaskTP LinearScan::getKillSetForStoreInd(GenTreeStoreInd* tree) { // We can't determine the exact helper to be used at this point, because it depends on // the allocated register for the `data` operand. However, all the (x86) optimized - // helpers have the same kill set: EDX. + // helpers have the same kill set: EDX. And note that currently, only x86 can return + // `true` for genUseOptimizedWriteBarriers(). killMask = RBM_CALLEE_TRASH_NOGC; } else @@ -3141,22 +3142,18 @@ void LinearScan::BuildGCWriteBarrier(GenTree* tree) assert(info->dstCount == 0); bool customSourceRegs = false; -#if NOGC_WRITE_BARRIERS - #if defined(_TARGET_ARM64_) - // For the NOGC JIT Helper calls - // - // the 'addr' goes into x14 (REG_WRITE_BARRIER_DST_BYREF) - // the 'src' goes into x15 (REG_WRITE_BARRIER) + + // the 'addr' goes into x14 (REG_WRITE_BARRIER_DST) + // the 'src' goes into x15 (REG_WRITE_BARRIER_SRC) // - addrInfo->info.setSrcCandidates(this, RBM_WRITE_BARRIER_DST_BYREF); - srcInfo->info.setSrcCandidates(this, RBM_WRITE_BARRIER); + addrInfo->info.setSrcCandidates(this, RBM_WRITE_BARRIER_DST); + srcInfo->info.setSrcCandidates(this, RBM_WRITE_BARRIER_SRC); customSourceRegs = true; -#elif defined(_TARGET_X86_) +#elif defined(_TARGET_X86_) && NOGC_WRITE_BARRIERS bool useOptimizedWriteBarrierHelper = compiler->codeGen->genUseOptimizedWriteBarriers(tree, src); - if (useOptimizedWriteBarrierHelper) { // Special write barrier: @@ -3166,11 +3163,8 @@ void LinearScan::BuildGCWriteBarrier(GenTree* tree) srcInfo->info.setSrcCandidates(this, RBM_WRITE_BARRIER_SRC); customSourceRegs = true; } -#else // !defined(_TARGET_X86_) && !defined(_TARGET_ARM64_) -#error "NOGC_WRITE_BARRIERS is not supported" -#endif // !defined(_TARGET_X86_) -#endif // NOGC_WRITE_BARRIERS +#endif // defined(_TARGET_X86_) && NOGC_WRITE_BARRIERS if (!customSourceRegs) { |