return (x > 0) && !(x & (x - 1));
}
-#define OP_RANGE_EX(ssa_op, opN) \
+#define OP_RANGE(ssa_op, opN) \
(((opline->opN##_type & (IS_TMP_VAR|IS_VAR|IS_CV)) && \
(ssa_op)->opN##_use >= 0 && \
ssa->var_info[(ssa_op)->opN##_use].has_range) ? \
&ssa->var_info[(ssa_op)->opN##_use].range : NULL)
-#define OP_RANGE(line, opN) \
- (ssa->var_info ? OP_RANGE_EX(ssa->ops + (line), opN) : NULL)
-
-#define OP1_RANGE() OP_RANGE(opline - op_array->opcodes, op1)
-#define OP2_RANGE() OP_RANGE(opline - op_array->opcodes, op2)
-#define OP1_DATA_RANGE() OP_RANGE(opline - op_array->opcodes + 1, op1)
-
-#define OP1_RANGE_EX() OP_RANGE_EX(ssa_op, op1)
-#define OP2_RANGE_EX() OP_RANGE_EX(ssa_op, op2)
-#define OP1_DATA_RANGE_EX() OP_RANGE_EX(ssa_op + 1, op1)
+#define OP1_RANGE() OP_RANGE(ssa_op, op1)
+#define OP2_RANGE() OP_RANGE(ssa_op, op2)
+#define OP1_DATA_RANGE() OP_RANGE(ssa_op + 1, op1)
#include "dynasm/dasm_x86.h"
#include "jit/zend_jit_helpers.c"
}
res_info = RES_INFO();
if (!zend_jit_long_math(&dasm_state, opline, op_array,
- op1_info, OP1_RANGE_EX(), OP1_REG_ADDR(),
- op2_info, OP2_RANGE_EX(), OP2_REG_ADDR(),
+ op1_info, OP1_RANGE(), OP1_REG_ADDR(),
+ op2_info, OP2_RANGE(), OP2_REG_ADDR(),
res_use_info, res_info, res_addr,
send_result,
zend_may_throw(opline, ssa_op, op_array, ssa))) {
}
op1_def_info = OP1_DEF_INFO();
if (!zend_jit_assign_op(&dasm_state, opline, op_array,
- op1_info, op1_def_info, OP1_RANGE_EX(),
- op2_info, OP2_RANGE_EX(),
+ op1_info, op1_def_info, OP1_RANGE(),
+ op2_info, OP2_RANGE(),
(op1_def_info & MAY_BE_LONG) && (op1_def_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow_ex(opline, ssa_op, op_array, ssa),
zend_may_throw(opline, ssa_op, op_array, ssa))) {
goto jit_failure;
op1_def_info = OP1_DEF_INFO();
if (!zend_jit_assign_dim_op(&dasm_state, opline, op_array,
op1_info, op1_def_info, op2_info,
- op1_data_info, OP1_DATA_RANGE_EX(),
+ op1_data_info, OP1_DATA_RANGE(),
zend_may_throw(opline, ssa_op, op_array, ssa))) {
goto jit_failure;
}