diff options
author | sivarv <sivarv@microsoft.com> | 2016-04-20 16:36:53 -0700 |
---|---|---|
committer | sivarv <sivarv@microsoft.com> | 2016-04-20 16:40:19 -0700 |
commit | 8e01e2a7a1c78a69ef1667a8c1cf675ca5f31a43 (patch) | |
tree | 71d7e6095156ec89f652bd3fe9db188032975aca /src/jit | |
parent | 1a89827d6ce553d793ffc0787129b07df0047457 (diff) | |
download | coreclr-8e01e2a7a1c78a69ef1667a8c1cf675ca5f31a43.tar.gz coreclr-8e01e2a7a1c78a69ef1667a8c1cf675ca5f31a43.tar.bz2 coreclr-8e01e2a7a1c78a69ef1667a8c1cf675ca5f31a43.zip |
Model kill set of CORINFO_HELP_STOP_FOR_GC correctly on unix.
Diffstat (limited to 'src/jit')
-rw-r--r-- | src/jit/lsra.cpp | 14 | ||||
-rw-r--r-- | src/jit/target.h | 13 |
2 files changed, 12 insertions, 15 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp index 4e89d9c812..076fc71ced 100644 --- a/src/jit/lsra.cpp +++ b/src/jit/lsra.cpp @@ -2478,19 +2478,7 @@ LinearScan::getKillSetForNode(GenTree* tree) } break; case GT_RETURNTRAP: - // if there is no FP used, we can ignore the FP kills - if (compiler->compFloatingPointUsed) - { - killMask = RBM_CALLEE_TRASH; - } - else - { - killMask = RBM_INT_CALLEE_TRASH; - } -#if defined(_TARGET_AMD64_) || defined (_TARGET_ARM_) - // AMD (and ARM) helpers for this save the return value - killMask &= ~(RBM_INTRET | RBM_FLOATRET); -#endif + killMask = compiler->compHelperCallKillSet(CORINFO_HELP_STOP_FOR_GC); break; case GT_CALL: // if there is no FP used, we can ignore the FP kills diff --git a/src/jit/target.h b/src/jit/target.h index 88ad1b0bb9..fdc1c92b57 100644 --- a/src/jit/target.h +++ b/src/jit/target.h @@ -1081,9 +1081,18 @@ typedef unsigned short regPairNoSmall; // arm: need 12 bits #define RBM_PROFILER_ENTER_TRASH RBM_CALLEE_TRASH #define RBM_PROFILER_LEAVE_TRASH (RBM_CALLEE_TRASH & ~(RBM_FLOATRET | RBM_INTRET)) - // The registers trashed by the CORINFO_HELP_STOP_FOR_GC helper - // See vm\amd64\amshelpers.asm for more details. + // The registers trashed by the CORINFO_HELP_STOP_FOR_GC helper. +#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING + // See vm\amd64\unixasmhelpers.S for more details. + // + // On Unix a struct of size >=9 and <=16 bytes in size is returned in two return registers. + // The return registers could be any two from the set { RAX, RDX, XMM0, XMM1 }. + // STOP_FOR_GC helper preserves all the 4 possible return registers. + #define RBM_STOP_FOR_GC_TRASH (RBM_CALLEE_TRASH & ~(RBM_FLOATRET | RBM_INTRET | RBM_FLOATRET_1 | RBM_INTRET_1)) +#else + // See vm\amd64\asmhelpers.asm for more details. #define RBM_STOP_FOR_GC_TRASH (RBM_CALLEE_TRASH & ~(RBM_FLOATRET | RBM_INTRET)) +#endif // What sort of reloc do we use for [disp32] address mode #define IMAGE_REL_BASED_DISP32 IMAGE_REL_BASED_REL32 |