@@ -4428,7 +4428,14 @@ static int zend_jit_math_double_long(dasm_State **Dst,
4428
4428
zend_jit_addr res_addr,
4429
4429
uint32_t res_use_info)
4430
4430
{
4431
- zend_reg result_reg, tmp_reg;
4431
+ zend_reg result_reg, tmp_reg_gp;
4432
+
4433
+ if (Z_MODE(res_addr) == IS_MEM_ZVAL && Z_REG(res_addr) == ZREG_R0) {
4434
+ /* ASSIGN_DIM_OP */
4435
+ tmp_reg_gp = ZREG_R1;
4436
+ } else {
4437
+ tmp_reg_gp = ZREG_R0;
4438
+ }
4432
4439
4433
4440
if (zend_is_commutative(opcode)
4434
4441
&& (Z_MODE(res_addr) != IS_REG || Z_MODE(op1_addr) != IS_REG || Z_REG(res_addr) != Z_REG(op1_addr))) {
@@ -4437,13 +4444,7 @@ static int zend_jit_math_double_long(dasm_State **Dst,
4437
4444
} else {
4438
4445
result_reg = ZREG_XMM0;
4439
4446
}
4440
- if (Z_MODE(res_addr) == IS_MEM_ZVAL && Z_REG(res_addr) == ZREG_R0) {
4441
- /* ASSIGN_DIM_OP */
4442
- tmp_reg = ZREG_R1;
4443
- } else {
4444
- tmp_reg = ZREG_R0;
4445
- }
4446
- | SSE_GET_ZVAL_LVAL result_reg, op2_addr, tmp_reg
4447
+ | SSE_GET_ZVAL_LVAL result_reg, op2_addr, tmp_reg_gp
4447
4448
if (Z_MODE(res_addr) == IS_MEM_ZVAL && Z_REG(res_addr) == ZREG_R0) {
4448
4449
/* ASSIGN_DIM_OP */
4449
4450
if (CAN_USE_AVX()) {
@@ -4485,7 +4486,7 @@ static int zend_jit_math_double_long(dasm_State **Dst,
4485
4486
&& Z_LVAL_P(Z_ZV(op2_addr)) == 0) {
4486
4487
/* +/- 0 */
4487
4488
} else {
4488
- | SSE_GET_ZVAL_LVAL tmp_reg, op2_addr, ZREG_R0
4489
+ | SSE_GET_ZVAL_LVAL tmp_reg, op2_addr, tmp_reg_gp
4489
4490
| AVX_MATH_REG opcode, result_reg, op1_reg, tmp_reg
4490
4491
}
4491
4492
} else {
@@ -4495,7 +4496,7 @@ static int zend_jit_math_double_long(dasm_State **Dst,
4495
4496
&& Z_LVAL_P(Z_ZV(op2_addr)) == 0) {
4496
4497
/* +/- 0 */
4497
4498
} else {
4498
- | SSE_GET_ZVAL_LVAL tmp_reg, op2_addr, ZREG_R0
4499
+ | SSE_GET_ZVAL_LVAL tmp_reg, op2_addr, tmp_reg_gp
4499
4500
| SSE_MATH_REG opcode, result_reg, tmp_reg
4500
4501
}
4501
4502
}
0 commit comments