Skip to content

Commit

Permalink
Merge branch 'PHP-8.4'
Browse files Browse the repository at this point in the history
* PHP-8.4:
  Fix GH-16996: 8.4 tracing JIT phpseclib failures (#17030)
  • Loading branch information
dstogov committed Dec 3, 2024
2 parents 0949e7a + 89b82ef commit a768a54
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ext/opcache/jit/zend_jit_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,8 +1332,16 @@ static void zend_jit_def_reg(zend_jit_ctx *jit, zend_jit_addr addr, ir_ref val)
ZEND_ASSERT(jit->ra && jit->ra[var].ref == IR_NULL);

/* Negative "var" has special meaning for IR */
if (val > 0 && !zend_jit_spilling_may_cause_conflict(jit, var, val)) {
val = ir_bind(&jit->ctx, -EX_NUM_TO_VAR(jit->ssa->vars[var].var), val);
if (val > 0) {
if (jit->ctx.binding) {
ir_ref old = ir_binding_find(&jit->ctx, val);
if (old && old != -EX_NUM_TO_VAR(jit->ssa->vars[var].var)) {
val = ir_emit2(&jit->ctx, IR_OPT(IR_COPY, jit->ctx.ir_base[val].type), val, 1);
}
}
if (!zend_jit_spilling_may_cause_conflict(jit, var, val)) {
val = ir_bind(&jit->ctx, -EX_NUM_TO_VAR(jit->ssa->vars[var].var), val);
}
}
jit->ra[var].ref = val;

Expand Down

0 comments on commit a768a54

Please sign in to comment.