Skip to content

Commit c5cf224

Browse files
committed
Synch register allocation rules
1 parent 79c195e commit c5cf224

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
@@ -17669,7 +17669,8 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
1766917669
return 1;
1767017670
}
1767117671
#ifdef HAVE_FFI
17672-
if (trace
17672+
if ((opline->opcode == ZEND_ASSIGN_DIM || opline->opcode == ZEND_ASSIGN_DIM_OP)
17673+
&& trace
1767317674
&& (trace+1)->op == ZEND_JIT_TRACE_OP1_TYPE
1767417675
&& (trace+2)->op == ZEND_JIT_TRACE_OP1_FFI_TYPE) {
1767517676
zend_ffi_type *op1_ffi_type = (zend_ffi_type*)(trace+2)->ptr;
@@ -17682,7 +17683,11 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
1768217683
&& ZEND_FFI_TYPE(op1_ffi_type->array.type)->kind != ZEND_FFI_TYPE_SINT64
1768317684
#endif
1768417685
&& op2_info == MAY_BE_LONG) {
17685-
return 1;
17686+
uint32_t op1_data_info = OP1_DATA_INFO();
17687+
17688+
if (op1_data_info == MAY_BE_LONG || op1_data_info == MAY_BE_DOUBLE) {
17689+
return 1;
17690+
}
1768617691
}
1768717692
}
1768817693
#endif

0 commit comments

Comments
 (0)