Skip to content

Commit a5c58a5

Browse files
committed
Synch register allocation rules
1 parent 7ebc994 commit a5c58a5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17624,7 +17624,8 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
1762417624
return 1;
1762517625
}
1762617626
#ifdef HAVE_FFI
17627-
if (trace
17627+
if ((opline->opcode == ZEND_ASSIGN_DIM || opline->opcode == ZEND_ASSIGN_DIM_OP)
17628+
&& trace
1762817629
&& (trace+1)->op == ZEND_JIT_TRACE_OP1_TYPE
1762917630
&& (trace+2)->op == ZEND_JIT_TRACE_OP1_FFI_TYPE) {
1763017631
zend_ffi_type *op1_ffi_type = (zend_ffi_type*)(trace+2)->ptr;
@@ -17637,7 +17638,11 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
1763717638
&& ZEND_FFI_TYPE(op1_ffi_type->array.type)->kind != ZEND_FFI_TYPE_SINT64
1763817639
#endif
1763917640
&& op2_info == MAY_BE_LONG) {
17640-
return 1;
17641+
uint32_t op1_data_info = OP1_DATA_INFO();
17642+
17643+
if (op1_data_info == MAY_BE_LONG || op1_data_info == MAY_BE_DOUBLE) {
17644+
return 1;
17645+
}
1764117646
}
1764217647
}
1764317648
#endif

0 commit comments

Comments
 (0)