Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SELECTANY usage #39532

Merged
merged 1 commit into from
Jul 18, 2020
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
2 changes: 1 addition & 1 deletion src/coreclr/src/debug/inc/amd64/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ inline CORDB_ADDRESS GetPatchEndAddr(CORDB_ADDRESS patchAddr)
CORDbgInsertBreakpoint((CORDB_ADDRESS_TYPE *)((_buffer) + ((_patchAddr) - (_requestedAddr))));


SELECTANY const CorDebugRegister g_JITToCorDbgReg[] =
constexpr CorDebugRegister g_JITToCorDbgReg[] =
{
REGISTER_AMD64_RAX,
REGISTER_AMD64_RCX,
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/debug/inc/arm/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ inline T _ClearThumbBit(T addr)
CORDbgInsertBreakpointExImpl((CORDB_ADDRESS_TYPE *)((_buffer) + (_ClearThumbBit(_patchAddr) - (_requestedAddr))));


SELECTANY const CorDebugRegister g_JITToCorDbgReg[] =
constexpr CorDebugRegister g_JITToCorDbgReg[] =
{
REGISTER_ARM_R0,
REGISTER_ARM_R1,
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/debug/inc/arm64/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ inline CORDB_ADDRESS GetPatchEndAddr(CORDB_ADDRESS patchAddr)
CORDbgInsertBreakpointExImpl((CORDB_ADDRESS_TYPE *)((_buffer) + (_patchAddr) - (_requestedAddr)));


SELECTANY const CorDebugRegister g_JITToCorDbgReg[] =
constexpr CorDebugRegister g_JITToCorDbgReg[] =
{
REGISTER_ARM64_X0,
REGISTER_ARM64_X1,
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/debug/inc/dbgipcevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ struct MSLAYOUT IPCEventTypeNameMapping
const char * eventName;
};

extern const IPCEventTypeNameMapping DECLSPEC_SELECTANY DbgIPCEventTypeNames[] =
constexpr IPCEventTypeNameMapping DbgIPCEventTypeNames[] =
{
#define IPC_EVENT_TYPE0(type, val) { type, #type },
#define IPC_EVENT_TYPE1(type, val) { type, #type },
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/debug/inc/i386/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ inline CORDB_ADDRESS GetPatchEndAddr(CORDB_ADDRESS patchAddr)
CORDbgInsertBreakpoint((CORDB_ADDRESS_TYPE *)((_buffer) + ((_patchAddr) - (_requestedAddr))));


SELECTANY const CorDebugRegister g_JITToCorDbgReg[] =
constexpr CorDebugRegister g_JITToCorDbgReg[] =
{
REGISTER_X86_EAX,
REGISTER_X86_ECX,
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/src/dlls/mscorpe/stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// fixed up by the loader when the image is paged in.
//*****************************************************************************

SELECTANY const BYTE ExeMainX86Template[] =
constexpr BYTE ExeMainX86Template[] =
{
// Jump through IAT to _CorExeMain
0xFF, 0x25, // jmp [iat:_CorDllMain entry]
Expand All @@ -51,7 +51,7 @@ SELECTANY const BYTE ExeMainX86Template[] =
// fixed up by the loader when the image is paged in.
//*****************************************************************************

SELECTANY const BYTE DllMainX86Template[] =
constexpr BYTE DllMainX86Template[] =
{
// Jump through IAT to CorDllMain
0xFF, 0x25, // jmp [iat:_CorDllMain entry]
Expand All @@ -74,7 +74,7 @@ SELECTANY const BYTE DllMainX86Template[] =
// fixed up by the loader when the image is paged in.
//*****************************************************************************

SELECTANY const BYTE ExeMainAMD64Template[] =
constexpr BYTE ExeMainAMD64Template[] =
{
// Jump through IAT to _CorExeMain
0x48, 0xA1, // rex.w rex.b mov rax,[following address]
Expand All @@ -98,7 +98,7 @@ SELECTANY const BYTE ExeMainAMD64Template[] =
// fixed up by the loader when the image is paged in.
//*****************************************************************************

SELECTANY const BYTE DllMainAMD64Template[] =
constexpr BYTE DllMainAMD64Template[] =
{
// Jump through IAT to CorDllMain
0x48, 0xA1, // rex.w rex.b mov rax,[following address]
Expand All @@ -120,7 +120,7 @@ SELECTANY const BYTE DllMainAMD64Template[] =
// We set the value of gp to point at the iat table entry for _CorExeMain
//*****************************************************************************

SELECTANY const BYTE ExeMainIA64Template[] =
constexpr BYTE ExeMainIA64Template[] =
{
// ld8 r9 = [gp] ;;
// ld8 r10 = [r9],8
Expand Down Expand Up @@ -148,7 +148,7 @@ SELECTANY const BYTE ExeMainIA64Template[] =
// We set the value of gp to point at the iat table entry for _CorExeMain
//*****************************************************************************

SELECTANY const BYTE DllMainIA64Template[] =
constexpr BYTE DllMainIA64Template[] =
{
// ld8 r9 = [gp] ;;
// ld8 r10 = [r9],8
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/src/inc/clr/fs/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#define _clr_fs_Path_h_

#include "clrtypes.h"
#include "cor.h" // SELECTANY

#include "strsafe.h"

Expand Down
10 changes: 1 addition & 9 deletions src/coreclr/src/inc/cor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2093,15 +2093,7 @@ inline ULONG CorSigUncompressData( // return number of bytes of that compre
}


#if !defined(SELECTANY)
#if defined(__GNUC__)
#define SELECTANY extern __attribute__((weak))
#else
#define SELECTANY extern __declspec(selectany)
#endif
#endif

SELECTANY const mdToken g_tkCorEncodeToken[4] ={mdtTypeDef, mdtTypeRef, mdtTypeSpec, mdtBaseType};
constexpr mdToken g_tkCorEncodeToken[4] ={mdtTypeDef, mdtTypeRef, mdtTypeSpec, mdtBaseType};

// uncompress a token
inline mdToken CorSigUncompressToken( // return the token.
Expand Down
10 changes: 1 addition & 9 deletions src/coreclr/src/inc/corinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,7 @@ TODO: Talk about initializing strutures before use
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////

#if !defined(SELECTANY)
#if defined(__GNUC__)
#define SELECTANY extern __attribute__((weak))
#else
#define SELECTANY extern __declspec(selectany)
#endif
#endif

SELECTANY const GUID JITEEVersionIdentifier = { /* 7af97117-55be-4c76-afb2-e26261cb140e */
constexpr GUID JITEEVersionIdentifier = { /* 7af97117-55be-4c76-afb2-e26261cb140e */
0x7af97117,
0x55be,
0x4c76,
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/src/inc/delayloadhelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace DelayLoad
#define DELAY_LOADED_MODULE(DLL_NAME) \
namespace DelayLoad { \
namespace Modules { \
SELECTANY Module DLL_NAME = { L#DLL_NAME W(".dll"), nullptr, S_OK, false }; \
constexpr Module DLL_NAME = { L#DLL_NAME W(".dll"), nullptr, S_OK, false }; \
} \
}

Expand Down Expand Up @@ -104,7 +104,7 @@ namespace DelayLoad
DELAY_LOADED_MODULE(DLL_NAME) \
namespace DelayLoad { \
namespace DLL_NAME { \
SELECTANY Function FUNC_NAME = { &Modules::##DLL_NAME, #FUNC_NAME, nullptr, S_OK, false }; \
constexpr Function FUNC_NAME = { &Modules::##DLL_NAME, #FUNC_NAME, nullptr, S_OK, false }; \
} \
}

Expand Down
20 changes: 0 additions & 20 deletions src/coreclr/src/inc/palclr.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,26 +485,6 @@
#define PAL_CPP_CATCH_EXCEPTION_NOARG catch (Exception *)


// SELECTANY macro is intended to prevent duplication of static const
// arrays declared in .h files in binary modules.
// The problem is that const variables have static internal linkage
// in C++. That means that if a const variable is declared in a .h file
// the compiler will emit it into every translation unit that uses that .h file.
// That will cause duplication of the data when those translation units
// are linked into a binary module.
// SELECTANY declares a variable as extern to give it external linkage
// and it provides __declspec(selectany) to instruct the linker to merge
// duplicate external const static data copies into one.
//
#if defined(SOURCE_FORMATTING)
#define SELECTANY extern
#else
#if defined(__GNUC__)
#define SELECTANY extern __attribute__((weak))
#else
#define SELECTANY extern __declspec(selectany)
#endif
#endif
#if defined(SOURCE_FORMATTING)
#define __annotation(x)
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/src/inc/simplerhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class DefaultSimplerHashBehavior
class PrimeInfo
{
public:
PrimeInfo() : prime(0), magic(0), shift(0) {}
PrimeInfo(unsigned p, unsigned m, unsigned s) : prime(p), magic(m), shift(s) {}
constexpr PrimeInfo() : prime(0), magic(0), shift(0) {}
constexpr PrimeInfo(unsigned p, unsigned m, unsigned s) : prime(p), magic(m), shift(s) {}
unsigned prime;
unsigned magic;
unsigned shift;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/inc/simplerhash.inl
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void SimplerHashTable<Key,KeyFuncs,Value,Behavior>::Reallocate(unsigned newTable
// 32-bit magic numbers, (because the algorithm for using 33-bit magic numbers is slightly slower).
//

SELECTANY const PrimeInfo primeInfo[] =
constexpr PrimeInfo primeInfo[] =
{
PrimeInfo(9, 0x38e38e39, 1),
PrimeInfo(23, 0xb21642c9, 4),
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/src/inc/utilcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -4071,13 +4071,13 @@ HRESULT GetImageRuntimeVersionString(PVOID pMetaData, LPCSTR* pString);
// The registry keys and values that contain the information regarding
// the default registered unmanaged debugger.
//*****************************************************************************
SELECTANY const WCHAR kDebugApplicationsPoliciesKey[] = W("SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Error Reporting\\DebugApplications");
SELECTANY const WCHAR kDebugApplicationsKey[] = W("SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\DebugApplications");
constexpr WCHAR kDebugApplicationsPoliciesKey[] = W("SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Error Reporting\\DebugApplications");
constexpr WCHAR kDebugApplicationsKey[] = W("SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\DebugApplications");

SELECTANY const WCHAR kUnmanagedDebuggerKey[] = W("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug");
SELECTANY const WCHAR kUnmanagedDebuggerValue[] = W("Debugger");
SELECTANY const WCHAR kUnmanagedDebuggerAutoValue[] = W("Auto");
SELECTANY const WCHAR kUnmanagedDebuggerAutoExclusionListKey[] = W("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\AutoExclusionList");
constexpr WCHAR kUnmanagedDebuggerKey[] = W("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug");
constexpr WCHAR kUnmanagedDebuggerValue[] = W("Debugger");
constexpr WCHAR kUnmanagedDebuggerAutoValue[] = W("Auto");
constexpr WCHAR kUnmanagedDebuggerAutoExclusionListKey[] = W("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\AutoExclusionList");

BOOL GetRegistryLongValue(HKEY hKeyParent, // Parent key.
LPCWSTR szKey, // Key name to look at.
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/src/jit/_typeinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ enum ti_types
namespace
{
#endif // _MSC_VER
SELECTANY const char* g_ti_type_names_map[] = {
constexpr char* g_ti_type_names_map[] = {
#define DEF_TI(ti, nm) nm,
#include "titypes.h"
#undef DEF_TI
Expand All @@ -57,7 +57,7 @@ SELECTANY const char* g_ti_type_names_map[] = {
namespace
{
#endif // _MSC_VER
SELECTANY const ti_types g_jit_types_map[] = {
constexpr ti_types g_jit_types_map[] = {
#define DEF_TP(tn, nm, jitType, verType, sz, sze, asze, st, al, tf, howUsed) verType,
#include "typelist.h"
#undef DEF_TP
Expand Down Expand Up @@ -92,7 +92,7 @@ inline ti_types varType2tiType(var_types type)
namespace
{
#endif // _MSC_VER
SELECTANY const ti_types g_ti_types_map[CORINFO_TYPE_COUNT] = {
constexpr ti_types g_ti_types_map[CORINFO_TYPE_COUNT] = {
// see the definition of enum CorInfoType in file inc/corinfo.h
TI_ERROR, // CORINFO_TYPE_UNDEF = 0x0,
TI_ERROR, // CORINFO_TYPE_VOID = 0x1,
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/src/jit/jithashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ class JitHashTableBehavior
class JitPrimeInfo
{
public:
JitPrimeInfo() : prime(0), magic(0), shift(0)
constexpr JitPrimeInfo() : prime(0), magic(0), shift(0)
{
}
JitPrimeInfo(unsigned p, unsigned m, unsigned s) : prime(p), magic(m), shift(s)
constexpr JitPrimeInfo(unsigned p, unsigned m, unsigned s) : prime(p), magic(m), shift(s)
{
}
unsigned prime;
Expand Down Expand Up @@ -92,7 +92,7 @@ class JitPrimeInfo
// 32-bit magic numbers, (because the algorithm for using 33-bit magic numbers is slightly slower).

// clang-format off
SELECTANY const JitPrimeInfo jitPrimeInfo[]
constexpr JitPrimeInfo jitPrimeInfo[]
{
JitPrimeInfo(9, 0x38e38e39, 1),
JitPrimeInfo(23, 0xb21642c9, 4),
Expand Down
40 changes: 20 additions & 20 deletions src/coreclr/src/jit/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,10 @@ typedef unsigned char regNumberSmall;
#define REG_ARG_0 REG_ECX
#define REG_ARG_1 REG_EDX

SELECTANY const regNumber intArgRegs [] = {REG_ECX, REG_EDX};
SELECTANY const regMaskTP intArgMasks[] = {RBM_ECX, RBM_EDX};
SELECTANY const regNumber fltArgRegs [] = {REG_XMM0, REG_XMM1, REG_XMM2, REG_XMM3};
SELECTANY const regMaskTP fltArgMasks[] = {RBM_XMM0, RBM_XMM1, RBM_XMM2, RBM_XMM3};
constexpr regNumber intArgRegs [] = {REG_ECX, REG_EDX};
constexpr regMaskTP intArgMasks[] = {RBM_ECX, RBM_EDX};
constexpr regNumber fltArgRegs [] = {REG_XMM0, REG_XMM1, REG_XMM2, REG_XMM3};
constexpr regMaskTP fltArgMasks[] = {RBM_XMM0, RBM_XMM1, RBM_XMM2, RBM_XMM3};

#define RBM_ARG_0 RBM_ECX
#define RBM_ARG_1 RBM_EDX
Expand Down Expand Up @@ -779,10 +779,10 @@ typedef unsigned char regNumberSmall;
#define REG_ARG_4 REG_R8
#define REG_ARG_5 REG_R9

SELECTANY const regNumber intArgRegs [] = { REG_EDI, REG_ESI, REG_EDX, REG_ECX, REG_R8, REG_R9 };
SELECTANY const regMaskTP intArgMasks[] = { RBM_EDI, RBM_ESI, RBM_EDX, RBM_ECX, RBM_R8, RBM_R9 };
SELECTANY const regNumber fltArgRegs [] = { REG_XMM0, REG_XMM1, REG_XMM2, REG_XMM3, REG_XMM4, REG_XMM5, REG_XMM6, REG_XMM7 };
SELECTANY const regMaskTP fltArgMasks[] = { RBM_XMM0, RBM_XMM1, RBM_XMM2, RBM_XMM3, RBM_XMM4, RBM_XMM5, RBM_XMM6, RBM_XMM7 };
constexpr regNumber intArgRegs [] = { REG_EDI, REG_ESI, REG_EDX, REG_ECX, REG_R8, REG_R9 };
constexpr regMaskTP intArgMasks[] = { RBM_EDI, RBM_ESI, RBM_EDX, RBM_ECX, RBM_R8, RBM_R9 };
constexpr regNumber fltArgRegs [] = { REG_XMM0, REG_XMM1, REG_XMM2, REG_XMM3, REG_XMM4, REG_XMM5, REG_XMM6, REG_XMM7 };
constexpr regMaskTP fltArgMasks[] = { RBM_XMM0, RBM_XMM1, RBM_XMM2, RBM_XMM3, RBM_XMM4, RBM_XMM5, RBM_XMM6, RBM_XMM7 };

#define RBM_ARG_0 RBM_RDI
#define RBM_ARG_1 RBM_RSI
Expand All @@ -802,10 +802,10 @@ typedef unsigned char regNumberSmall;
#define REG_ARG_2 REG_R8
#define REG_ARG_3 REG_R9

SELECTANY const regNumber intArgRegs [] = { REG_ECX, REG_EDX, REG_R8, REG_R9 };
SELECTANY const regMaskTP intArgMasks[] = { RBM_ECX, RBM_EDX, RBM_R8, RBM_R9 };
SELECTANY const regNumber fltArgRegs [] = { REG_XMM0, REG_XMM1, REG_XMM2, REG_XMM3 };
SELECTANY const regMaskTP fltArgMasks[] = { RBM_XMM0, RBM_XMM1, RBM_XMM2, RBM_XMM3 };
constexpr regNumber intArgRegs [] = { REG_ECX, REG_EDX, REG_R8, REG_R9 };
constexpr regMaskTP intArgMasks[] = { RBM_ECX, RBM_EDX, RBM_R8, RBM_R9 };
constexpr regNumber fltArgRegs [] = { REG_XMM0, REG_XMM1, REG_XMM2, REG_XMM3 };
constexpr regMaskTP fltArgMasks[] = { RBM_XMM0, RBM_XMM1, RBM_XMM2, RBM_XMM3 };

#define RBM_ARG_0 RBM_ECX
#define RBM_ARG_1 RBM_EDX
Expand Down Expand Up @@ -1152,8 +1152,8 @@ typedef unsigned char regNumberSmall;
#define REG_ARG_2 REG_R2
#define REG_ARG_3 REG_R3

SELECTANY const regNumber intArgRegs [] = {REG_R0, REG_R1, REG_R2, REG_R3};
SELECTANY const regMaskTP intArgMasks[] = {RBM_R0, RBM_R1, RBM_R2, RBM_R3};
constexpr regNumber intArgRegs [] = {REG_R0, REG_R1, REG_R2, REG_R3};
constexpr regMaskTP intArgMasks[] = {RBM_R0, RBM_R1, RBM_R2, RBM_R3};

#define RBM_ARG_0 RBM_R0
#define RBM_ARG_1 RBM_R1
Expand All @@ -1164,8 +1164,8 @@ typedef unsigned char regNumberSmall;
#define RBM_FLTARG_REGS (RBM_F0|RBM_F1|RBM_F2|RBM_F3|RBM_F4|RBM_F5|RBM_F6|RBM_F7|RBM_F8|RBM_F9|RBM_F10|RBM_F11|RBM_F12|RBM_F13|RBM_F14|RBM_F15)
#define RBM_DBL_REGS RBM_ALLDOUBLE

SELECTANY const regNumber fltArgRegs [] = {REG_F0, REG_F1, REG_F2, REG_F3, REG_F4, REG_F5, REG_F6, REG_F7, REG_F8, REG_F9, REG_F10, REG_F11, REG_F12, REG_F13, REG_F14, REG_F15 };
SELECTANY const regMaskTP fltArgMasks[] = {RBM_F0, RBM_F1, RBM_F2, RBM_F3, RBM_F4, RBM_F5, RBM_F6, RBM_F7, RBM_F8, RBM_F9, RBM_F10, RBM_F11, RBM_F12, RBM_F13, RBM_F14, RBM_F15 };
constexpr regNumber fltArgRegs [] = {REG_F0, REG_F1, REG_F2, REG_F3, REG_F4, REG_F5, REG_F6, REG_F7, REG_F8, REG_F9, REG_F10, REG_F11, REG_F12, REG_F13, REG_F14, REG_F15 };
constexpr regMaskTP fltArgMasks[] = {RBM_F0, RBM_F1, RBM_F2, RBM_F3, RBM_F4, RBM_F5, RBM_F6, RBM_F7, RBM_F8, RBM_F9, RBM_F10, RBM_F11, RBM_F12, RBM_F13, RBM_F14, RBM_F15 };

#define LBL_DIST_SMALL_MAX_NEG (0)
#define LBL_DIST_SMALL_MAX_POS (+1020)
Expand Down Expand Up @@ -1486,8 +1486,8 @@ typedef unsigned char regNumberSmall;
#define REG_ARG_6 REG_R6
#define REG_ARG_7 REG_R7

SELECTANY const regNumber intArgRegs [] = {REG_R0, REG_R1, REG_R2, REG_R3, REG_R4, REG_R5, REG_R6, REG_R7};
SELECTANY const regMaskTP intArgMasks[] = {RBM_R0, RBM_R1, RBM_R2, RBM_R3, RBM_R4, RBM_R5, RBM_R6, RBM_R7};
constexpr regNumber intArgRegs [] = {REG_R0, REG_R1, REG_R2, REG_R3, REG_R4, REG_R5, REG_R6, REG_R7};
constexpr regMaskTP intArgMasks[] = {RBM_R0, RBM_R1, RBM_R2, RBM_R3, RBM_R4, RBM_R5, RBM_R6, RBM_R7};

#define RBM_ARG_0 RBM_R0
#define RBM_ARG_1 RBM_R1
Expand Down Expand Up @@ -1519,8 +1519,8 @@ typedef unsigned char regNumberSmall;
#define RBM_ARG_REGS (RBM_ARG_0|RBM_ARG_1|RBM_ARG_2|RBM_ARG_3|RBM_ARG_4|RBM_ARG_5|RBM_ARG_6|RBM_ARG_7)
#define RBM_FLTARG_REGS (RBM_FLTARG_0|RBM_FLTARG_1|RBM_FLTARG_2|RBM_FLTARG_3|RBM_FLTARG_4|RBM_FLTARG_5|RBM_FLTARG_6|RBM_FLTARG_7)

SELECTANY const regNumber fltArgRegs [] = {REG_V0, REG_V1, REG_V2, REG_V3, REG_V4, REG_V5, REG_V6, REG_V7 };
SELECTANY const regMaskTP fltArgMasks[] = {RBM_V0, RBM_V1, RBM_V2, RBM_V3, RBM_V4, RBM_V5, RBM_V6, RBM_V7 };
constexpr regNumber fltArgRegs [] = {REG_V0, REG_V1, REG_V2, REG_V3, REG_V4, REG_V5, REG_V6, REG_V7 };
constexpr regMaskTP fltArgMasks[] = {RBM_V0, RBM_V1, RBM_V2, RBM_V3, RBM_V4, RBM_V5, RBM_V6, RBM_V7 };

#define LBL_DIST_SMALL_MAX_NEG (-1048576)
#define LBL_DIST_SMALL_MAX_POS (+1048575)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/pal/inc/rt/guiddef.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#ifdef INITGUID
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
EXTERN_C DLLEXPORT const GUID DECLSPEC_SELECTANY name \
EXTERN_C DLLEXPORT constexpr GUID name \
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#else
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/src/pal/inc/rt/palrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ inline void *__cdecl operator new(size_t, void *_P)
#define THIS void

#define DECLSPEC_NOVTABLE
#define DECLSPEC_SELECTANY __attribute__((weak))

#define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface
#define DECLARE_INTERFACE_(iface, baseiface) interface DECLSPEC_NOVTABLE iface : public baseiface
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/pal/inc/rt/rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define MIDL_INTERFACE(x) struct DECLSPEC_UUID(x) DECLSPEC_NOVTABLE

#define EXTERN_GUID(itf,l1,s1,s2,c1,c2,c3,c4,c5,c6,c7,c8) \
EXTERN_C const IID DECLSPEC_SELECTANY itf = {l1,s1,s2,{c1,c2,c3,c4,c5,c6,c7,c8}}
constexpr IID itf = {l1,s1,s2,{c1,c2,c3,c4,c5,c6,c7,c8}}

interface IRpcStubBuffer;
interface IRpcChannelBuffer;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/scripts/genEtwProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def genEtwMacroHeader(manifest, exclusion_filename, intermediate):

header_file.write("#define NO_OF_ETW_PROVIDERS " + str(numOfProviders) + "\n")
header_file.write("#define MAX_BYTES_PER_ETW_PROVIDER " + str(nMaxEventBytesPerProvider) + "\n")
header_file.write("EXTERN_C SELECTANY const BYTE etwStackSupportedEvents[NO_OF_ETW_PROVIDERS][MAX_BYTES_PER_ETW_PROVIDER] = \n{\n")
header_file.write("EXTERN_C constexpr BYTE etwStackSupportedEvents[NO_OF_ETW_PROVIDERS][MAX_BYTES_PER_ETW_PROVIDER] = \n{\n")

for providerNode in tree.getElementsByTagName('provider'):
stackSupportedEvents = [0]*nMaxEventBytesPerProvider
Expand Down
Loading