[Arm64]:Fixing the Logic of ResolveWorkerChainLookupAsmStub
authorRama Krishnan Raghupathy <ramarag@microsoft.com>
Fri, 8 Apr 2016 02:40:30 +0000 (19:40 -0700)
committerRama Krishnan Raghupathy <ramarag@microsoft.com>
Sat, 9 Apr 2016 01:48:13 +0000 (18:48 -0700)
src/vm/arm64/asmhelpers.asm

index a2b4948..a12a484 100644 (file)
@@ -1104,6 +1104,7 @@ FaultingExceptionFrame_FrameOffset        SETA  SIZEOF__GSCookie
 ; On Exit (to ResolveWorkerAsmStub):  
 ;   x11       contains the address of the indirection and the flags in the low two bits.
 ;   x12       contains our contract (DispatchToken)
+;   x16,x17   will be trashed
 ; 
     GBLA BACKPATCH_FLAG      ; two low bit flags used by ResolveWorkerAsmStub
     GBLA PROMOTE_CHAIN_FLAG  ; two low bit flags used by ResolveWorkerAsmStub
@@ -1121,12 +1122,11 @@ MainLoop
         cmp     x9, #0
         beq     Fail
 
-        ldr     x9,  [x9, #0]
-        cmp     x9, x13           ; compare our MT with the one in the ResolveCacheElem
+        ldp     x16, x17, [x9]
+        cmp     x16, x13          ; compare our MT with the one in the ResolveCacheElem
         bne     MainLoop
         
-        ldr     x9,  [x9, #8]
-        cmp     x8, x12           ; compare our DispatchToken with one in the ResolveCacheElem
+        cmp     x17, x12          ; compare our DispatchToken with one in the ResolveCacheElem
         bne     MainLoop
         
 Success