36
36
# define ZREG_IP 28 /* IR_REG_X28 */
37
37
# define ZREG_FIRST_FPR 32
38
38
# define IR_REGSET_PRESERVED ((1<<19) | (1<<20) | (1<<21) | (1<<22) | (1<<23) | (1<<24) | \
39
- (1<<25) | (1<<26) | (1<<27) | (1<<29) | (1<<30)) /* all preserved registers */
39
+ (1<<25) | (1<<26) | (1<<27) | (1<<28) | (1<< 29) | (1<<30)) /* all preserved registers */
40
40
#else
41
41
# error "Unknown IR target"
42
42
#endif
43
43
44
- #define ZREG_RX ZREG_IP
45
-
46
- #if defined(IR_TARGET_X86) || defined(IR_TARGET_X64)
47
- # define IR_REGSET_PHP_FIXED ((1<<ZREG_FP) | (1<<ZREG_IP) | (1<<5)) /* prevent %rbp (%r5) usage */
48
- #else
49
- # define IR_REGSET_PHP_FIXED ((1<<ZREG_FP) | (1<<ZREG_IP))
50
- #endif
44
+ #define ZREG_RX ZREG_IP
51
45
52
46
#ifdef ZEND_ENABLE_ZVAL_LONG64
53
47
# define IR_PHP_LONG IR_I64
@@ -3341,6 +3335,7 @@ static void zend_jit_init_ctx(zend_jit_ctx *jit, uint32_t flags)
3341
3335
#endif
3342
3336
jit->ctx.flags |= flags | IR_OPT_FOLDING | IR_OPT_CFG | IR_OPT_CODEGEN | IR_HAS_CALLS;
3343
3337
3338
+ jit->ctx.fixed_regset = (1<<ZREG_FP) | (1<<ZREG_IP);
3344
3339
if (!(flags & IR_FUNCTION)) {
3345
3340
jit->ctx.flags |= IR_NO_STACK_COMBINE;
3346
3341
if (zend_jit_vm_kind == ZEND_VM_KIND_CALL) {
@@ -3359,10 +3354,12 @@ static void zend_jit_init_ctx(zend_jit_ctx *jit, uint32_t flags)
3359
3354
#else
3360
3355
jit->ctx.fixed_stack_red_zone = 0;
3361
3356
jit->ctx.fixed_stack_frame_size = 0;
3357
+ #endif
3358
+ #if defined(IR_TARGET_X86) || defined(IR_TARGET_X64)
3359
+ jit->ctx.fixed_regset |= (1<<5); /* prevent %rbp (%r5) usage */
3362
3360
#endif
3363
3361
}
3364
3362
}
3365
- jit->ctx.fixed_regset = IR_REGSET_PHP_FIXED;
3366
3363
jit->op_array = NULL;
3367
3364
jit->ssa = NULL;
3368
3365
jit->name = NULL;
0 commit comments