@@ -3100,23 +3100,10 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons
31003100 return FAILURE ;
31013101}
31023102
3103- /* Run-time JIT handler */
3104- #if ZEND_VM_KIND == ZEND_VM_KIND_CALL || ZEND_VM_KIND == ZEND_VM_KIND_TAILCALL
3105- static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV zend_runtime_jit (ZEND_OPCODE_HANDLER_ARGS )
3106- #else
3107- static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV zend_runtime_jit (ZEND_OPCODE_HANDLER_ARGS )
3108- #endif
3103+ /* GCC cannot tail-call from a function that uses setjmp. */
3104+ static zend_never_inline void zend_runtime_jit_compile (zend_op_array * op_array )
31093105{
3110- #if GCC_GLOBAL_REGS
3111- zend_execute_data * execute_data ;
3112- zend_op * opline ;
3113- #else
3114- const zend_op * orig_opline = opline ;
3115- #endif
3116-
3117- execute_data = EG (current_execute_data );
3118- zend_op_array * op_array = & EX (func )-> op_array ;
3119- opline = op_array -> opcodes ;
3106+ const zend_op * opline = op_array -> opcodes ;
31203107 zend_jit_op_array_extension * jit_extension ;
31213108 bool do_bailout = 0 ;
31223109
@@ -3154,6 +3141,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV zend_runtime_jit(Z
31543141 if (do_bailout ) {
31553142 zend_bailout ();
31563143 }
3144+ }
3145+
3146+ /* Run-time JIT handler */
3147+ #if ZEND_VM_KIND == ZEND_VM_KIND_CALL || ZEND_VM_KIND == ZEND_VM_KIND_TAILCALL
3148+ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV zend_runtime_jit (ZEND_OPCODE_HANDLER_ARGS )
3149+ #else
3150+ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV zend_runtime_jit (ZEND_OPCODE_HANDLER_ARGS )
3151+ #endif
3152+ {
3153+ #if GCC_GLOBAL_REGS
3154+ zend_execute_data * execute_data ;
3155+ #else
3156+ const zend_op * orig_opline = opline ;
3157+ #endif
3158+
3159+ execute_data = EG (current_execute_data );
3160+ zend_runtime_jit_compile (& EX (func )-> op_array );
31573161
31583162 /* JIT-ed code is going to be called by VM */
31593163#if GCC_GLOBAL_REGS
0 commit comments