summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/debug/daccess/daccess.cpp4
-rw-r--r--src/debug/daccess/dacdbiimpl.cpp2
-rw-r--r--src/debug/daccess/dacdbiimpl.h4
-rw-r--r--src/debug/di/shimpriv.h6
-rw-r--r--src/dlls/mscoree/unixinterface.cpp2
-rw-r--r--src/ilasm/CMakeLists.txt2
-rw-r--r--src/ilasm/method.cpp2
-rw-r--r--src/pal/inc/unixasmmacros.inc2
-rw-r--r--src/vm/amd64/jithelpers_fast.S38
-rw-r--r--src/vm/amd64/jithelpers_fastwritebarriers.S66
-rw-r--r--src/vm/amd64/jithelpers_slow.S16
-rw-r--r--src/vm/amd64/virtualcallstubamd64.S8
-rw-r--r--src/vm/amd64/virtualcallstubcpu.hpp6
-rw-r--r--src/vm/codeman.cpp2
-rw-r--r--src/vm/codeversion.h4
-rw-r--r--src/vm/crossloaderallocatorhash.inl6
-rw-r--r--src/vm/dataimage.cpp2
-rw-r--r--src/vm/eventpipebuffermanager.cpp6
-rw-r--r--src/vm/eventpipebuffermanager.h6
-rw-r--r--src/vm/inlinetracking.h2
-rw-r--r--src/vm/method.hpp4
-rw-r--r--src/vm/rejit.h2
-rw-r--r--src/zap/zapimport.cpp2
-rw-r--r--src/zap/zapinfo.cpp2
-rw-r--r--src/zap/zapmetadata.h2
-rw-r--r--tests/src/Interop/IJW/FakeMscoree/mscoree.cpp10
26 files changed, 108 insertions, 100 deletions
diff --git a/src/debug/daccess/daccess.cpp b/src/debug/daccess/daccess.cpp
index 5ebbe31a54..a5e1387caf 100644
--- a/src/debug/daccess/daccess.cpp
+++ b/src/debug/daccess/daccess.cpp
@@ -6868,7 +6868,7 @@ ClrDataAccess::GetMDImport(const PEFile* peFile, const ReflectionModule* reflect
PVOID mdBaseHost = NULL;
bool isAlternate = false;
- _ASSERTE(peFile == NULL && reflectionModule != NULL || peFile != NULL && reflectionModule == NULL);
+ _ASSERTE((peFile == NULL && reflectionModule != NULL) || (peFile != NULL && reflectionModule == NULL));
TADDR peFileAddr = (peFile != NULL) ? dac_cast<TADDR>(peFile) : dac_cast<TADDR>(reflectionModule);
//
@@ -7507,8 +7507,8 @@ STDAPI CLRDataAccessCreateInstance(ICLRDataTarget * pLegacyTarget,
// This is the legacy entrypoint to DAC, used by dbgeng/dbghelp (windbg, SOS, watson, etc).
//
//----------------------------------------------------------------------------
-DLLEXPORT
STDAPI
+DLLEXPORT
CLRDataCreateInstance(REFIID iid,
ICLRDataTarget * pLegacyTarget,
void ** iface)
diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp
index 828f639010..a008dc1e38 100644
--- a/src/debug/daccess/dacdbiimpl.cpp
+++ b/src/debug/daccess/dacdbiimpl.cpp
@@ -184,8 +184,8 @@ template<class T> void DeleteDbiMemory(T *p)
// Must call Destroy to on interface to free its resources.
//
//---------------------------------------------------------------------------------------
-DLLEXPORT
STDAPI
+DLLEXPORT
DacDbiInterfaceInstance(
ICorDebugDataTarget * pTarget,
CORDB_ADDRESS baseAddress,
diff --git a/src/debug/daccess/dacdbiimpl.h b/src/debug/daccess/dacdbiimpl.h
index e27fe0bb99..ae88efeb33 100644
--- a/src/debug/daccess/dacdbiimpl.h
+++ b/src/debug/daccess/dacdbiimpl.h
@@ -14,14 +14,14 @@
// Prototype for creation functions
-DLLEXPORT
STDAPI
+DLLEXPORT
CLRDataCreateInstance(REFIID iid,
ICLRDataTarget * pLegacyTarget,
void ** iface);
-DLLEXPORT
STDAPI
+DLLEXPORT
DacDbiInterfaceInstance(
ICorDebugDataTarget * pTarget,
CORDB_ADDRESS baseAddress,
diff --git a/src/debug/di/shimpriv.h b/src/debug/di/shimpriv.h
index 279feb978d..0f67cd7bbd 100644
--- a/src/debug/di/shimpriv.h
+++ b/src/debug/di/shimpriv.h
@@ -216,13 +216,13 @@ public:
///
// Implementation of ICorDebugManagedCallback4::BeforeGarbageCollection
- COM_METHOD ShimProxyCallback::BeforeGarbageCollection(ICorDebugProcess* pProcess);
+ COM_METHOD BeforeGarbageCollection(ICorDebugProcess* pProcess);
// Implementation of ICorDebugManagedCallback4::AfterGarbageCollection
- COM_METHOD ShimProxyCallback::AfterGarbageCollection(ICorDebugProcess* pProcess);
+ COM_METHOD AfterGarbageCollection(ICorDebugProcess* pProcess);
// Implementation of ICorDebugManagedCallback4::DataBreakpoint
- COM_METHOD ShimProxyCallback::DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize);
+ COM_METHOD DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize);
};
diff --git a/src/dlls/mscoree/unixinterface.cpp b/src/dlls/mscoree/unixinterface.cpp
index 0769ea464c..0f52afa89d 100644
--- a/src/dlls/mscoree/unixinterface.cpp
+++ b/src/dlls/mscoree/unixinterface.cpp
@@ -137,7 +137,7 @@ static void ConvertConfigPropertiesToUnicode(
#if !defined(FEATURE_MERGE_JIT_AND_ENGINE)
// Reference to the global holding the path to the JIT
-extern "C" LPCWSTR g_CLRJITPath;
+extern LPCWSTR g_CLRJITPath;
#endif // !defined(FEATURE_MERGE_JIT_AND_ENGINE)
#ifdef FEATURE_GDBJIT
diff --git a/src/ilasm/CMakeLists.txt b/src/ilasm/CMakeLists.txt
index f6852e63e8..3bb13ad6d1 100644
--- a/src/ilasm/CMakeLists.txt
+++ b/src/ilasm/CMakeLists.txt
@@ -52,7 +52,7 @@ if(CLR_CMAKE_PLATFORM_UNIX)
# Clang also produces a bad-codegen on this prebuilt file with optimization.
# https://github.com/dotnet/coreclr/issues/2305
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-delete-non-virtual-dtor")
- add_compile_options(-Wno-deprecated-register)
+ add_compile_options(-Wno-register)
add_compile_options(-Wno-array-bounds)
add_compile_options(-Wno-unused-label)
set_source_files_properties( prebuilt/asmparse.cpp PROPERTIES COMPILE_FLAGS "-O0" )
diff --git a/src/ilasm/method.cpp b/src/ilasm/method.cpp
index 8fc300c23a..298fc15fa9 100644
--- a/src/ilasm/method.cpp
+++ b/src/ilasm/method.cpp
@@ -32,7 +32,7 @@ Method::Method(Assembler *pAssembler, Class *pClass, __in __nullterminated char
m_szExportAlias = NULL;
m_dwExportOrdinal = 0xFFFFFFFF;
m_ulLines[0]=m_ulLines[1]=0;
- m_ulColumns[0]=m_ulColumns[0]=0;
+ m_ulColumns[0]=m_ulColumns[1]=0;
m_pbsBody = NULL;
m_fNewBody = TRUE;
m_fNew = TRUE;
diff --git a/src/pal/inc/unixasmmacros.inc b/src/pal/inc/unixasmmacros.inc
index a1f1a694ee..f553840a8d 100644
--- a/src/pal/inc/unixasmmacros.inc
+++ b/src/pal/inc/unixasmmacros.inc
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#define INVALIDGCVALUE 0CCCCCCCDh
+#define INVALIDGCVALUE 0xCCCCCCCD
#if defined(__APPLE__)
#define C_FUNC(name) _##name
diff --git a/src/vm/amd64/jithelpers_fast.S b/src/vm/amd64/jithelpers_fast.S
index 6f955b0bee..9503333619 100644
--- a/src/vm/amd64/jithelpers_fast.S
+++ b/src/vm/amd64/jithelpers_fast.S
@@ -81,14 +81,14 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT
// Update the write watch table if necessary
mov rax, rdi
movabs r10, 0xF0F0F0F0F0F0F0F0
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
NOP_2_BYTE // padding for alignment of constant
movabs r11, 0xF0F0F0F0F0F0F0F0
add rax, r10
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
.byte 0x75, 0x06
// jne CheckCardTable
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
NOP_3_BYTE // padding for alignment of constant
@@ -112,27 +112,27 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT
// Touch the card table entry, if not already dirty.
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable
REPRET
UpdateCardTable:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_2_BYTE // padding for alignment of constant
shr rdi, 0x0A
movabs rax, 0xF0F0F0F0F0F0F0F0
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_WriteWatch_PostGrow64
REPRET
UpdateCardBundle_WriteWatch_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
@@ -312,15 +312,15 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
#ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
// Update the write watch table if necessary
PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, rax
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
je CheckCardTable_ByRefWriteBarrier
mov rax, rdi
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
PREPARE_EXTERNAL_VAR g_sw_ww_table, r10
add rax, qword ptr [r10]
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
jne CheckCardTable_ByRefWriteBarrier
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
#endif
CheckCardTable_ByRefWriteBarrier:
@@ -334,8 +334,8 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
// move current rdi value into rcx and then increment the pointers
mov rcx, rdi
- add rsi, 8h
- add rdi, 8h
+ add rsi, 0x8
+ add rdi, 0x8
// Check if we need to update the card table
// Calc pCardByte
@@ -345,13 +345,13 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
mov rax, [rax]
// Check if this card is dirty
- cmp byte ptr [rcx + rax], 0FFh
+ cmp byte ptr [rcx + rax], 0xFF
jne UpdateCardTable_ByRefWriteBarrier
REPRET
UpdateCardTable_ByRefWriteBarrier:
- mov byte ptr [rcx + rax], 0FFh
+ mov byte ptr [rcx + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
// Shift rcx by 0x0A more to get the card bundle byte (we shifted by 0x0B already)
@@ -361,13 +361,13 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
add rcx, [rax]
// Check if this bundle byte is dirty
- cmp byte ptr [rcx], 0FFh
+ cmp byte ptr [rcx], 0xFF
jne UpdateCardBundle_ByRefWriteBarrier
REPRET
UpdateCardBundle_ByRefWriteBarrier:
- mov byte ptr [rcx], 0FFh
+ mov byte ptr [rcx], 0xFF
#endif
ret
@@ -383,8 +383,8 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
#endif
Exit_ByRefWriteBarrier:
// Increment the pointers before leaving
- add rdi, 8h
- add rsi, 8h
+ add rdi, 0x8
+ add rsi, 0x8
ret
LEAF_END_MARKED JIT_ByRefWriteBarrier, _TEXT
diff --git a/src/vm/amd64/jithelpers_fastwritebarriers.S b/src/vm/amd64/jithelpers_fastwritebarriers.S
index 23c1115165..35bfbef214 100644
--- a/src/vm/amd64/jithelpers_fastwritebarriers.S
+++ b/src/vm/amd64/jithelpers_fastwritebarriers.S
@@ -38,13 +38,13 @@ PATCH_LABEL JIT_WriteBarrier_PreGrow64_Patch_Label_CardTable
// Touch the card table entry, if not already dirty.
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_PreGrow64
REPRET
UpdateCardTable_PreGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_6_BYTE // padding for alignment of constant
@@ -55,14 +55,14 @@ PATCH_LABEL JIT_WriteBarrier_PreGrow64_Patch_Label_CardBundleTable
// Touch the card bundle, if not already dirty.
// rdi is already shifted by 0xB, so shift by 0xA more
shr rdi, 0x0A
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_PreGrow64
REPRET
UpdateCardBundle_PreGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
@@ -123,13 +123,13 @@ PATCH_LABEL JIT_WriteBarrier_PostGrow64_Patch_Label_CardTable
// Touch the card table entry, if not already dirty.
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_PostGrow64
REPRET
UpdateCardTable_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_6_BYTE // padding for alignment of constant
@@ -140,14 +140,14 @@ PATCH_LABEL JIT_WriteBarrier_PostGrow64_Patch_Label_CardBundleTable
// Touch the card bundle, if not already dirty.
// rdi is already shifted by 0xB, so shift by 0xA more
shr rdi, 0x0A
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_PostGrow64
REPRET
UpdateCardBundle_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
@@ -182,13 +182,13 @@ PATCH_LABEL JIT_WriteBarrier_SVR64_PatchLabel_CardTable
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_SVR64
REPRET
UpdateCardTable_SVR64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_6_BYTE // padding for alignment of constant
@@ -198,14 +198,14 @@ PATCH_LABEL JIT_WriteBarrier_SVR64_PatchLabel_CardBundleTable
// Shift the address by 0xA more since already shifted by 0xB
shr rdi, 0x0A
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_SVR64
REPRET
UpdateCardBundle_SVR64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
@@ -236,15 +236,15 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_PreGrow64, _TEXT
mov rax, rdi
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_WriteWatchTable
movabs r10, 0xF0F0F0F0F0F0F0F0
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0x0C // SoftwareWriteWatch::AddressToTableByteIndexShift
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_Lower
movabs r11, 0xF0F0F0F0F0F0F0F0
add rax, r10
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
.byte 0x75, 0x03
// jne CheckCardTable_WriteWatch_PreGrow64
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
CheckCardTable_WriteWatch_PreGrow64:
// Check the lower ephemeral region bound.
@@ -263,13 +263,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_Lower
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardTable
movabs rax, 0xF0F0F0F0F0F0F0F0
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_WriteWatch_PreGrow64
REPRET
UpdateCardTable_WriteWatch_PreGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_2_BYTE // padding for alignment of constant
@@ -277,14 +277,14 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardBundleTable
movabs rax, 0xF0F0F0F0F0F0F0F0
shr rdi, 0x0A
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_WriteWatch_PreGrow64
REPRET
UpdateCardBundle_WriteWatch_PreGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
@@ -314,15 +314,15 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_PostGrow64, _TEXT
mov rax, rdi
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_WriteWatchTable
movabs r10, 0xF0F0F0F0F0F0F0F0
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0x0C // SoftwareWriteWatch::AddressToTableByteIndexShift
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_Lower
movabs r11, 0xF0F0F0F0F0F0F0F0
add rax, r10
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
.byte 0x75, 0x06
// jne CheckCardTable_WriteWatch_PostGrow64
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
NOP_3_BYTE // padding for alignment of constant
@@ -358,13 +358,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardTable
// Touch the card table entry, if not already dirty.
shr rdi, 0x0B
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_WriteWatch_PostGrow64
REPRET
UpdateCardTable_WriteWatch_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP_2_BYTE // padding for alignment of constant
@@ -372,14 +372,14 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardTable
PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardBundleTable
movabs rax, 0xF0F0F0F0F0F0F0F0
- cmp byte ptr [rdi + rax], 0FFh
+ cmp byte ptr [rdi + rax], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_WriteWatch_PostGrow64
REPRET
UpdateCardBundle_WriteWatch_PostGrow64:
- mov byte ptr [rdi + rax], 0FFh
+ mov byte ptr [rdi + rax], 0xFF
#endif
ret
@@ -417,25 +417,25 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_SVR64, _TEXT
mov rax, rdi
PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_WriteWatchTable
movabs r10, 0xF0F0F0F0F0F0F0F0
- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
NOP_2_BYTE // padding for alignment of constant
PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardTable
movabs r11, 0xF0F0F0F0F0F0F0F0
add rax, r10
- cmp byte ptr [rax], 0h
+ cmp byte ptr [rax], 0x0
.byte 0x75, 0x03
// jne CheckCardTable_WriteWatch_SVR64
- mov byte ptr [rax], 0FFh
+ mov byte ptr [rax], 0xFF
CheckCardTable_WriteWatch_SVR64:
shr rdi, 0x0B
- cmp byte ptr [rdi + r11], 0FFh
+ cmp byte ptr [rdi + r11], 0xFF
.byte 0x75, 0x02
// jne UpdateCardTable_WriteWatch_SVR64
REPRET
UpdateCardTable_WriteWatch_SVR64:
- mov byte ptr [rdi + r11], 0FFh
+ mov byte ptr [rdi + r11], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
NOP // padding for alignment of constant
@@ -444,13 +444,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardBundleTable
movabs r11, 0xF0F0F0F0F0F0F0F0
shr rdi, 0x0A
- cmp byte ptr [rdi + r11], 0FFh
+ cmp byte ptr [rdi + r11], 0xFF
.byte 0x75, 0x02
// jne UpdateCardBundle_WriteWatch_SVR64
REPRET
UpdateCardBundle_WriteWatch_SVR64:
- mov byte ptr [rdi + r11], 0FFh
+ mov byte ptr [rdi + r11], 0xFF
#endif
ret
diff --git a/src/vm/amd64/jithelpers_slow.S b/src/vm/amd64/jithelpers_slow.S
index f61b42afc7..aa2e8cc064 100644
--- a/src/vm/amd64/jithelpers_slow.S
+++ b/src/vm/amd64/jithelpers_slow.S
@@ -71,15 +71,15 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT
#ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
// Update the write watch table if necessary
PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, r10
- cmp byte ptr [r10], 0h
+ cmp byte ptr [r10], 0x0
je CheckCardTable_Debug
mov r10, rdi
- shr r10, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift
+ shr r10, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift
PREPARE_EXTERNAL_VAR g_sw_ww_table, r11
add r10, qword ptr [r11]
- cmp byte ptr [r10], 0h
+ cmp byte ptr [r10], 0x0
jne CheckCardTable_Debug
- mov byte ptr [r10], 0FFh
+ mov byte ptr [r10], 0xFF
#endif
CheckCardTable_Debug:
@@ -99,13 +99,13 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT
mov r10, [r10]
// Check if this card is dirty
- cmp byte ptr [rdi + r10], 0FFh
+ cmp byte ptr [rdi + r10], 0xFF
jne UpdateCardTable_Debug
REPRET
UpdateCardTable_Debug:
- mov byte ptr [rdi + r10], 0FFh
+ mov byte ptr [rdi + r10], 0xFF
#ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES
// Shift rdi by 0x0A more to get the card bundle byte (we shifted by 0x0B already)
@@ -115,13 +115,13 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT
add rdi, [r10]
// Check if this bundle byte is dirty
- cmp byte ptr [rdi], 0FFh
+ cmp byte ptr [rdi], 0xFF
jne UpdateCardBundle_Debug
REPRET
UpdateCardBundle_Debug:
- mov byte ptr [rdi], 0FFh
+ mov byte ptr [rdi], 0xFF
#endif
ret
diff --git a/src/vm/amd64/virtualcallstubamd64.S b/src/vm/amd64/virtualcallstubamd64.S
index 59b5b77dba..744aaa11bd 100644
--- a/src/vm/amd64/virtualcallstubamd64.S
+++ b/src/vm/amd64/virtualcallstubamd64.S
@@ -59,19 +59,19 @@ LEAF_ENTRY ResolveWorkerChainLookupAsmStub, _TEXT
jnz Fail_RWCLAS // If the BACKPATCH_FLAGS is set we will go directly to the ResolveWorkerAsmStub
MainLoop_RWCLAS:
- mov rax, [rax+18h] // get the next entry in the chain (don't bother checking the first entry again)
+ mov rax, [rax+0x18] // get the next entry in the chain (don't bother checking the first entry again)
test rax,rax // test if we hit a terminating NULL
jz Fail_RWCLAS
- cmp rdx, [rax+00h] // compare our MT with the one in the ResolveCacheElem
+ cmp rdx, [rax+0x00] // compare our MT with the one in the ResolveCacheElem
jne MainLoop_RWCLAS
- cmp r10, [rax+08h] // compare our DispatchToken with one in the ResolveCacheElem
+ cmp r10, [rax+0x08] // compare our DispatchToken with one in the ResolveCacheElem
jne MainLoop_RWCLAS
Success_RWCLAS:
PREPARE_EXTERNAL_VAR CHAIN_SUCCESS_COUNTER, rdx
sub qword ptr [rdx],1 // decrement success counter
jl Promote_RWCLAS
- mov rax, [rax+10h] // get the ImplTarget
+ mov rax, [rax+0x10] // get the ImplTarget
pop rdx
jmp rax
diff --git a/src/vm/amd64/virtualcallstubcpu.hpp b/src/vm/amd64/virtualcallstubcpu.hpp
index 3c3593f0b9..0d6ca81adb 100644
--- a/src/vm/amd64/virtualcallstubcpu.hpp
+++ b/src/vm/amd64/virtualcallstubcpu.hpp
@@ -509,7 +509,7 @@ struct VTableCallHolder
return 3 + (offsetOfIndirection >= 0x80 ? 7 : 4) + (offsetAfterIndirection >= 0x80 ? 6 : 3) + 4;
}
- static VTableCallHolder* VTableCallHolder::FromVTableCallEntry(PCODE entry) { LIMITED_METHOD_CONTRACT; return (VTableCallHolder*)entry; }
+ static VTableCallHolder* FromVTableCallEntry(PCODE entry) { LIMITED_METHOD_CONTRACT; return (VTableCallHolder*)entry; }
private:
// VTableCallStub follows here. It is dynamically sized on allocation because it could
@@ -732,13 +732,13 @@ void ResolveHolder::InitializeStatic()
resolveInit.part4 [2] = 0x50;
resolveInit.mtOffset = offsetof(ResolveCacheElem,pMT) & 0xFF;
resolveInit.part5 [0] = 0x75;
- resolveInit.toMiss1 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1) & 0xFF;
+ resolveInit.toMiss1 = (offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1)) & 0xFF;
resolveInit.part6 [0] = 0x4C;
resolveInit.part6 [1] = 0x3B;
resolveInit.part6 [2] = 0x50;
resolveInit.tokenOffset = offsetof(ResolveCacheElem,token) & 0xFF;
resolveInit.part7 [0] = 0x75;
- resolveInit.toMiss2 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1) & 0xFF;
+ resolveInit.toMiss2 = (offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1)) & 0xFF;
resolveInit.part8 [0] = 0x48;
resolveInit.part8 [1] = 0x8B;
resolveInit.part8 [2] = 0x40;
diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp
index 0c596e3051..97b6a38366 100644
--- a/src/vm/codeman.cpp
+++ b/src/vm/codeman.cpp
@@ -1547,7 +1547,7 @@ JIT_LOAD_DATA g_JitLoadData;
#if !defined(FEATURE_MERGE_JIT_AND_ENGINE)
// Global that holds the path to custom JIT location
-extern "C" LPCWSTR g_CLRJITPath = nullptr;
+LPCWSTR g_CLRJITPath = nullptr;
#endif // !defined(FEATURE_MERGE_JIT_AND_ENGINE)
diff --git a/src/vm/codeversion.h b/src/vm/codeversion.h
index 821c938788..50c9a05bd3 100644
--- a/src/vm/codeversion.h
+++ b/src/vm/codeversion.h
@@ -109,7 +109,7 @@ private:
union
{
PTR_NativeCodeVersionNode m_pVersionNode;
- struct SyntheticStorage
+ struct
{
PTR_MethodDesc m_pMethodDesc;
} m_synthetic;
@@ -207,7 +207,7 @@ private:
union
{
PTR_ILCodeVersionNode m_pVersionNode;
- struct SyntheticStorage
+ struct
{
PTR_Module m_pModule;
mdMethodDef m_methodDef;
diff --git a/src/vm/crossloaderallocatorhash.inl b/src/vm/crossloaderallocatorhash.inl
index 51bce4e1ae..a8851da916 100644
--- a/src/vm/crossloaderallocatorhash.inl
+++ b/src/vm/crossloaderallocatorhash.inl
@@ -201,7 +201,7 @@ template <class TKey_, class TValue_>
/*static*/ inline INT32 GCHeapHashDependentHashTrackerHashTraits::Hash(PtrTypeKey *pValue)
{
LIMITED_METHOD_CONTRACT;
- return (INT32)*pValue;
+ return (INT32)(SIZE_T)*pValue;
}
/*static*/ inline INT32 GCHeapHashDependentHashTrackerHashTraits::Hash(PTRARRAYREF arr, INT32 index)
@@ -274,7 +274,7 @@ template <class TKey>
/*static*/ INT32 KeyToValuesGCHeapHashTraits<TRAITS>::Hash(TKey *pValue)
{
LIMITED_METHOD_CONTRACT;
- return (INT32)(DWORD)*pValue;
+ return (INT32)(SIZE_T)*pValue;
}
template<class TRAITS>
@@ -924,7 +924,7 @@ template <class Visitor>
WRAPPER_NO_CONTRACT;
m_pKeysToValueHash->GetElement(index, *m_pKeyValueStore);
- return VisitKeyValueStore(m_pLoaderAllocatorRef, m_pKeyValueStore, visitor);
+ return VisitKeyValueStore(m_pLoaderAllocatorRef, m_pKeyValueStore, m_pVisitor);
}
};
diff --git a/src/vm/dataimage.cpp b/src/vm/dataimage.cpp
index 108c6df855..53a32b57cc 100644
--- a/src/vm/dataimage.cpp
+++ b/src/vm/dataimage.cpp
@@ -628,7 +628,7 @@ void DataImage::SaveRvaStructure()
// rvaInfo->size are monotonically decreasing if rva are the same.
_ASSERTE(previousRvaInfo==NULL ||
previousRvaInfo->rva < rvaInfo->rva ||
- previousRvaInfo->rva == rvaInfo->rva && previousRvaInfo->size >= rvaInfo->size
+ ((previousRvaInfo->rva == rvaInfo->rva) && (previousRvaInfo->size >= rvaInfo->size))
);
if (previousRvaInfo==NULL || previousRvaInfo->rva != rvaInfo->rva) {
diff --git a/src/vm/eventpipebuffermanager.cpp b/src/vm/eventpipebuffermanager.cpp
index 5355260fa1..4194abc73c 100644
--- a/src/vm/eventpipebuffermanager.cpp
+++ b/src/vm/eventpipebuffermanager.cpp
@@ -10,11 +10,11 @@
#ifdef FEATURE_PERFTRACING
-#ifndef __llvm__
+#ifndef __GNUC__
__declspec(thread) ThreadEventBufferList ThreadEventBufferList::gCurrentThreadEventBufferList;
-#else // !__llvm__
+#else // !__GNUC__
thread_local ThreadEventBufferList ThreadEventBufferList::gCurrentThreadEventBufferList;
-#endif // !__llvm__
+#endif // !__GNUC__
EventPipeBufferManager::EventPipeBufferManager()
{
diff --git a/src/vm/eventpipebuffermanager.h b/src/vm/eventpipebuffermanager.h
index 386a54b850..e10018fe8e 100644
--- a/src/vm/eventpipebuffermanager.h
+++ b/src/vm/eventpipebuffermanager.h
@@ -21,11 +21,11 @@ class EventPipeBufferList;
// when the thread dies so we can free EventPipeBufferList in the destructor.
class ThreadEventBufferList
{
-#ifndef __llvm__
+#ifndef __GNUC__
__declspec(thread) static ThreadEventBufferList gCurrentThreadEventBufferList;
-#else // !__llvm__
+#else // !__GNUC__
thread_local static ThreadEventBufferList gCurrentThreadEventBufferList;
-#endif // !__llvm__
+#endif // !__GNUC__
EventPipeBufferList * m_pThreadEventBufferList = NULL;
~ThreadEventBufferList();
diff --git a/src/vm/inlinetracking.h b/src/vm/inlinetracking.h
index 976a0e72db..e885f1bb00 100644
--- a/src/vm/inlinetracking.h
+++ b/src/vm/inlinetracking.h
@@ -106,7 +106,7 @@ public:
static count_t Hash(key_t k)
{
LIMITED_METHOD_DAC_CONTRACT;
- return ((count_t)k.m_methodDef ^ (count_t)k.m_module);
+ return ((count_t)k.m_methodDef ^ (count_t)(SIZE_T)k.m_module);
}
static const element_t Null()
{
diff --git a/src/vm/method.hpp b/src/vm/method.hpp
index c99981619d..096dcc4b99 100644
--- a/src/vm/method.hpp
+++ b/src/vm/method.hpp
@@ -1396,7 +1396,7 @@ private:
void RecordAndBackpatchEntryPointSlot_Locked(LoaderAllocator *mdLoaderAllocator, LoaderAllocator *slotLoaderAllocator, TADDR slot, EntryPointSlots::SlotType slotType, PCODE currentEntryPoint);
public:
- void MethodDesc::BackpatchEntryPointSlots(PCODE entryPoint)
+ void BackpatchEntryPointSlots(PCODE entryPoint)
{
WRAPPER_NO_CONTRACT;
_ASSERTE(entryPoint != GetPrestubEntryPointToBackpatch());
@@ -1405,7 +1405,7 @@ public:
BackpatchEntryPointSlots(entryPoint, false /* isPrestubEntryPoint */);
}
- void MethodDesc::BackpatchToResetEntryPointSlots()
+ void BackpatchToResetEntryPointSlots()
{
WRAPPER_NO_CONTRACT;
_ASSERTE(MayHaveEntryPointSlotsToBackpatch());
diff --git a/src/vm/rejit.h b/src/vm/rejit.h
index 8401ecb960..7dce99d252 100644
--- a/src/vm/rejit.h
+++ b/src/vm/rejit.h
@@ -150,7 +150,7 @@ private:
typedef CodeVersionManager * key_t;
static key_t GetKey(const element_t &e) { return e->m_pCodeVersionManager; }
static BOOL Equals(key_t k1, key_t k2) { return (k1 == k2); }
- static count_t Hash(key_t k) { return (count_t)k; }
+ static count_t Hash(key_t k) { return (count_t)(SIZE_T)k; }
static bool IsNull(const element_t &e) { return (e == NULL); }
};
diff --git a/src/zap/zapimport.cpp b/src/zap/zapimport.cpp
index 9d8eec16e2..887996475c 100644
--- a/src/zap/zapimport.cpp
+++ b/src/zap/zapimport.cpp
@@ -1674,7 +1674,7 @@ public:
CORCOMPILE_FIXUP_BLOB_KIND GetKind()
{
- int kind = (int)GetHandle();
+ int kind = (int)(SIZE_T)GetHandle();
if ((kind & 1) == 1)
{
diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp
index 8a372828f0..ccb796da9c 100644
--- a/src/zap/zapinfo.cpp
+++ b/src/zap/zapinfo.cpp
@@ -734,7 +734,7 @@ COUNT_T ZapImage::MethodCodeTraits::Hash(key_t k)
case ZapNodeType_Import_ClassHandle:
case ZapNodeType_MethodHandle:
case ZapNodeType_Import_MethodHandle:
- hash = ((hash << 5) + hash) ^ (COUNT_T)(pTarget);
+ hash = ((hash << 5) + hash) ^ (COUNT_T)((SIZE_T)pTarget);
break;
default:
break;
diff --git a/src/zap/zapmetadata.h b/src/zap/zapmetadata.h
index 5ef6bd4dc3..358db8ea40 100644
--- a/src/zap/zapmetadata.h
+++ b/src/zap/zapmetadata.h
@@ -209,7 +209,7 @@ private:
static count_t Hash(key_t k)
{
LIMITED_METHOD_CONTRACT;
- return (count_t)k;
+ return (count_t)(SIZE_T)k;
}
static element_t Null() { LIMITED_METHOD_CONTRACT; return NULL; }
diff --git a/tests/src/Interop/IJW/FakeMscoree/mscoree.cpp b/tests/src/Interop/IJW/FakeMscoree/mscoree.cpp
index 49470d3865..99319ec28b 100644
--- a/tests/src/Interop/IJW/FakeMscoree/mscoree.cpp
+++ b/tests/src/Interop/IJW/FakeMscoree/mscoree.cpp
@@ -4,8 +4,16 @@
#include <windows.h>
+#ifndef DLLEXPORT
+#ifdef _MSC_VER
+#define DLLEXPORT __declspec(dllexport)
+#else
+#define DLLEXPORT __attribute__((visibility("default")))
+#endif
+#endif
+
// Entrypoint jumped to by IJW dlls when their dllmain is called
-extern "C" __declspec(dllexport) BOOL WINAPI _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved)
+extern "C" DLLEXPORT BOOL WINAPI _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved)
{
return TRUE;
}