Skip to content

Commit

Permalink
JIT: Fixed DASM_S_RANGE_VREG error
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Oct 18, 2021
1 parent 13d1244 commit e59d0a7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ext/opcache/jit/zend_jit_x86.dasc
Expand Up @@ -979,7 +979,7 @@ static void* dasm_labels[zend_lb_MAX];
|| if (Z_TYPE_P(zv) > IS_TRUE) {
|| if (Z_TYPE_P(zv) == IS_DOUBLE) {
|| zend_reg dst_reg = (Z_MODE(dst_addr) == IS_REG) ?
|| Z_REG(dst_addr) : ((Z_MODE(res_addr) == IS_REG) ? Z_MODE(res_addr) : ZREG_XMM0);
|| Z_REG(dst_addr) : ((Z_MODE(res_addr) == IS_REG) ? Z_REG(res_addr) : ZREG_XMM0);
|| if (Z_DVAL_P(zv) == 0.0 && !is_signed(Z_DVAL_P(zv))) {
|| if (CAN_USE_AVX()) {
| vxorps xmm(dst_reg-ZREG_XMM0), xmm(dst_reg-ZREG_XMM0), xmm(dst_reg-ZREG_XMM0)
Expand Down
21 changes: 21 additions & 0 deletions ext/opcache/tests/jit/assign_044.phpt
@@ -0,0 +1,21 @@
--TEST--
JIT ASSIGN: DASM_S_RANGE_VREG error
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
opcache.protect_memory=1
--FILE--
<?php
function test($x) {
if ($x) {
unknown($value);
}
var_dump($value = INF);
}
test(false);
?>
--EXPECT--
float(INF)

0 comments on commit e59d0a7

Please sign in to comment.