Skip to content

Commit 8e8ab0c

Browse files
authored
Remove calling convention modifiers from cpuid sig (#83672)
> /runtime/src/coreclr/vm/cgensys.h:107:26: error: stdcall calling convention is not supported on builtin function [-Werror,-Wignored-attributes]
1 parent 4bd7819 commit 8e8ab0c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/coreclr/vm/cgensys.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ inline void GetSpecificCpuInfo(CORINFO_CPU * cpuInfo)
9797
// MSVC directly defines intrinsics for __cpuid and __cpuidex matching the below signatures
9898
// We define matching signatures for use on Unix platforms.
9999

100-
extern "C" void __stdcall __cpuid(int cpuInfo[4], int function_id);
101-
extern "C" void __stdcall __cpuidex(int cpuInfo[4], int function_id, int subFunction_id);
100+
extern "C" void __cpuid(int cpuInfo[4], int function_id);
101+
extern "C" void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id);
102102
#endif // TARGET_UNIX
103-
extern "C" DWORD __stdcall xmmYmmStateSupport();
104-
extern "C" DWORD __stdcall avx512StateSupport();
103+
extern "C" DWORD xmmYmmStateSupport();
104+
extern "C" DWORD avx512StateSupport();
105105
#endif
106106

107107
inline bool TargetHasAVXSupport()

src/coreclr/vm/i386/cgenx86.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ void ResumeAtJit(PCONTEXT pContext, LPVOID oldESP)
10841084
#ifndef TARGET_UNIX
10851085
#pragma warning(push)
10861086
#pragma warning(disable: 4035)
1087-
extern "C" DWORD __stdcall xmmYmmStateSupport()
1087+
extern "C" DWORD xmmYmmStateSupport()
10881088
{
10891089
// No CONTRACT
10901090
STATIC_CONTRACT_NOTHROW;
@@ -1108,7 +1108,7 @@ extern "C" DWORD __stdcall xmmYmmStateSupport()
11081108

11091109
#pragma warning(push)
11101110
#pragma warning(disable: 4035)
1111-
extern "C" DWORD __stdcall avx512StateSupport()
1111+
extern "C" DWORD avx512StateSupport()
11121112
{
11131113
// No CONTRACT
11141114
STATIC_CONTRACT_NOTHROW;
@@ -1159,7 +1159,7 @@ void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id)
11591159
}
11601160
#endif
11611161

1162-
extern "C" DWORD __stdcall xmmYmmStateSupport()
1162+
extern "C" DWORD xmmYmmStateSupport()
11631163
{
11641164
DWORD eax;
11651165
__asm(" xgetbv\n" \
@@ -1171,7 +1171,7 @@ extern "C" DWORD __stdcall xmmYmmStateSupport()
11711171
return ((eax & 0x06) == 0x06) ? 1 : 0;
11721172
}
11731173

1174-
extern "C" DWORD __stdcall avx512StateSupport()
1174+
extern "C" DWORD avx512StateSupport()
11751175
{
11761176
DWORD eax;
11771177
__asm(" xgetbv\n" \

0 commit comments

Comments
 (0)