diff options
author | Rahul Kumar <rahku@microsoft.com> | 2016-02-29 10:01:04 -0800 |
---|---|---|
committer | Rahul Kumar <rahku@microsoft.com> | 2016-02-29 10:01:04 -0800 |
commit | bc27b37c381c842b153f1d1777f2903a3ea2a9ac (patch) | |
tree | 4fd016253bd10a643e77c6d9df870cabe84fa7d4 /src/vm/arm64/asmhelpers.asm | |
parent | 8b687145c7806d43ed3ad19b95e13dabaa31df73 (diff) | |
download | coreclr-bc27b37c381c842b153f1d1777f2903a3ea2a9ac.tar.gz coreclr-bc27b37c381c842b153f1d1777f2903a3ea2a9ac.tar.bz2 coreclr-bc27b37c381c842b153f1d1777f2903a3ea2a9ac.zip |
Fixes issue #2643 and #2731
Diffstat (limited to 'src/vm/arm64/asmhelpers.asm')
-rw-r--r-- | src/vm/arm64/asmhelpers.asm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vm/arm64/asmhelpers.asm b/src/vm/arm64/asmhelpers.asm index 2965cedd3d..5384f77daa 100644 --- a/src/vm/arm64/asmhelpers.asm +++ b/src/vm/arm64/asmhelpers.asm @@ -64,26 +64,25 @@ str lr, [x0, #LazyMachState_captureIp] - str fp, [x0, #LazyMachState_captureFp] - ;; str instruction does not save sp register directly so move to temp register mov x1, sp str x1, [x0, #LazyMachState_captureSp] ;; save non-volatile registers that can contain object references - add x1, x0, #LazyMachState_captureX19_X28 + add x1, x0, #LazyMachState_captureX19_X29 stp x19, x20, [x1, #(16*0)] stp x21, x22, [x1, #(16*1)] stp x23, x24, [x1, #(16*2)] stp x25, x26, [x1, #(16*3)] stp x27, x28, [x1, #(16*4)] + str x29, [x1, #(16*5)] ret lr LEAF_END ; ; If a preserved register were pushed onto the stack between - ; the managed caller and the H_M_F, ptrX19_X28 will point to its + ; the managed caller and the H_M_F, ptrX19_X29 will point to its ; location on the stack and it would have been updated on the ; stack by the GC already and it will be popped back into the ; appropriate register when the appropriate epilog is run. @@ -93,7 +92,7 @@ ; here because the GC will have updated our copies in the ; frame. ; - ; So, if ptrX19_X28 points into the MachState, we need to update + ; So, if ptrX19_X29 points into the MachState, we need to update ; the register here. That's what this macro does. ; @@ -104,16 +103,16 @@ ; ; x0 = address of MachState ; - ; $regIndex: Index of the register (x19-x28). For x19, index is 19. + ; $regIndex: Index of the register (x19-x29). For x19, index is 19. ; For x20, index is 20, and so on. ; ; $reg: Register name (e.g. x19, x20, etc) ; ; Get the address of the specified captured register from machine state - add x2, x0, #(MachState__captureX19_X28 + (($regIndex-19)*8)) + add x2, x0, #(MachState__captureX19_X29 + (($regIndex-19)*8)) ; Get the content of specified preserved register pointer from machine state - ldr x3, [x0, #(MachState__ptrX19_X28 + (($regIndex-19)*8))] + ldr x3, [x0, #(MachState__ptrX19_X29 + (($regIndex-19)*8))] cmp x2, x3 bne %FT0 @@ -147,6 +146,7 @@ RestoreRegMS 26, X26 RestoreRegMS 27, X27 RestoreRegMS 28, X28 + Done ; Its imperative that the return value of HelperMethodFrameRestoreState is zero ; as it is used in the state machine to loop until it becomes zero. |