Skip to content

Commit

Permalink
Remove calling convention modifiers from cpuid sig
Browse files Browse the repository at this point in the history
> /runtime/src/coreclr/vm/cgensys.h:107:26: error: stdcall calling convention is not supported on builtin function [-Werror,-Wignored-attributes]
  • Loading branch information
am11 committed Mar 20, 2023
1 parent 61ce091 commit a2b4186
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/coreclr/vm/cgensys.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ inline void GetSpecificCpuInfo(CORINFO_CPU * cpuInfo)
// MSVC directly defines intrinsics for __cpuid and __cpuidex matching the below signatures
// We define matching signatures for use on Unix platforms.

extern "C" void __stdcall __cpuid(int cpuInfo[4], int function_id);
extern "C" void __stdcall __cpuidex(int cpuInfo[4], int function_id, int subFunction_id);
extern "C" void __cpuid(int cpuInfo[4], int function_id);
extern "C" void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id);
#endif // TARGET_UNIX
extern "C" DWORD __stdcall xmmYmmStateSupport();
extern "C" DWORD __stdcall avx512StateSupport();
extern "C" DWORD xmmYmmStateSupport();
extern "C" DWORD avx512StateSupport();
#endif

inline bool TargetHasAVXSupport()
Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/vm/i386/cgenx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ void ResumeAtJit(PCONTEXT pContext, LPVOID oldESP)
#ifndef TARGET_UNIX
#pragma warning(push)
#pragma warning(disable: 4035)
extern "C" DWORD __stdcall xmmYmmStateSupport()
extern "C" DWORD xmmYmmStateSupport()
{
// No CONTRACT
STATIC_CONTRACT_NOTHROW;
Expand All @@ -1108,7 +1108,7 @@ extern "C" DWORD __stdcall xmmYmmStateSupport()

#pragma warning(push)
#pragma warning(disable: 4035)
extern "C" DWORD __stdcall avx512StateSupport()
extern "C" DWORD avx512StateSupport()
{
// No CONTRACT
STATIC_CONTRACT_NOTHROW;
Expand Down Expand Up @@ -1159,7 +1159,7 @@ void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id)
}
#endif

extern "C" DWORD __stdcall xmmYmmStateSupport()
extern "C" DWORD xmmYmmStateSupport()
{
DWORD eax;
__asm(" xgetbv\n" \
Expand All @@ -1171,7 +1171,7 @@ extern "C" DWORD __stdcall xmmYmmStateSupport()
return ((eax & 0x06) == 0x06) ? 1 : 0;
}

extern "C" DWORD __stdcall avx512StateSupport()
extern "C" DWORD avx512StateSupport()
{
DWORD eax;
__asm(" xgetbv\n" \
Expand Down

0 comments on commit a2b4186

Please sign in to comment.