Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

GCC compatibility fixes #7 #22810

Merged
merged 13 commits into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/debug/daccess/daccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

//
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/debug/daccess/dacdbiimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/debug/di/shimpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ class ShimProxyCallback :
///

// 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);
};


Expand Down
2 changes: 1 addition & 1 deletion src/dlls/mscoree/unixinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ilasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down
2 changes: 1 addition & 1 deletion src/ilasm/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/pal/inc/unixasmmacros.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions src/vm/amd64/jithelpers_fast.S
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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

Expand Down
Loading