63
63
# pragma GCC diagnostic ignored "-Wvolatile-register-var"
64
64
register zend_execute_data * volatile execute_data __asm__(ZEND_VM_FP_GLOBAL_REG );
65
65
# pragma GCC diagnostic warning "-Wvolatile-register-var"
66
+ #endif
67
+
68
+ #ifdef ZEND_VM_FP_GLOBAL_REG
66
69
# define EXECUTE_DATA_D void
67
70
# define EXECUTE_DATA_C
68
71
# define EXECUTE_DATA_DC
69
72
# define EXECUTE_DATA_CC
70
73
# define NO_EXECUTE_DATA_CC
71
- # define OPLINE_D void
72
- # define OPLINE_C
73
- # define OPLINE_DC
74
- # define OPLINE_CC
75
74
#else
76
75
# define EXECUTE_DATA_D zend_execute_data* execute_data
77
76
# define EXECUTE_DATA_C execute_data
78
77
# define EXECUTE_DATA_DC , EXECUTE_DATA_D
79
78
# define EXECUTE_DATA_CC , EXECUTE_DATA_C
80
79
# define NO_EXECUTE_DATA_CC , NULL
80
+ #endif
81
+
82
+ #ifdef ZEND_VM_IP_GLOBAL_REG
83
+ # define OPLINE_D void
84
+ # define OPLINE_C
85
+ # define OPLINE_DC
86
+ # define OPLINE_CC
87
+ #else
81
88
# define OPLINE_D const zend_op* opline
82
89
# define OPLINE_C opline
83
90
# define OPLINE_DC , OPLINE_D
@@ -3306,7 +3313,7 @@ static zend_never_inline void zend_copy_extra_args(EXECUTE_DATA_D)
3306
3313
3307
3314
if (EXPECTED ((op_array -> fn_flags & ZEND_ACC_HAS_TYPE_HINTS ) == 0 )) {
3308
3315
/* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
3309
- #if defined(ZEND_VM_FP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3316
+ #if defined(ZEND_VM_IP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3310
3317
opline += first_extra_arg ;
3311
3318
#else
3312
3319
EX (opline ) += first_extra_arg ;
@@ -3358,7 +3365,7 @@ static zend_always_inline void i_init_func_execute_data(zend_op_array *op_array,
3358
3365
uint32_t first_extra_arg , num_args ;
3359
3366
ZEND_ASSERT (EX (func ) == (zend_function * )op_array );
3360
3367
3361
- #if defined(ZEND_VM_FP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3368
+ #if defined(ZEND_VM_IP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3362
3369
opline = op_array -> opcodes ;
3363
3370
#else
3364
3371
EX (opline ) = op_array -> opcodes ;
@@ -3375,7 +3382,7 @@ static zend_always_inline void i_init_func_execute_data(zend_op_array *op_array,
3375
3382
}
3376
3383
} else if (EXPECTED ((op_array -> fn_flags & ZEND_ACC_HAS_TYPE_HINTS ) == 0 )) {
3377
3384
/* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
3378
- #if defined(ZEND_VM_FP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3385
+ #if defined(ZEND_VM_IP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3379
3386
opline += num_args ;
3380
3387
#else
3381
3388
EX (opline ) += num_args ;
@@ -3388,7 +3395,7 @@ static zend_always_inline void i_init_func_execute_data(zend_op_array *op_array,
3388
3395
EX_LOAD_RUN_TIME_CACHE (op_array );
3389
3396
3390
3397
EG (current_execute_data ) = execute_data ;
3391
- #if defined(ZEND_VM_FP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3398
+ #if defined(ZEND_VM_IP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3392
3399
EX (opline ) = opline ;
3393
3400
#endif
3394
3401
}
@@ -3471,7 +3478,11 @@ ZEND_API void zend_init_func_execute_data(zend_execute_data *ex, zend_op_array *
3471
3478
{
3472
3479
#if defined(ZEND_VM_FP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3473
3480
zend_execute_data * orig_execute_data = execute_data ;
3481
+ #endif
3482
+ #if defined(ZEND_VM_IP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3474
3483
const zend_op * orig_opline = opline ;
3484
+ #endif
3485
+ #if defined(ZEND_VM_FP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3475
3486
execute_data = ex ;
3476
3487
#else
3477
3488
zend_execute_data * execute_data = ex ;
@@ -3483,9 +3494,11 @@ ZEND_API void zend_init_func_execute_data(zend_execute_data *ex, zend_op_array *
3483
3494
}
3484
3495
i_init_func_execute_data (op_array , return_value , 1 EXECUTE_DATA_CC );
3485
3496
3486
- #if defined(ZEND_VM_FP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3497
+ #if defined(ZEND_VM_IP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3487
3498
EX (opline ) = opline ;
3488
3499
opline = orig_opline ;
3500
+ #endif
3501
+ #if defined(ZEND_VM_FP_GLOBAL_REG ) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL ) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID ))
3489
3502
execute_data = orig_execute_data ;
3490
3503
#endif
3491
3504
}
0 commit comments