Skip to content

Commit

Permalink
Fixup jit
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoebi authored and test@test.test committed May 25, 2024
1 parent 4c3093a commit 04f144b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ext/opcache/jit/zend_jit_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -17070,15 +17070,15 @@ static ir_ref jit_frameless_observer(zend_jit_ctx *jit, const zend_op *opline, i

// push all args
switch (call_num_args) {
case 3: jit_ZVAL_COPY(jit, ZEND_ADDR_MEM_ZVAL(ZREG_RX, EX_NUM_TO_VAR(2)), MAY_BE_ANY & ~MAY_BE_REF, ZEND_ADDR_REF_ZVAL(op1_data_ref), op1_data_info, 1); ZEND_FALLTHROUGH;
case 2: jit_ZVAL_COPY(jit, ZEND_ADDR_MEM_ZVAL(ZREG_RX, EX_NUM_TO_VAR(1)), MAY_BE_ANY & ~MAY_BE_REF, ZEND_ADDR_REF_ZVAL(op2_ref), op2_info, 1); ZEND_FALLTHROUGH;
case 1: jit_ZVAL_COPY(jit, ZEND_ADDR_MEM_ZVAL(ZREG_RX, EX_NUM_TO_VAR(0)), MAY_BE_ANY & ~MAY_BE_REF, ZEND_ADDR_REF_ZVAL(op1_ref), op1_info, 1);
case 3: jit_ZVAL_COPY(jit, ZEND_ADDR_REF_ZVAL(ir_ADD_OFFSET(call_ref, EX_NUM_TO_VAR(2))), MAY_BE_ANY & ~MAY_BE_REF, ZEND_ADDR_REF_ZVAL(op1_data_ref), op1_data_info, 1); ZEND_FALLTHROUGH;
case 2: jit_ZVAL_COPY(jit, ZEND_ADDR_REF_ZVAL(ir_ADD_OFFSET(call_ref, EX_NUM_TO_VAR(1))), MAY_BE_ANY & ~MAY_BE_REF, ZEND_ADDR_REF_ZVAL(op2_ref), op2_info, 1); ZEND_FALLTHROUGH;
case 1: jit_ZVAL_COPY(jit, ZEND_ADDR_REF_ZVAL(ir_ADD_OFFSET(call_ref, EX_NUM_TO_VAR(0))), MAY_BE_ANY & ~MAY_BE_REF, ZEND_ADDR_REF_ZVAL(op1_ref), op1_info, 1);
}

// call and free args
ir_CALL_4(IR_VOID, ir_CONST_FC_FUNC(zend_jit_observed_frameless_helper_call),
call_ref,
ir_CONST_ADDR(fbc->internal_function.handler),
ir_CONST_FC_FUNC(fbc->internal_function.handler),
observer_handler,
res_ref);

Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/tests/opt/inference_frameless.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ _strpos:
; %sinference_frameless.php:2-4
0000 CV0($str) = RECV 1
0001 T1 = FRAMELESS_ICALL_3(strpos) CV0($str) string("o")
0002 T1 = OP_DATA int(1)
0002 OP_DATA int(1)
0003 RETURN T1

0 comments on commit 04f144b

Please sign in to comment.