1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix ZEND_FASTCALL definition wrt. x64 Windows clang builds (GH-15425)

As is, MSVC uses `__vectorcall`, but clang uses `__cdecl`.  This
obviously is bad for interoperability (and causes link issues), and is
likely worse for FFI which offers some limited (but likely sufficient
for our purposes) support for `__vectorcall` on Windows.

Since clang claims to support `__vectorcall` as of 3.6.0, and we bumped
the requirements to clang 4.0.0 already, there shouldn't be any issues.
This commit is contained in:
Christoph M. Becker
2024-08-18 12:20:09 +02:00
committed by GitHub
parent 7fa2dbf924
commit f16cb1866a

View File

@@ -306,7 +306,7 @@ char *alloca();
# define ZEND_FASTCALL __attribute__((fastcall))
#elif defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER == 1700
# define ZEND_FASTCALL __fastcall
#elif defined(_MSC_VER) && _MSC_VER >= 1800 && !defined(__clang__)
#elif defined(_MSC_VER) && _MSC_VER >= 1800
# define ZEND_FASTCALL __vectorcall
#else
# define ZEND_FASTCALL