Merge branch 'PHP-7.4'

* PHP-7.4:
  Separate "cold" parts of binary op instructions
This commit is contained in:
Dmitry Stogov 2019-07-11 18:23:48 +03:00
commit b4ee279bf4
5 changed files with 1527 additions and 2892 deletions

View File

@ -23,7 +23,28 @@
* php zend_vm_gen.php
*/
ZEND_VM_COLD_CONSTCONST_HANDLER(1, ZEND_ADD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_HELPER(zend_add_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
add_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HOT_NOCONSTCONST_HANDLER(1, ZEND_ADD, CONST|TMPVARCV, CONST|TMPVARCV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -31,7 +52,9 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(1, ZEND_ADD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
result = EX_VAR(opline->result.var);
fast_long_add_function(result, op1, op2);
@ -53,20 +76,31 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(1, ZEND_ADD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
}
}
ZEND_VM_DISPATCH_TO_HELPER(zend_add_helper, op_1, op1, op_2, op2);
}
ZEND_VM_HELPER(zend_sub_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
sub_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
add_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(2, ZEND_SUB, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_HOT_NOCONSTCONST_HANDLER(2, ZEND_SUB, CONST|TMPVARCV, CONST|TMPVARCV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -74,7 +108,9 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(2, ZEND_SUB, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
result = EX_VAR(opline->result.var);
fast_long_sub_function(result, op1, op2);
@ -96,20 +132,31 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(2, ZEND_SUB, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
}
}
ZEND_VM_DISPATCH_TO_HELPER(zend_sub_helper, op_1, op1, op_2, op2);
}
ZEND_VM_HELPER(zend_mul_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
mul_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
sub_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(3, ZEND_MUL, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_COLD_CONSTCONST_HANDLER(3, ZEND_MUL, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -117,7 +164,9 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(3, ZEND_MUL, CONST|TMPVAR|CV, CONST|TMPVAR|CV, S
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
zend_long overflow;
@ -142,17 +191,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(3, ZEND_MUL, CONST|TMPVAR|CV, CONST|TMPVAR|CV, S
}
}
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
}
mul_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
ZEND_VM_DISPATCH_TO_HELPER(zend_mul_helper, op_1, op1, op_2, op2);
}
ZEND_VM_COLD_CONSTCONST_HANDLER(4, ZEND_DIV, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@ -180,7 +219,28 @@ ZEND_VM_COLD_HELPER(zend_mod_by_zero_helper, ANY, ANY)
HANDLE_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(5, ZEND_MOD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_HELPER(zend_mod_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
mod_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(5, ZEND_MOD, CONST|TMPVARCV, CONST|TMPVARCV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -188,7 +248,9 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(5, ZEND_MOD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
result = EX_VAR(opline->result.var);
if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
@ -203,20 +265,31 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(5, ZEND_MOD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
}
}
ZEND_VM_DISPATCH_TO_HELPER(zend_mod_helper, op_1, op1, op_2, op2);
}
ZEND_VM_HELPER(zend_shift_left_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
shift_left_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
mod_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(6, ZEND_SL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_COLD_CONSTCONST_HANDLER(6, ZEND_SL, CONST|TMPVARCV, CONST|TMPVARCV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -224,7 +297,9 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(6, ZEND_SL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
&& EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)
&& EXPECTED((zend_ulong)Z_LVAL_P(op2) < SIZEOF_ZEND_LONG * 8)) {
/* Perform shift on unsigned numbers to get well-defined wrap behavior. */
@ -233,20 +308,31 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(6, ZEND_SL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_DISPATCH_TO_HELPER(zend_shift_left_helper, op_1, op1, op_2, op2);
}
ZEND_VM_HELPER(zend_shift_right_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
shift_right_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
shift_left_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(7, ZEND_SR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_COLD_CONSTCONST_HANDLER(7, ZEND_SR, CONST|TMPVARCV, CONST|TMPVARCV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -254,24 +340,16 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(7, ZEND_SR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
&& EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)
&& EXPECTED((zend_ulong)Z_LVAL_P(op2) < SIZEOF_ZEND_LONG * 8)) {
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) >> Z_LVAL_P(op2));
ZEND_VM_NEXT_OPCODE();
}
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
}
shift_right_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
ZEND_VM_DISPATCH_TO_HELPER(zend_shift_right_helper, op_1, op1, op_2, op2);
}
ZEND_VM_COLD_CONSTCONST_HANDLER(12, ZEND_POW, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@ -694,7 +772,28 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(170, ZEND_SPACESHIP, CONST|TMPVAR|CV, CONST|TMPV
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(9, ZEND_BW_OR, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_HELPER(zend_bw_or_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
bitwise_or_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(9, ZEND_BW_OR, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -702,26 +801,39 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(9, ZEND_BW_OR, CONST|TMPVAR|CV, CONST|TMPVAR|CV,
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
&& EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) | Z_LVAL_P(op2));
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_DISPATCH_TO_HELPER(zend_bw_or_helper, op_1, op1, op_2, op2);
}
ZEND_VM_HELPER(zend_bw_and_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
bitwise_and_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(10, ZEND_BW_AND, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_COLD_CONSTCONST_HANDLER(10, ZEND_BW_AND, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -729,26 +841,39 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(10, ZEND_BW_AND, CONST|TMPVAR|CV, CONST|TMPVAR|C
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
&& EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) & Z_LVAL_P(op2));
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_DISPATCH_TO_HELPER(zend_bw_and_helper, op_1, op1, op_2, op2);
}
ZEND_VM_HELPER(zend_bw_xor_helper, ANY, ANY, zval *op_1, zval *op_2)
{
USE_OPLINE
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) {
op_1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) {
op_2 = ZVAL_UNDEFINED_OP2();
}
bitwise_xor_function(EX_VAR(opline->result.var), op_1, op_2);
if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_1);
}
if (OP2_TYPE & (IS_TMP_VAR|IS_VAR)) {
zval_ptr_dtor_nogc(op_2);
}
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(11, ZEND_BW_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_COLD_CONSTCONST_HANDLER(11, ZEND_BW_XOR, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -756,23 +881,15 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(11, ZEND_BW_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|C
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
&& EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) ^ Z_LVAL_P(op2));
ZEND_VM_NEXT_OPCODE();
}
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
op2 = ZVAL_UNDEFINED_OP2();
}
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
ZEND_VM_DISPATCH_TO_HELPER(zend_bw_xor_helper, op_1, op1, op_2, op2);
}
ZEND_VM_COLD_CONSTCONST_HANDLER(15, ZEND_BOOL_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))

File diff suppressed because it is too large Load Diff

View File

@ -873,7 +873,7 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name, $extra_sp
// ZEND_VM_DISPATCH_TO_HELPER
if (isset($matches[2])) {
// extra args
$args = substr(preg_replace("/,\s*[A-Za-z_]*\s*,\s*([^,)\s]*)\s*/", ", $1", $matches[2]), 2);
$args = substr(preg_replace("/,\s*[A-Za-z0-9_]*\s*,\s*([^,)\s]*)\s*/", ", $1", $matches[2]), 2);
return "ZEND_VM_TAIL_CALL(" . helper_name($matches[1], $spec, $op1, $op2, $extra_spec) . "(" . $args. " ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC))";
}
if (is_hot_helper($matches[1])) {
@ -910,7 +910,7 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name, $extra_sp
// ZEND_VM_DISPATCH_TO_HELPER
if (isset($matches[2])) {
// extra args
$args = substr(preg_replace("/,\s*[A-Za-z_]*\s*,\s*([^,)\s]*)\s*/", ", $1", $matches[2]), 2);
$args = substr(preg_replace("/,\s*[A-Za-z0-9_]*\s*,\s*([^,)\s]*)\s*/", ", $1", $matches[2]), 2);
return "ZEND_VM_TAIL_CALL(" . helper_name($matches[1], $spec, $op1, $op2, $extra_spec) . "(" . $args. " ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC))";
}
return "ZEND_VM_TAIL_CALL(" . helper_name($matches[1], $spec, $op1, $op2, $extra_spec) . "(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU))";
@ -934,7 +934,7 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name, $extra_sp
// ZEND_VM_DISPATCH_TO_HELPER
if (isset($matches[2])) {
// extra args
$args = preg_replace("/,\s*([A-Za-z_]*)\s*,\s*([^,)\s]*)\s*/", "$1 = $2; ", $matches[2]);
$args = preg_replace("/,\s*([A-Za-z0-9_]*)\s*,\s*([^,)\s]*)\s*/", "$1 = $2; ", $matches[2]);
return $args . "goto " . helper_name($matches[1], $spec, $op1, $op2, $extra_spec);
}
return "goto " . helper_name($matches[1], $spec, $op1, $op2, $extra_spec);
@ -958,7 +958,7 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name, $extra_sp
// ZEND_VM_DISPATCH_TO_HELPER
if (isset($matches[2])) {
// extra args
$args = preg_replace("/,\s*([A-Za-z_]*)\s*,\s*([^,)\s]*)\s*/", "$1 = $2; ", $matches[2]);
$args = preg_replace("/,\s*([A-Za-z0-9_]*)\s*,\s*([^,)\s]*)\s*/", "$1 = $2; ", $matches[2]);
return $args . "goto " . helper_name($matches[1], $spec, $op1, $op2, $extra_spec);
}
return "goto " . helper_name($matches[1], $spec, $op1, $op2, $extra_spec);
@ -1038,6 +1038,8 @@ function is_hot_handler($hot, $op1, $op2, $extra_spec) {
return true;
} else if ($hot === 'HOT_NOCONST_') {
return ($op1 !== 'CONST');
} else if ($hot === 'HOT_NOCONSTCONST_') {
return (($op1 !== 'CONST') || ($op2 !== 'CONST')) ;
} else if ($hot === 'HOT_OBJ_') {
return (($op1 === 'UNUSED') || ($op1 === 'CV')) && ($op2 === 'CONST');
} else if ($hot === 'HOT_SEND_') {
@ -1058,6 +1060,8 @@ function is_cold_handler($hot, $op1, $op2, $extra_spec) {
return ($op1 === 'CONST');
} else if ($hot === 'HOT_NOCONST_') {
return ($op1 === 'CONST');
} else if ($hot === 'HOT_NOCONSTCONST_') {
return ($op1 === 'CONST' && $op2 === 'CONST');
} else {
return false;
}
@ -2347,6 +2351,7 @@ function gen_vm($def, $skel) {
strpos($line,"ZEND_VM_INLINE_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_NOCONST_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_NOCONSTCONST_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_SEND_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_OBJ_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_COLD_HANDLER(") === 0 ||
@ -2354,7 +2359,7 @@ function gen_vm($def, $skel) {
strpos($line,"ZEND_VM_COLD_CONSTCONST_HANDLER(") === 0) {
// Parsing opcode handler's definition
if (preg_match(
"/^ZEND_VM_(HOT_|INLINE_|HOT_OBJ_|HOT_SEND_|HOT_NOCONST_|COLD_|COLD_CONST_|COLD_CONSTCONST_)?HANDLER\(\s*([0-9]+)\s*,\s*([A-Z_]+)\s*,\s*([A-Z_|]+)\s*,\s*([A-Z_|]+)\s*(,\s*([A-Z_|]+)\s*)?(,\s*SPEC\(([A-Z_|=,]+)\)\s*)?\)/",
"/^ZEND_VM_(HOT_|INLINE_|HOT_OBJ_|HOT_SEND_|HOT_NOCONST_|HOT_NOCONSTCONST_|COLD_|COLD_CONST_|COLD_CONSTCONST_)?HANDLER\(\s*([0-9]+)\s*,\s*([A-Z_]+)\s*,\s*([A-Z_|]+)\s*,\s*([A-Z_|]+)\s*(,\s*([A-Z_|]+)\s*)?(,\s*SPEC\(([A-Z_|=,]+)\)\s*)?\)/",
$line,
$m) == 0) {
die("ERROR ($def:$lineno): Invalid ZEND_VM_HANDLER definition.\n");
@ -2400,11 +2405,12 @@ function gen_vm($def, $skel) {
strpos($line,"ZEND_VM_INLINE_TYPE_SPEC_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_TYPE_SPEC_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_NOCONST_TYPE_SPEC_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_NOCONSTCONST_TYPE_SPEC_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_SEND_TYPE_SPEC_HANDLER(") === 0 ||
strpos($line,"ZEND_VM_HOT_OBJ_TYPE_SPEC_HANDLER(") === 0) {
// Parsing opcode handler's definition
if (preg_match(
"/^ZEND_VM_(HOT_|INLINE_|HOT_OBJ_|HOT_SEND_|HOT_NOCONST_)?TYPE_SPEC_HANDLER\(\s*([A-Z_]+)\s*,\s*((?:[^(,]|\([^()]*|(?R)*\))*),\s*([A-Za-z_]+)\s*,\s*([A-Z_|]+)\s*,\s*([A-Z_|]+)\s*(,\s*([A-Z_|]+)\s*)?(,\s*SPEC\(([A-Z_|=,]+)\)\s*)?\)/",
"/^ZEND_VM_(HOT_|INLINE_|HOT_OBJ_|HOT_SEND_|HOT_NOCONST_|HOT_NOCONSTCONST_)?TYPE_SPEC_HANDLER\(\s*([A-Z_]+)\s*,\s*((?:[^(,]|\([^()]*|(?R)*\))*),\s*([A-Za-z_]+)\s*,\s*([A-Z_|]+)\s*,\s*([A-Z_|]+)\s*(,\s*([A-Z_|]+)\s*)?(,\s*SPEC\(([A-Z_|=,]+)\)\s*)?\)/",
$line,
$m) == 0) {
die("ERROR ($def:$lineno): Invalid ZEND_VM_TYPE_HANDLER_HANDLER definition.\n");

View File

@ -1,48 +1,50 @@
#define VM_HANDLERS(_) \
_(0, ZEND_NOP_SPEC) \
_(1, ZEND_ADD_SPEC_CONST_CONST) \
_(2, ZEND_ADD_SPEC_CONST_TMPVAR) \
_(3, ZEND_ADD_SPEC_CONST_TMPVAR) \
_(5, ZEND_ADD_SPEC_CONST_CV) \
_(6, ZEND_ADD_SPEC_TMPVAR_CONST) \
_(7, ZEND_ADD_SPEC_TMPVAR_TMPVAR) \
_(8, ZEND_ADD_SPEC_TMPVAR_TMPVAR) \
_(10, ZEND_ADD_SPEC_TMPVAR_CV) \
_(11, ZEND_ADD_SPEC_TMPVAR_CONST) \
_(12, ZEND_ADD_SPEC_TMPVAR_TMPVAR) \
_(13, ZEND_ADD_SPEC_TMPVAR_TMPVAR) \
_(15, ZEND_ADD_SPEC_TMPVAR_CV) \
_(21, ZEND_ADD_SPEC_CV_CONST) \
_(22, ZEND_ADD_SPEC_CV_TMPVAR) \
_(23, ZEND_ADD_SPEC_CV_TMPVAR) \
_(25, ZEND_ADD_SPEC_CV_CV) \
_(2, ZEND_ADD_SPEC_CONST_TMPVARCV) \
_(3, ZEND_ADD_SPEC_CONST_TMPVARCV) \
_(5, ZEND_ADD_SPEC_CONST_TMPVARCV) \
_(6, ZEND_ADD_SPEC_TMPVARCV_CONST) \
_(7, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(8, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(10, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(11, ZEND_ADD_SPEC_TMPVARCV_CONST) \
_(12, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(13, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(15, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(21, ZEND_ADD_SPEC_TMPVARCV_CONST) \
_(22, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(23, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(25, ZEND_ADD_SPEC_TMPVARCV_TMPVARCV) \
_(26, ZEND_SUB_SPEC_CONST_CONST) \
_(27, ZEND_SUB_SPEC_CONST_TMPVAR) \
_(28, ZEND_SUB_SPEC_CONST_TMPVAR) \
_(30, ZEND_SUB_SPEC_CONST_CV) \
_(31, ZEND_SUB_SPEC_TMPVAR_CONST) \
_(32, ZEND_SUB_SPEC_TMPVAR_TMPVAR) \
_(33, ZEND_SUB_SPEC_TMPVAR_TMPVAR) \
_(35, ZEND_SUB_SPEC_TMPVAR_CV) \
_(36, ZEND_SUB_SPEC_TMPVAR_CONST) \
_(37, ZEND_SUB_SPEC_TMPVAR_TMPVAR) \
_(38, ZEND_SUB_SPEC_TMPVAR_TMPVAR) \
_(40, ZEND_SUB_SPEC_TMPVAR_CV) \
_(46, ZEND_SUB_SPEC_CV_CONST) \
_(47, ZEND_SUB_SPEC_CV_TMPVAR) \
_(48, ZEND_SUB_SPEC_CV_TMPVAR) \
_(50, ZEND_SUB_SPEC_CV_CV) \
_(27, ZEND_SUB_SPEC_CONST_TMPVARCV) \
_(28, ZEND_SUB_SPEC_CONST_TMPVARCV) \
_(30, ZEND_SUB_SPEC_CONST_TMPVARCV) \
_(31, ZEND_SUB_SPEC_TMPVARCV_CONST) \
_(32, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(33, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(35, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(36, ZEND_SUB_SPEC_TMPVARCV_CONST) \
_(37, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(38, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(40, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(46, ZEND_SUB_SPEC_TMPVARCV_CONST) \
_(47, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(48, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(50, ZEND_SUB_SPEC_TMPVARCV_TMPVARCV) \
_(51, ZEND_MUL_SPEC_CONST_CONST) \
_(56, ZEND_MUL_SPEC_TMPVAR_CONST) \
_(57, ZEND_MUL_SPEC_TMPVAR_TMPVAR) \
_(58, ZEND_MUL_SPEC_TMPVAR_TMPVAR) \
_(61, ZEND_MUL_SPEC_TMPVAR_CONST) \
_(62, ZEND_MUL_SPEC_TMPVAR_TMPVAR) \
_(63, ZEND_MUL_SPEC_TMPVAR_TMPVAR) \
_(71, ZEND_MUL_SPEC_CV_CONST) \
_(72, ZEND_MUL_SPEC_CV_TMPVAR) \
_(73, ZEND_MUL_SPEC_CV_TMPVAR) \
_(75, ZEND_MUL_SPEC_CV_CV) \
_(56, ZEND_MUL_SPEC_TMPVARCV_CONST) \
_(57, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(58, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(60, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(61, ZEND_MUL_SPEC_TMPVARCV_CONST) \
_(62, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(63, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(65, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(71, ZEND_MUL_SPEC_TMPVARCV_CONST) \
_(72, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(73, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(75, ZEND_MUL_SPEC_TMPVARCV_TMPVARCV) \
_(76, ZEND_DIV_SPEC_CONST_CONST) \
_(77, ZEND_DIV_SPEC_CONST_TMPVAR) \
_(78, ZEND_DIV_SPEC_CONST_TMPVAR) \
@ -60,53 +62,53 @@
_(98, ZEND_DIV_SPEC_CV_TMPVAR) \
_(100, ZEND_DIV_SPEC_CV_CV) \
_(101, ZEND_MOD_SPEC_CONST_CONST) \
_(102, ZEND_MOD_SPEC_CONST_TMPVAR) \
_(103, ZEND_MOD_SPEC_CONST_TMPVAR) \
_(105, ZEND_MOD_SPEC_CONST_CV) \
_(106, ZEND_MOD_SPEC_TMPVAR_CONST) \
_(107, ZEND_MOD_SPEC_TMPVAR_TMPVAR) \
_(108, ZEND_MOD_SPEC_TMPVAR_TMPVAR) \
_(110, ZEND_MOD_SPEC_TMPVAR_CV) \
_(111, ZEND_MOD_SPEC_TMPVAR_CONST) \
_(112, ZEND_MOD_SPEC_TMPVAR_TMPVAR) \
_(113, ZEND_MOD_SPEC_TMPVAR_TMPVAR) \
_(115, ZEND_MOD_SPEC_TMPVAR_CV) \
_(121, ZEND_MOD_SPEC_CV_CONST) \
_(122, ZEND_MOD_SPEC_CV_TMPVAR) \
_(123, ZEND_MOD_SPEC_CV_TMPVAR) \
_(125, ZEND_MOD_SPEC_CV_CV) \
_(102, ZEND_MOD_SPEC_CONST_TMPVARCV) \
_(103, ZEND_MOD_SPEC_CONST_TMPVARCV) \
_(105, ZEND_MOD_SPEC_CONST_TMPVARCV) \
_(106, ZEND_MOD_SPEC_TMPVARCV_CONST) \
_(107, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(108, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(110, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(111, ZEND_MOD_SPEC_TMPVARCV_CONST) \
_(112, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(113, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(115, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(121, ZEND_MOD_SPEC_TMPVARCV_CONST) \
_(122, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(123, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(125, ZEND_MOD_SPEC_TMPVARCV_TMPVARCV) \
_(126, ZEND_SL_SPEC_CONST_CONST) \
_(127, ZEND_SL_SPEC_CONST_TMPVAR) \
_(128, ZEND_SL_SPEC_CONST_TMPVAR) \
_(130, ZEND_SL_SPEC_CONST_CV) \
_(131, ZEND_SL_SPEC_TMPVAR_CONST) \
_(132, ZEND_SL_SPEC_TMPVAR_TMPVAR) \
_(133, ZEND_SL_SPEC_TMPVAR_TMPVAR) \
_(135, ZEND_SL_SPEC_TMPVAR_CV) \
_(136, ZEND_SL_SPEC_TMPVAR_CONST) \
_(137, ZEND_SL_SPEC_TMPVAR_TMPVAR) \
_(138, ZEND_SL_SPEC_TMPVAR_TMPVAR) \
_(140, ZEND_SL_SPEC_TMPVAR_CV) \
_(146, ZEND_SL_SPEC_CV_CONST) \
_(147, ZEND_SL_SPEC_CV_TMPVAR) \
_(148, ZEND_SL_SPEC_CV_TMPVAR) \
_(150, ZEND_SL_SPEC_CV_CV) \
_(127, ZEND_SL_SPEC_CONST_TMPVARCV) \
_(128, ZEND_SL_SPEC_CONST_TMPVARCV) \
_(130, ZEND_SL_SPEC_CONST_TMPVARCV) \
_(131, ZEND_SL_SPEC_TMPVARCV_CONST) \
_(132, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(133, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(135, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(136, ZEND_SL_SPEC_TMPVARCV_CONST) \
_(137, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(138, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(140, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(146, ZEND_SL_SPEC_TMPVARCV_CONST) \
_(147, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(148, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(150, ZEND_SL_SPEC_TMPVARCV_TMPVARCV) \
_(151, ZEND_SR_SPEC_CONST_CONST) \
_(152, ZEND_SR_SPEC_CONST_TMPVAR) \
_(153, ZEND_SR_SPEC_CONST_TMPVAR) \
_(155, ZEND_SR_SPEC_CONST_CV) \
_(156, ZEND_SR_SPEC_TMPVAR_CONST) \
_(157, ZEND_SR_SPEC_TMPVAR_TMPVAR) \
_(158, ZEND_SR_SPEC_TMPVAR_TMPVAR) \
_(160, ZEND_SR_SPEC_TMPVAR_CV) \
_(161, ZEND_SR_SPEC_TMPVAR_CONST) \
_(162, ZEND_SR_SPEC_TMPVAR_TMPVAR) \
_(163, ZEND_SR_SPEC_TMPVAR_TMPVAR) \
_(165, ZEND_SR_SPEC_TMPVAR_CV) \
_(171, ZEND_SR_SPEC_CV_CONST) \
_(172, ZEND_SR_SPEC_CV_TMPVAR) \
_(173, ZEND_SR_SPEC_CV_TMPVAR) \
_(175, ZEND_SR_SPEC_CV_CV) \
_(152, ZEND_SR_SPEC_CONST_TMPVARCV) \
_(153, ZEND_SR_SPEC_CONST_TMPVARCV) \
_(155, ZEND_SR_SPEC_CONST_TMPVARCV) \
_(156, ZEND_SR_SPEC_TMPVARCV_CONST) \
_(157, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(158, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(160, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(161, ZEND_SR_SPEC_TMPVARCV_CONST) \
_(162, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(163, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(165, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(171, ZEND_SR_SPEC_TMPVARCV_CONST) \
_(172, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(173, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(175, ZEND_SR_SPEC_TMPVARCV_TMPVARCV) \
_(177, ZEND_CONCAT_SPEC_CONST_TMPVAR) \
_(178, ZEND_CONCAT_SPEC_CONST_TMPVAR) \
_(180, ZEND_CONCAT_SPEC_CONST_CV) \
@ -123,38 +125,44 @@
_(198, ZEND_CONCAT_SPEC_CV_TMPVAR) \
_(200, ZEND_CONCAT_SPEC_CV_CV) \
_(201, ZEND_BW_OR_SPEC_CONST_CONST) \
_(206, ZEND_BW_OR_SPEC_TMPVAR_CONST) \
_(207, ZEND_BW_OR_SPEC_TMPVAR_TMPVAR) \
_(208, ZEND_BW_OR_SPEC_TMPVAR_TMPVAR) \
_(211, ZEND_BW_OR_SPEC_TMPVAR_CONST) \
_(212, ZEND_BW_OR_SPEC_TMPVAR_TMPVAR) \
_(213, ZEND_BW_OR_SPEC_TMPVAR_TMPVAR) \
_(221, ZEND_BW_OR_SPEC_CV_CONST) \
_(222, ZEND_BW_OR_SPEC_CV_TMPVAR) \
_(223, ZEND_BW_OR_SPEC_CV_TMPVAR) \
_(225, ZEND_BW_OR_SPEC_CV_CV) \
_(206, ZEND_BW_OR_SPEC_TMPVARCV_CONST) \
_(207, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(208, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(210, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(211, ZEND_BW_OR_SPEC_TMPVARCV_CONST) \
_(212, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(213, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(215, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(221, ZEND_BW_OR_SPEC_TMPVARCV_CONST) \
_(222, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(223, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(225, ZEND_BW_OR_SPEC_TMPVARCV_TMPVARCV) \
_(226, ZEND_BW_AND_SPEC_CONST_CONST) \
_(231, ZEND_BW_AND_SPEC_TMPVAR_CONST) \
_(232, ZEND_BW_AND_SPEC_TMPVAR_TMPVAR) \
_(233, ZEND_BW_AND_SPEC_TMPVAR_TMPVAR) \
_(236, ZEND_BW_AND_SPEC_TMPVAR_CONST) \
_(237, ZEND_BW_AND_SPEC_TMPVAR_TMPVAR) \
_(238, ZEND_BW_AND_SPEC_TMPVAR_TMPVAR) \
_(246, ZEND_BW_AND_SPEC_CV_CONST) \
_(247, ZEND_BW_AND_SPEC_CV_TMPVAR) \
_(248, ZEND_BW_AND_SPEC_CV_TMPVAR) \
_(250, ZEND_BW_AND_SPEC_CV_CV) \
_(231, ZEND_BW_AND_SPEC_TMPVARCV_CONST) \
_(232, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(233, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(235, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(236, ZEND_BW_AND_SPEC_TMPVARCV_CONST) \
_(237, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(238, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(240, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(246, ZEND_BW_AND_SPEC_TMPVARCV_CONST) \
_(247, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(248, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(250, ZEND_BW_AND_SPEC_TMPVARCV_TMPVARCV) \
_(251, ZEND_BW_XOR_SPEC_CONST_CONST) \
_(256, ZEND_BW_XOR_SPEC_TMPVAR_CONST) \
_(257, ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR) \
_(258, ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR) \
_(261, ZEND_BW_XOR_SPEC_TMPVAR_CONST) \
_(262, ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR) \
_(263, ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR) \
_(271, ZEND_BW_XOR_SPEC_CV_CONST) \
_(272, ZEND_BW_XOR_SPEC_CV_TMPVAR) \
_(273, ZEND_BW_XOR_SPEC_CV_TMPVAR) \
_(275, ZEND_BW_XOR_SPEC_CV_CV) \
_(256, ZEND_BW_XOR_SPEC_TMPVARCV_CONST) \
_(257, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(258, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(260, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(261, ZEND_BW_XOR_SPEC_TMPVARCV_CONST) \
_(262, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(263, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(265, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(271, ZEND_BW_XOR_SPEC_TMPVARCV_CONST) \
_(272, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(273, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(275, ZEND_BW_XOR_SPEC_TMPVARCV_TMPVARCV) \
_(276, ZEND_POW_SPEC_CONST_CONST) \
_(277, ZEND_POW_SPEC_CONST_TMPVAR) \
_(278, ZEND_POW_SPEC_CONST_TMPVAR) \

View File

@ -222,17 +222,17 @@ static const char *zend_vm_opcodes_names[195] = {
static uint32_t zend_vm_opcodes_flags[195] = {
0x00000000,
0x00000b0b,
0x00000b0b,
0x80000b0b,
0x00000707,
0x00000707,
0x80000707,
0x00000707,
0x00000707,
0x00000707,
0x00000707,
0x00000b0b,
0x00000b0b,
0x00000b0b,
0x40000707,
0x80000707,
0x80000707,
0x80000707,
0x80000b0b,
0x80000b0b,
0x80000b0b,
0x00000707,
0x00000007,
0x00000007,