diff options
author | Sergey Andreenko <seandree@microsoft.com> | 2019-03-13 18:31:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 18:31:27 -0700 |
commit | 83327daf3c6186587f91182c39afd8e768baecfd (patch) | |
tree | 187e621f4232a7d00831cd712c6537de5e7e2869 /src/jit/codegencommon.cpp | |
parent | 3d4ed7c829803206db7caea1e348bc4791aec0a6 (diff) | |
download | coreclr-83327daf3c6186587f91182c39afd8e768baecfd.tar.gz coreclr-83327daf3c6186587f91182c39afd8e768baecfd.tar.bz2 coreclr-83327daf3c6186587f91182c39afd8e768baecfd.zip |
Fix/clean compNoGCHelperCallKillSet for arm. (#23078)
* Add an assert to compNoGCHelperCallKillSet.
That registers that lose GC or byref values also are in compHelperCallKillSet return set.
* Move compNoGCHelperCallKillSet from compiler to emitter.
* Rename `compNoGCHelperCallKillSet` to `emitGetGCRegsKilledByNoGCCall`.
* Fix GCRegsKill sets for arm CORINFO_HELP_PROF_FCN_ENTER and CORINFO_HELP_PROF_FCN_LEAVE.
Diffstat (limited to 'src/jit/codegencommon.cpp')
-rw-r--r-- | src/jit/codegencommon.cpp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index 55028e9e82..a45710330f 100644 --- a/src/jit/codegencommon.cpp +++ b/src/jit/codegencommon.cpp @@ -618,72 +618,6 @@ regMaskTP Compiler::compHelperCallKillSet(CorInfoHelpFunc helper) } } -//---------------------------------------------------------------------- -// compNoGCHelperCallKillSet: Gets a register mask that represents the set of registers that no longer -// contain GC or byref pointers, for "NO GC" helper calls. This is used by the emitter when determining -// what registers to remove from the current live GC/byref sets (and thus what to report as dead in the -// GC info). Note that for the CORINFO_HELP_ASSIGN_BYREF helper, in particular, the kill set reported by -// compHelperCallKillSet() doesn't match this kill set. compHelperCallKillSet() reports the dst/src -// address registers as killed for liveness purposes, since their values change. However, they still are -// valid byref pointers after the call, so the dst/src address registers are NOT reported as killed here. -// -// Note: This list may not be complete and defaults to the default RBM_CALLEE_TRASH_NOGC registers. -// -// Arguments: -// helper - The helper being inquired about -// -// Return Value: -// Mask of GC register kills -// -regMaskTP Compiler::compNoGCHelperCallKillSet(CorInfoHelpFunc helper) -{ - assert(emitter::emitNoGChelper(helper)); - - switch (helper) - { - case CORINFO_HELP_ASSIGN_BYREF: -#if defined(_TARGET_X86_) - // This helper only trashes ECX. - return RBM_ECX; -#elif defined(_TARGET_AMD64_) - // This uses and defs RDI and RSI. - return RBM_CALLEE_TRASH_NOGC & ~(RBM_RDI | RBM_RSI); -#elif defined(_TARGET_ARMARCH_) - return RBM_CALLEE_GCTRASH_WRITEBARRIER_BYREF; -#else - assert(!"unknown arch"); -#endif - -#if defined(_TARGET_XARCH_) - case CORINFO_HELP_PROF_FCN_ENTER: - return RBM_PROFILER_ENTER_TRASH; - - case CORINFO_HELP_PROF_FCN_LEAVE: - return RBM_PROFILER_LEAVE_TRASH; - - case CORINFO_HELP_PROF_FCN_TAILCALL: - return RBM_PROFILER_TAILCALL_TRASH; -#endif // defined(_TARGET_XARCH_) - -#if defined(_TARGET_ARMARCH_) - case CORINFO_HELP_ASSIGN_REF: - case CORINFO_HELP_CHECKED_ASSIGN_REF: - return RBM_CALLEE_GCTRASH_WRITEBARRIER; - case CORINFO_HELP_PROF_FCN_LEAVE: - // In case of Leave profiler callback, we need to preserve liveness of REG_PROFILER_RET_SCRATCH on ARMARCH. - return RBM_CALLEE_TRASH_NOGC & ~RBM_PROFILER_RET_SCRATCH; -#endif - -#if defined(_TARGET_X86_) - case CORINFO_HELP_INIT_PINVOKE_FRAME: - return RBM_INIT_PINVOKE_FRAME_TRASH; -#endif // defined(_TARGET_X86_) - - default: - return RBM_CALLEE_TRASH_NOGC; - } -} - template <bool ForCodeGen> void Compiler::compChangeLife(VARSET_VALARG_TP newLife) { |