|
|
627693 |
diff --git a/src/debug/ee/amd64/dbghelpers.S b/src/debug/ee/amd64/dbghelpers.S
|
|
|
627693 |
index 85ec80c701..864c4dc943 100644
|
|
|
627693 |
--- a/src/debug/ee/amd64/dbghelpers.S
|
|
|
627693 |
+++ b/src/debug/ee/amd64/dbghelpers.S
|
|
|
627693 |
@@ -29,7 +29,7 @@ NESTED_ENTRY FuncEvalHijack, _TEXT, UnhandledExceptionHandlerUnix
|
|
|
627693 |
//
|
|
|
627693 |
// epilogue
|
|
|
627693 |
//
|
|
|
627693 |
- add rsp, 20h
|
|
|
627693 |
+ add rsp, 0x20
|
|
|
627693 |
TAILJMP_RAX
|
|
|
627693 |
NESTED_END FuncEvalHijack, _TEXT
|
|
|
627693 |
|
|
|
627693 |
@@ -65,14 +65,14 @@ NESTED_ENTRY ExceptionHijack, _TEXT, UnhandledExceptionHandlerUnix
|
|
|
627693 |
// its arguments on the stack. In x64, it gets its arguments in
|
|
|
627693 |
// registers (set up for us by DacDbiInterfaceImpl::Hijack),
|
|
|
627693 |
// and this stack space may be reused.
|
|
|
627693 |
- mov rax, [rsp + 20h]
|
|
|
627693 |
+ mov rax, [rsp + 0x20]
|
|
|
627693 |
mov [rsp], rax
|
|
|
627693 |
- mov rax, [rsp + 28h]
|
|
|
627693 |
- mov [rsp + 8h], rax
|
|
|
627693 |
- mov rax, [rsp + 30h]
|
|
|
627693 |
- mov [rsp + 10h], rax
|
|
|
627693 |
- mov rax, [rsp + 38h]
|
|
|
627693 |
- mov [rsp + 18h], rax
|
|
|
627693 |
+ mov rax, [rsp + 0x28]
|
|
|
627693 |
+ mov [rsp + 0x8], rax
|
|
|
627693 |
+ mov rax, [rsp + 0x30]
|
|
|
627693 |
+ mov [rsp + 0x10], rax
|
|
|
627693 |
+ mov rax, [rsp + 0x38]
|
|
|
627693 |
+ mov [rsp + 0x18], rax
|
|
|
627693 |
|
|
|
627693 |
// DD Hijack primitive already set the stack. So just make the call now.
|
|
|
627693 |
call C_FUNC(ExceptionHijackWorker)
|
|
|
627693 |
@@ -93,7 +93,7 @@ NESTED_ENTRY ExceptionHijack, _TEXT, UnhandledExceptionHandlerUnix
|
|
|
627693 |
//
|
|
|
627693 |
// epilogue
|
|
|
627693 |
//
|
|
|
627693 |
- add rsp, 20h
|
|
|
627693 |
+ add rsp, 0x20
|
|
|
627693 |
TAILJMP_RAX
|
|
|
627693 |
|
|
|
627693 |
// Put a label here to tell the debugger where the end of this function is.
|
|
|
627693 |
diff --git a/src/pal/inc/unixasmmacros.inc b/src/pal/inc/unixasmmacros.inc
|
|
|
627693 |
index e7a5eba898..8a74e3f266 100644
|
|
|
627693 |
--- a/src/pal/inc/unixasmmacros.inc
|
|
|
627693 |
+++ b/src/pal/inc/unixasmmacros.inc
|
|
|
627693 |
@@ -2,7 +2,7 @@
|
|
|
627693 |
// The .NET Foundation licenses this file to you under the MIT license.
|
|
|
627693 |
// See the LICENSE file in the project root for more information.
|
|
|
627693 |
|
|
|
627693 |
-#define INVALIDGCVALUE 0CCCCCCCDh
|
|
|
627693 |
+#define INVALIDGCVALUE 0xCCCCCCCD
|
|
|
627693 |
|
|
|
627693 |
#if defined(__APPLE__)
|
|
|
627693 |
#define C_FUNC(name) _##name
|
|
|
627693 |
diff --git a/src/vm/amd64/JitHelpers_Fast.asm b/src/vm/amd64/JitHelpers_Fast.asm
|
|
|
627693 |
index 83f7132688..5251387408 100644
|
|
|
627693 |
--- a/src/vm/amd64/JitHelpers_Fast.asm
|
|
|
627693 |
+++ b/src/vm/amd64/JitHelpers_Fast.asm
|
|
|
627693 |
@@ -40,7 +40,7 @@ EXTERN g_GCShadow:QWORD
|
|
|
627693 |
EXTERN g_GCShadowEnd:QWORD
|
|
|
627693 |
endif
|
|
|
627693 |
|
|
|
627693 |
-INVALIDGCVALUE equ 0CCCCCCCDh
|
|
|
627693 |
+INVALIDGCVALUE equ 0xCCCCCCCD
|
|
|
627693 |
|
|
|
627693 |
ifdef _DEBUG
|
|
|
627693 |
extern JIT_WriteBarrier_Debug:proc
|
|
|
627693 |
diff --git a/src/vm/amd64/JitHelpers_Slow.asm b/src/vm/amd64/JitHelpers_Slow.asm
|
|
|
627693 |
index 0e26ae6dfd..80b7453d4f 100644
|
|
|
627693 |
--- a/src/vm/amd64/JitHelpers_Slow.asm
|
|
|
627693 |
+++ b/src/vm/amd64/JitHelpers_Slow.asm
|
|
|
627693 |
@@ -48,7 +48,7 @@ g_pStringClass equ ?g_pStringClass@@3PEAVMethodTable@@EA
|
|
|
627693 |
FramedAllocateString equ ?FramedAllocateString@@YAPEAVStringObject@@K@Z
|
|
|
627693 |
JIT_NewArr1 equ ?JIT_NewArr1@@YAPEAVObject@@PEAUCORINFO_CLASS_STRUCT_@@_J@Z
|
|
|
627693 |
|
|
|
627693 |
-INVALIDGCVALUE equ 0CCCCCCCDh
|
|
|
627693 |
+INVALIDGCVALUE equ 0xCCCCCCCD
|
|
|
627693 |
|
|
|
627693 |
extern JIT_NEW:proc
|
|
|
627693 |
extern CopyValueClassUnchecked:proc
|
|
|
627693 |
diff --git a/src/vm/amd64/jithelpers_fast.S b/src/vm/amd64/jithelpers_fast.S
|
|
|
627693 |
index 6f955b0bee..5f68fc0ebf 100644
|
|
|
627693 |
--- a/src/vm/amd64/jithelpers_fast.S
|
|
|
627693 |
+++ b/src/vm/amd64/jithelpers_fast.S
|
|
|
627693 |
@@ -81,14 +81,14 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT
|
|
|
627693 |
// Update the write watch table if necessary
|
|
|
627693 |
mov rax, rdi
|
|
|
627693 |
movabs r10, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
NOP_2_BYTE // padding for alignment of constant
|
|
|
627693 |
movabs r11, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
add rax, r10
|
|
|
627693 |
- cmp byte ptr [rax], 0h
|
|
|
627693 |
+ cmp byte ptr [rax], 0x0
|
|
|
627693 |
.byte 0x75, 0x06
|
|
|
627693 |
// jne CheckCardTable
|
|
|
627693 |
- mov byte ptr [rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
NOP_3_BYTE // padding for alignment of constant
|
|
|
627693 |
|
|
|
627693 |
@@ -112,27 +112,27 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT
|
|
|
627693 |
|
|
|
627693 |
// Touch the card table entry, if not already dirty.
|
|
|
627693 |
shr rdi, 0x0B
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardTable
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
NOP_2_BYTE // padding for alignment of constant
|
|
|
627693 |
shr rdi, 0x0A
|
|
|
627693 |
|
|
|
627693 |
movabs rax, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardBundle_WriteWatch_PostGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_WriteWatch_PostGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
@@ -177,14 +177,14 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT
|
|
|
627693 |
movabs rax, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
|
|
|
627693 |
// Touch the card table entry, if not already dirty.
|
|
|
627693 |
- shr rdi, 0Bh
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ shr rdi, 0x0B
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardTable
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0x0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
NOP_6_BYTE // padding for alignment of constant
|
|
|
627693 |
@@ -194,14 +194,14 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT
|
|
|
627693 |
// Touch the card bundle, if not already dirty.
|
|
|
627693 |
// rdi is already shifted by 0xB, so shift by 0xA more
|
|
|
627693 |
shr rdi, 0x0A
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardBundle
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
@@ -312,15 +312,15 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
|
|
|
627693 |
#ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
|
|
|
627693 |
// Update the write watch table if necessary
|
|
|
627693 |
PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, rax
|
|
|
627693 |
- cmp byte ptr [rax], 0h
|
|
|
627693 |
+ cmp byte ptr [rax], 0x0
|
|
|
627693 |
je CheckCardTable_ByRefWriteBarrier
|
|
|
627693 |
mov rax, rdi
|
|
|
627693 |
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
PREPARE_EXTERNAL_VAR g_sw_ww_table, r10
|
|
|
627693 |
add rax, qword ptr [r10]
|
|
|
627693 |
- cmp byte ptr [rax], 0h
|
|
|
627693 |
+ cmp byte ptr [rax], 0x0
|
|
|
627693 |
jne CheckCardTable_ByRefWriteBarrier
|
|
|
627693 |
- mov byte ptr [rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rax], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
CheckCardTable_ByRefWriteBarrier:
|
|
|
627693 |
@@ -334,8 +334,8 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
|
|
|
627693 |
|
|
|
627693 |
// move current rdi value into rcx and then increment the pointers
|
|
|
627693 |
mov rcx, rdi
|
|
|
627693 |
- add rsi, 8h
|
|
|
627693 |
- add rdi, 8h
|
|
|
627693 |
+ add rsi, 0x8
|
|
|
627693 |
+ add rdi, 0x8
|
|
|
627693 |
|
|
|
627693 |
// Check if we need to update the card table
|
|
|
627693 |
// Calc pCardByte
|
|
|
627693 |
@@ -345,13 +345,13 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
|
|
|
627693 |
mov rax, [rax]
|
|
|
627693 |
|
|
|
627693 |
// Check if this card is dirty
|
|
|
627693 |
- cmp byte ptr [rcx + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rcx + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
jne UpdateCardTable_ByRefWriteBarrier
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable_ByRefWriteBarrier:
|
|
|
627693 |
- mov byte ptr [rcx + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rcx + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
// Shift rcx by 0x0A more to get the card bundle byte (we shifted by 0x0B already)
|
|
|
627693 |
@@ -361,13 +361,13 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
|
|
|
627693 |
add rcx, [rax]
|
|
|
627693 |
|
|
|
627693 |
// Check if this bundle byte is dirty
|
|
|
627693 |
- cmp byte ptr [rcx], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rcx], 0xFF
|
|
|
627693 |
|
|
|
627693 |
jne UpdateCardBundle_ByRefWriteBarrier
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_ByRefWriteBarrier:
|
|
|
627693 |
- mov byte ptr [rcx], 0FFh
|
|
|
627693 |
+ mov byte ptr [rcx], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
@@ -383,8 +383,8 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
|
|
|
627693 |
#endif
|
|
|
627693 |
Exit_ByRefWriteBarrier:
|
|
|
627693 |
// Increment the pointers before leaving
|
|
|
627693 |
- add rdi, 8h
|
|
|
627693 |
- add rsi, 8h
|
|
|
627693 |
+ add rdi, 0x8
|
|
|
627693 |
+ add rsi, 0x8
|
|
|
627693 |
ret
|
|
|
627693 |
LEAF_END JIT_ByRefWriteBarrier, _TEXT
|
|
|
627693 |
|
|
|
627693 |
diff --git a/src/vm/amd64/jithelpers_fastwritebarriers.S b/src/vm/amd64/jithelpers_fastwritebarriers.S
|
|
|
627693 |
index 23c1115165..0fe0e57472 100644
|
|
|
627693 |
--- a/src/vm/amd64/jithelpers_fastwritebarriers.S
|
|
|
627693 |
+++ b/src/vm/amd64/jithelpers_fastwritebarriers.S
|
|
|
627693 |
@@ -38,13 +38,13 @@ PATCH_LABEL JIT_WriteBarrier_PreGrow64_Patch_Label_CardTable
|
|
|
627693 |
|
|
|
627693 |
// Touch the card table entry, if not already dirty.
|
|
|
627693 |
shr rdi, 0x0B
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardTable_PreGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable_PreGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
NOP_6_BYTE // padding for alignment of constant
|
|
|
627693 |
@@ -55,14 +55,14 @@ PATCH_LABEL JIT_WriteBarrier_PreGrow64_Patch_Label_CardBundleTable
|
|
|
627693 |
// Touch the card bundle, if not already dirty.
|
|
|
627693 |
// rdi is already shifted by 0xB, so shift by 0xA more
|
|
|
627693 |
shr rdi, 0x0A
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardBundle_PreGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_PreGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
@@ -123,13 +123,13 @@ PATCH_LABEL JIT_WriteBarrier_PostGrow64_Patch_Label_CardTable
|
|
|
627693 |
|
|
|
627693 |
// Touch the card table entry, if not already dirty.
|
|
|
627693 |
shr rdi, 0x0B
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardTable_PostGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable_PostGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
NOP_6_BYTE // padding for alignment of constant
|
|
|
627693 |
@@ -140,14 +140,14 @@ PATCH_LABEL JIT_WriteBarrier_PostGrow64_Patch_Label_CardBundleTable
|
|
|
627693 |
// Touch the card bundle, if not already dirty.
|
|
|
627693 |
// rdi is already shifted by 0xB, so shift by 0xA more
|
|
|
627693 |
shr rdi, 0x0A
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardBundle_PostGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_PostGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
@@ -182,13 +182,13 @@ PATCH_LABEL JIT_WriteBarrier_SVR64_PatchLabel_CardTable
|
|
|
627693 |
|
|
|
627693 |
shr rdi, 0x0B
|
|
|
627693 |
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardTable_SVR64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable_SVR64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
NOP_6_BYTE // padding for alignment of constant
|
|
|
627693 |
@@ -198,14 +198,14 @@ PATCH_LABEL JIT_WriteBarrier_SVR64_PatchLabel_CardBundleTable
|
|
|
627693 |
|
|
|
627693 |
// Shift the address by 0xA more since already shifted by 0xB
|
|
|
627693 |
shr rdi, 0x0A
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardBundle_SVR64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_SVR64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
@@ -236,15 +236,15 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_PreGrow64, _TEXT
|
|
|
627693 |
mov rax, rdi
|
|
|
627693 |
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_WriteWatchTable
|
|
|
627693 |
movabs r10, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
NOP_2_BYTE // padding for alignment of constant
|
|
|
627693 |
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_Lower
|
|
|
627693 |
movabs r11, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
add rax, r10
|
|
|
627693 |
- cmp byte ptr [rax], 0h
|
|
|
627693 |
+ cmp byte ptr [rax], 0x0
|
|
|
627693 |
.byte 0x75, 0x03
|
|
|
627693 |
// jne CheckCardTable_WriteWatch_PreGrow64
|
|
|
627693 |
- mov byte ptr [rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
CheckCardTable_WriteWatch_PreGrow64:
|
|
|
627693 |
// Check the lower ephemeral region bound.
|
|
|
627693 |
@@ -263,13 +263,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_Lower
|
|
|
627693 |
NOP_2_BYTE // padding for alignment of constant
|
|
|
627693 |
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardTable
|
|
|
627693 |
movabs rax, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardTable_WriteWatch_PreGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable_WriteWatch_PreGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
NOP_2_BYTE // padding for alignment of constant
|
|
|
627693 |
@@ -277,14 +277,14 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardBundleTable
|
|
|
627693 |
movabs rax, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
|
|
|
627693 |
shr rdi, 0x0A
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardBundle_WriteWatch_PreGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_WriteWatch_PreGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
@@ -314,15 +314,15 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_PostGrow64, _TEXT
|
|
|
627693 |
mov rax, rdi
|
|
|
627693 |
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_WriteWatchTable
|
|
|
627693 |
movabs r10, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
NOP_2_BYTE // padding for alignment of constant
|
|
|
627693 |
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_Lower
|
|
|
627693 |
movabs r11, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
add rax, r10
|
|
|
627693 |
- cmp byte ptr [rax], 0h
|
|
|
627693 |
+ cmp byte ptr [rax], 0x0
|
|
|
627693 |
.byte 0x75, 0x06
|
|
|
627693 |
// jne CheckCardTable_WriteWatch_PostGrow64
|
|
|
627693 |
- mov byte ptr [rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
NOP_3_BYTE // padding for alignment of constant
|
|
|
627693 |
|
|
|
627693 |
@@ -358,13 +358,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardTable
|
|
|
627693 |
|
|
|
627693 |
// Touch the card table entry, if not already dirty.
|
|
|
627693 |
shr rdi, 0x0B
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardTable_WriteWatch_PostGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable_WriteWatch_PostGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
NOP_2_BYTE // padding for alignment of constant
|
|
|
627693 |
@@ -372,14 +372,14 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardTable
|
|
|
627693 |
|
|
|
627693 |
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardBundleTable
|
|
|
627693 |
movabs rax, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
- cmp byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardBundle_WriteWatch_PostGrow64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_WriteWatch_PostGrow64:
|
|
|
627693 |
- mov byte ptr [rdi + rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + rax], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
@@ -417,25 +417,25 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_SVR64, _TEXT
|
|
|
627693 |
mov rax, rdi
|
|
|
627693 |
PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_WriteWatchTable
|
|
|
627693 |
movabs r10, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
NOP_2_BYTE // padding for alignment of constant
|
|
|
627693 |
PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardTable
|
|
|
627693 |
movabs r11, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
add rax, r10
|
|
|
627693 |
- cmp byte ptr [rax], 0h
|
|
|
627693 |
+ cmp byte ptr [rax], 0x0
|
|
|
627693 |
.byte 0x75, 0x03
|
|
|
627693 |
// jne CheckCardTable_WriteWatch_SVR64
|
|
|
627693 |
- mov byte ptr [rax], 0FFh
|
|
|
627693 |
+ mov byte ptr [rax], 0xFF
|
|
|
627693 |
|
|
|
627693 |
CheckCardTable_WriteWatch_SVR64:
|
|
|
627693 |
shr rdi, 0x0B
|
|
|
627693 |
- cmp byte ptr [rdi + r11], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + r11], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardTable_WriteWatch_SVR64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable_WriteWatch_SVR64:
|
|
|
627693 |
- mov byte ptr [rdi + r11], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + r11], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
NOP // padding for alignment of constant
|
|
|
627693 |
@@ -444,13 +444,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardBundleTable
|
|
|
627693 |
movabs r11, 0xF0F0F0F0F0F0F0F0
|
|
|
627693 |
|
|
|
627693 |
shr rdi, 0x0A
|
|
|
627693 |
- cmp byte ptr [rdi + r11], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + r11], 0xFF
|
|
|
627693 |
.byte 0x75, 0x02
|
|
|
627693 |
// jne UpdateCardBundle_WriteWatch_SVR64
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_WriteWatch_SVR64:
|
|
|
627693 |
- mov byte ptr [rdi + r11], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + r11], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
diff --git a/src/vm/amd64/jithelpers_slow.S b/src/vm/amd64/jithelpers_slow.S
|
|
|
627693 |
index f61b42afc7..aa2e8cc064 100644
|
|
|
627693 |
--- a/src/vm/amd64/jithelpers_slow.S
|
|
|
627693 |
+++ b/src/vm/amd64/jithelpers_slow.S
|
|
|
627693 |
@@ -71,15 +71,15 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT
|
|
|
627693 |
#ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
|
|
|
627693 |
// Update the write watch table if necessary
|
|
|
627693 |
PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, r10
|
|
|
627693 |
- cmp byte ptr [r10], 0h
|
|
|
627693 |
+ cmp byte ptr [r10], 0x0
|
|
|
627693 |
je CheckCardTable_Debug
|
|
|
627693 |
mov r10, rdi
|
|
|
627693 |
- shr r10, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
+ shr r10, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
|
|
|
627693 |
PREPARE_EXTERNAL_VAR g_sw_ww_table, r11
|
|
|
627693 |
add r10, qword ptr [r11]
|
|
|
627693 |
- cmp byte ptr [r10], 0h
|
|
|
627693 |
+ cmp byte ptr [r10], 0x0
|
|
|
627693 |
jne CheckCardTable_Debug
|
|
|
627693 |
- mov byte ptr [r10], 0FFh
|
|
|
627693 |
+ mov byte ptr [r10], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
CheckCardTable_Debug:
|
|
|
627693 |
@@ -99,13 +99,13 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT
|
|
|
627693 |
mov r10, [r10]
|
|
|
627693 |
|
|
|
627693 |
// Check if this card is dirty
|
|
|
627693 |
- cmp byte ptr [rdi + r10], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi + r10], 0xFF
|
|
|
627693 |
|
|
|
627693 |
jne UpdateCardTable_Debug
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardTable_Debug:
|
|
|
627693 |
- mov byte ptr [rdi + r10], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi + r10], 0xFF
|
|
|
627693 |
|
|
|
627693 |
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
|
|
|
627693 |
// Shift rdi by 0x0A more to get the card bundle byte (we shifted by 0x0B already)
|
|
|
627693 |
@@ -115,13 +115,13 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT
|
|
|
627693 |
add rdi, [r10]
|
|
|
627693 |
|
|
|
627693 |
// Check if this bundle byte is dirty
|
|
|
627693 |
- cmp byte ptr [rdi], 0FFh
|
|
|
627693 |
+ cmp byte ptr [rdi], 0xFF
|
|
|
627693 |
|
|
|
627693 |
jne UpdateCardBundle_Debug
|
|
|
627693 |
REPRET
|
|
|
627693 |
|
|
|
627693 |
UpdateCardBundle_Debug:
|
|
|
627693 |
- mov byte ptr [rdi], 0FFh
|
|
|
627693 |
+ mov byte ptr [rdi], 0xFF
|
|
|
627693 |
#endif
|
|
|
627693 |
|
|
|
627693 |
ret
|
|
|
627693 |
diff --git a/src/vm/amd64/virtualcallstubamd64.S b/src/vm/amd64/virtualcallstubamd64.S
|
|
|
627693 |
index 59b5b77dba..38c33d498e 100644
|
|
|
627693 |
--- a/src/vm/amd64/virtualcallstubamd64.S
|
|
|
627693 |
+++ b/src/vm/amd64/virtualcallstubamd64.S
|
|
|
627693 |
@@ -59,19 +59,19 @@ LEAF_ENTRY ResolveWorkerChainLookupAsmStub, _TEXT
|
|
|
627693 |
jnz Fail_RWCLAS // If the BACKPATCH_FLAGS is set we will go directly to the ResolveWorkerAsmStub
|
|
|
627693 |
|
|
|
627693 |
MainLoop_RWCLAS:
|
|
|
627693 |
- mov rax, [rax+18h] // get the next entry in the chain (don't bother checking the first entry again)
|
|
|
627693 |
+ mov rax, [rax+0x18] // get the next entry in the chain (don't bother checking the first entry again)
|
|
|
627693 |
test rax,rax // test if we hit a terminating NULL
|
|
|
627693 |
jz Fail_RWCLAS
|
|
|
627693 |
|
|
|
627693 |
- cmp rdx, [rax+00h] // compare our MT with the one in the ResolveCacheElem
|
|
|
627693 |
+ cmp rdx, [rax+0x0] // compare our MT with the one in the ResolveCacheElem
|
|
|
627693 |
jne MainLoop_RWCLAS
|
|
|
627693 |
- cmp r10, [rax+08h] // compare our DispatchToken with one in the ResolveCacheElem
|
|
|
627693 |
+ cmp r10, [rax+0x8] // compare our DispatchToken with one in the ResolveCacheElem
|
|
|
627693 |
jne MainLoop_RWCLAS
|
|
|
627693 |
Success_RWCLAS:
|
|
|
627693 |
PREPARE_EXTERNAL_VAR CHAIN_SUCCESS_COUNTER, rdx
|
|
|
627693 |
sub qword ptr [rdx],1 // decrement success counter
|
|
|
627693 |
jl Promote_RWCLAS
|
|
|
627693 |
- mov rax, [rax+10h] // get the ImplTarget
|
|
|
627693 |
+ mov rax, [rax+0x10] // get the ImplTarget
|
|
|
627693 |
pop rdx
|
|
|
627693 |
jmp rax
|
|
|
627693 |
|