Skip to content

Commit ce9715e

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 9118090 commit ce9715e

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
@@ -325,6 +325,11 @@ char *alloca();
325325
# define ZEND_MUSTTAIL __attribute__((musttail))
326326
#endif
327327

328+
#if __has_attribute(sysv_abi)
329+
# define HAVE_SYSV_ABI
330+
# define ZEND_SYSV_ABI __attribute__((sysv_abi))
331+
#endif
332+
328333
#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)
329334
# define HAVE_NORETURN
330335
# define ZEND_NORETURN __attribute__((noreturn))

0 commit comments

Comments
 (0)