Skip to content

Commit

Permalink
Avoid __vectorcall on ARM64EC (#4600)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyCarter committed Apr 19, 2024
1 parent 7189e4c commit 726ebe7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stl/inc/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ constexpr bool is_compound_v = !is_fundamental_v<_Ty>;
#define _EMIT_THISCALL(FUNC, OPT1, OPT2, OPT3)
#endif // ^^^ __stdcall and __thiscall not supported ^^^

#if ((defined(_M_IX86) && _M_IX86_FP >= 2) || defined(_M_X64)) && !defined(_M_CEE)
#if ((defined(_M_IX86) && _M_IX86_FP >= 2) || (defined(_M_X64) && !defined(_M_ARM64EC))) && !defined(_M_CEE)
#define _EMIT_VECTORCALL(FUNC, OPT1, OPT2, OPT3) FUNC(__vectorcall, OPT1, OPT2, OPT3)
#else // ^^^ __vectorcall supported / __vectorcall not supported vvv
#define _EMIT_VECTORCALL(FUNC, OPT1, OPT2, OPT3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct Cat {
}
#endif

#if (defined(_M_IX86) || defined(_M_X64)) && !defined(_M_CEE)
#if (defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))) && !defined(_M_CEE)
int __vectorcall g() {
return 2;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ int y(int i) {
}
#endif

#if (defined(_M_IX86) || defined(_M_X64)) && !defined(_M_CEE)
#if (defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))) && !defined(_M_CEE)
int __vectorcall z(int i) {
return -4 * i;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/P0898R3_concepts/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2877,12 +2877,12 @@ namespace test_invocable_concepts {
#include "invocable_cc.hpp"

#ifndef _M_CEE // avoid warning C4575: '__vectorcall' incompatible with the '/clr' option: converting to '__stdcall'
#if !defined(_M_ARM) && !defined(_M_ARM64)
#if !defined(_M_ARM) && !defined(_M_ARM64) && !defined(_M_ARM64EC)
#define NAME test_vector_vector
#define CALLCONV __vectorcall
#define MCALLCONV __vectorcall
#include "invocable_cc.hpp"
#endif // ^^^ !ARM && !ARM64 ^^^
#endif // ^^^ !ARM && !ARM64 && !ARM64EC ^^^
#endif // _M_CEE

} // namespace test_invocable_concepts
Expand Down

0 comments on commit 726ebe7

Please sign in to comment.