summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2020-04-22 13:49:54 +0300
committerDmitry Stogov <dmitry@zend.com>2020-04-22 13:49:54 +0300
commit572b799b52f26ac3ae3ad7dd5dc7eed71d0875b2 (patch)
tree62e580ce7e55083072c78d5c53267b42938a1e50
parentf6455c504813dfec9ef1fbfdf88c9d5f4e164876 (diff)
downloadphp-git-572b799b52f26ac3ae3ad7dd5dc7eed71d0875b2.tar.gz
Fixed register allocation constraints
-rw-r--r--ext/opcache/jit/zend_jit_x86.dasc14
1 files changed, 3 insertions, 11 deletions
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc
index 3508724882..6ba439239b 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -11024,10 +11024,7 @@ static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zen
case ZEND_MUL:
op1_info = OP1_INFO();
op2_info = OP2_INFO();
- if ((op1_info | op2_info) & MAY_BE_UNDEF) {
- return 0;
- }
- return (op1_info & op2_info & (MAY_BE_LONG|MAY_BE_DOUBLE)) != 0;
+ return !((op1_info | op2_info) & (MAY_BE_ANY - (MAY_BE_LONG|MAY_BE_DOUBLE)));
case ZEND_BW_OR:
case ZEND_BW_AND:
case ZEND_BW_XOR:
@@ -11036,18 +11033,13 @@ static zend_bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zen
case ZEND_MOD:
op1_info = OP1_INFO();
op2_info = OP2_INFO();
- if ((op1_info | op2_info) & MAY_BE_UNDEF) {
- return 0;
- }
- return (op1_info & op2_info & MAY_BE_LONG) != 0;
+ return !((op1_info | op2_info) & (MAY_BE_ANY - MAY_BE_LONG));
case ZEND_PRE_INC:
case ZEND_PRE_DEC:
case ZEND_POST_INC:
case ZEND_POST_DEC:
op1_info = OP1_INFO();
- return
- opline->op1_type == IS_CV &&
- (op1_info & MAY_BE_LONG);
+ return opline->op1_type == IS_CV && !(op1_info & (MAY_BE_ANY - MAY_BE_LONG));
case ZEND_BOOL:
case ZEND_BOOL_NOT:
case ZEND_JMPZ: