File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -3826,6 +3826,21 @@ static int zend_jit_math_long_long(dasm_State **Dst,
3826
3826
is_power_of_two(Z_LVAL_P(Z_ZV(op2_addr))))) {
3827
3827
| GET_ZVAL_LVAL result_reg, op1_addr
3828
3828
| shr Ra(result_reg), floor_log2(Z_LVAL_P(Z_ZV(op2_addr)))
3829
+ } else if (opcode == ZEND_ADD &&
3830
+ !may_overflow &&
3831
+ Z_MODE(op1_addr) == IS_REG &&
3832
+ Z_MODE(op2_addr) == IS_CONST_ZVAL) {
3833
+ | lea Ra(result_reg), [Ra(Z_REG(op1_addr))+Z_LVAL_P(Z_ZV(op2_addr))]
3834
+ } else if (opcode == ZEND_ADD &&
3835
+ !may_overflow &&
3836
+ Z_MODE(op2_addr) == IS_REG &&
3837
+ Z_MODE(op1_addr) == IS_CONST_ZVAL) {
3838
+ | lea Ra(result_reg), [Ra(Z_REG(op2_addr))+Z_LVAL_P(Z_ZV(op1_addr))]
3839
+ } else if (opcode == ZEND_SUB &&
3840
+ !may_overflow &&
3841
+ Z_MODE(op1_addr) == IS_REG &&
3842
+ Z_MODE(op2_addr) == IS_CONST_ZVAL) {
3843
+ | lea Ra(result_reg), [Ra(Z_REG(op1_addr))-Z_LVAL_P(Z_ZV(op2_addr))]
3829
3844
} else {
3830
3845
| GET_ZVAL_LVAL result_reg, op1_addr
3831
3846
if (same_ops && opcode != ZEND_DIV) {
You can’t perform that action at this time.
0 commit comments