Fix register being shifted in pinvoke stub.
authorAditya Mandaleeka <adityam@microsoft.com>
Fri, 27 Apr 2018 01:21:10 +0000 (18:21 -0700)
committerAditya Mandaleeka <adityam@microsoft.com>
Fri, 27 Apr 2018 01:21:10 +0000 (18:21 -0700)
src/vm/arm64/PInvokeStubs.asm
src/vm/arm64/pinvokestubs.S

index 69d8a91..8e288cb 100644 (file)
@@ -64,8 +64,8 @@ __PInvokeGenStubFuncName SETS "$__PInvokeGenStubFuncName":CC:"_RetBuffArg"
             ; The way we do this is to shift the managed target to the left by one bit and then set the
             ; least significant bit to 1.  This works because MethodDesc* are always 8-byte aligned.
             ;
-            lsl             x9, x9, #1
-            orr             x9, x9, #1
+            lsl             x12, x12, #1
+            orr             x12, x12, #1
         ENDIF
 
         EPILOG_BRANCH_REG   x9 
index 38f4665..674d723 100644 (file)
@@ -38,8 +38,8 @@
             // The way we do this is to shift the managed target to the left by one bit and then set the
             // least significant bit to 1.  This works because MethodDesc* are always 8-byte aligned.
             //
-            lsl             x9, x9, #1
-            orr             x9, x9, #1
+            lsl             x12, x12, #1
+            orr             x12, x12, #1
         .endif
 
         EPILOG_BRANCH_REG   x9