Skip to content

Commit ad8c9b1

Browse files
committed
Enable tail calling only when large structs can be returned via registers
* Enable tail calling only on x86_64 and arm64 * On Windows with Clang, force SysV ABI on helpers with extra args (helpers which return zend_vm_trampoline)
1 parent 835025c commit ad8c9b1

File tree

4 files changed

+73
-47
lines changed

4 files changed

+73
-47
lines changed

Zend/zend_portability.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,11 @@ char *alloca();
330330
# define ZEND_MUSTTAIL __attribute__((musttail))
331331
#endif
332332

333+
#if __has_attribute(sysv_abi)
334+
# define HAVE_SYSV_ABI
335+
# define ZEND_SYSV_ABI __attribute__((sysv_abi))
336+
#endif
337+
333338
#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)
334339
# define HAVE_NORETURN
335340
# define ZEND_NORETURN __attribute__((noreturn))

0 commit comments

Comments
 (0)