diff options
author | Rama Krishnan Raghupathy <ramarag@microsoft.com> | 2016-08-10 15:02:35 -0700 |
---|---|---|
committer | Rama Krishnan Raghupathy <ramarag@microsoft.com> | 2016-08-10 16:45:38 -0700 |
commit | f9e5306c1b5521b311d53fe362cf88bb05d00334 (patch) | |
tree | 92494bc0110280da474d853c4e0b03a5d4142491 /src/vm/arm64 | |
parent | 17ced7fea35cb89ce6fe6c0a614c9fe15171bdea (diff) | |
download | coreclr-f9e5306c1b5521b311d53fe362cf88bb05d00334.tar.gz coreclr-f9e5306c1b5521b311d53fe362cf88bb05d00334.tar.bz2 coreclr-f9e5306c1b5521b311d53fe362cf88bb05d00334.zip |
Preserving ResolveCacheElem in X9
Diffstat (limited to 'src/vm/arm64')
-rw-r--r-- | src/vm/arm64/asmconstants.h | 7 | ||||
-rw-r--r-- | src/vm/arm64/asmhelpers.asm | 15 |
2 files changed, 15 insertions, 7 deletions
diff --git a/src/vm/arm64/asmconstants.h b/src/vm/arm64/asmconstants.h index 4edbbfccfd..87751d7492 100644 --- a/src/vm/arm64/asmconstants.h +++ b/src/vm/arm64/asmconstants.h @@ -147,5 +147,12 @@ ASMCONSTANTS_C_ASSERT(CONTEXT_Pc == offsetof(T_CONTEXT,Pc)) ASMCONSTANTS_C_ASSERT(SIZEOF__FaultingExceptionFrame == sizeof(FaultingExceptionFrame)); ASMCONSTANTS_C_ASSERT(FaultingExceptionFrame__m_fFilterExecuted == offsetof(FaultingExceptionFrame, m_fFilterExecuted)); +#ifndef CROSSGEN_COMPILE +#define ResolveCacheElem__target 0x10 +#define ResolveCacheElem__pNext 0x18 +ASMCONSTANTS_C_ASSERT(ResolveCacheElem__target == offsetof(ResolveCacheElem, target)); +ASMCONSTANTS_C_ASSERT(ResolveCacheElem__pNext == offsetof(ResolveCacheElem, pNext)); +#endif // CROSSGEN_COMPILE + #undef ASMCONSTANTS_RUNTIME_ASSERT #undef ASMCONSTANTS_C_ASSERT diff --git a/src/vm/arm64/asmhelpers.asm b/src/vm/arm64/asmhelpers.asm index 1369bd80d7..f6f4621ba9 100644 --- a/src/vm/arm64/asmhelpers.asm +++ b/src/vm/arm64/asmhelpers.asm @@ -1068,6 +1068,7 @@ FaultingExceptionFrame_FrameOffset SETA SIZEOF__GSCookie ; x12 contains our contract the DispatchToken ; Must be preserved: ; x0 contains the instance object ref that we are making an interface call on +; x9 Must point to a ResolveCacheElem [For Sanity] ; [x1-x7] contains any additional register arguments for the interface method ; ; Loaded from x0 @@ -1093,7 +1094,7 @@ PROMOTE_CHAIN_FLAG SETA 2 ldr x13, [x0] ; retrieve the MethodTable from the object ref in x0 MainLoop - ldr x9, [x9, #24] ; x9 <= the next entry in the chain + ldr x9, [x9, #ResolveCacheElem__pNext] ; x9 <= the next entry in the chain cmp x9, #0 beq Fail @@ -1106,18 +1107,18 @@ MainLoop Success ldr x13, =g_dispatch_cache_chain_success_counter - ldr x9, [x13] - subs x9, x9, #1 - str x9, [x13] + ldr x16, [x13] + subs x16, x16, #1 + str x16, [x13] blt Promote - ldr x16, [x9, #16] ; get the ImplTarget + ldr x16, [x9, #ResolveCacheElem__target] ; get the ImplTarget br x16 ; branch to interface implemenation target Promote ; Move this entry to head postion of the chain - mov x9, #256 - str x9, [x13] ; be quick to reset the counter so we don't get a bunch of contending threads + mov x16, #256 + str x16, [x13] ; be quick to reset the counter so we don't get a bunch of contending threads orr x11, x11, #PROMOTE_CHAIN_FLAG ; set PROMOTE_CHAIN_FLAG Fail |