[php-src] jit-arm64: Support for IS_LONG SUB and XOR.

From: Date: Tue, 20 Apr 2021 19:05:32 +0000
Subject: [php-src] jit-arm64: Support for IS_LONG SUB and XOR.
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-115712@lists.php.net to get a copy of this message
Author: Dmitry Stogov (dstogov) Date: 2021-04-20T19:30:46+03:00 Commit: https://github.com/php/php-src/commit/fe3356e0ca378ee5513c73c98e43b24e900d1d1c Raw diff: https://github.com/php/php-src/commit/fe3356e0ca378ee5513c73c98e43b24e900d1d1c.diff Support for IS_LONG SUB and XOR. Changed paths: A ext/opcache/tests/jit/arm64/sub_001.phpt A ext/opcache/tests/jit/arm64/xor_001.phpt M ext/opcache/jit/zend_jit_arm64.dasc Diff: diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index e1cbec1d03b0..3211b80a5b0d 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -734,7 +734,7 @@ static void* dasm_labels[zend_lb_MAX]; | LONG_OP adds, reg, addr, tmp_reg1, tmp_reg2 || break; || case ZEND_SUB: -| NIY // LONG_OP sub, reg, addr +| LONG_OP subs, reg, addr, tmp_reg1, tmp_reg2 || break; || case ZEND_MUL: | NIY // LONG_OP imul, reg, addr @@ -746,7 +746,6 @@ static void* dasm_labels[zend_lb_MAX]; | LONG_OP and, reg, addr, tmp_reg1, tmp_reg2 || break; || case ZEND_BW_XOR: -| NIY // TODO | LONG_OP eor, reg, addr, tmp_reg1, tmp_reg2 || break; || default: diff --git a/ext/opcache/tests/jit/arm64/sub_001.phpt b/ext/opcache/tests/jit/arm64/sub_001.phpt new file mode 100644 index 000000000000..4c98c1473886 --- /dev/null +++ b/ext/opcache/tests/jit/arm64/sub_001.phpt @@ -0,0 +1,20 @@ +--TEST-- +JIT SUB: 001 +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=32M +;opcache.jit_debug=257 +--EXTENSIONS-- +opcache +--FILE-- +<?php +function foo($var) { + $res = $var - 1; + var_dump($res); +} +foo(42); +?> +--EXPECT-- +int(41) diff --git a/ext/opcache/tests/jit/arm64/xor_001.phpt b/ext/opcache/tests/jit/arm64/xor_001.phpt new file mode 100644 index 000000000000..abae4cd1beee --- /dev/null +++ b/ext/opcache/tests/jit/arm64/xor_001.phpt @@ -0,0 +1,20 @@ +--TEST-- +JIT XOR: 001 +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=32M +;opcache.jit_debug=257 +--EXTENSIONS-- +opcache +--FILE-- +<?php +function foo($var) { + $res = $var ^ 1; + var_dump($res); +} +foo(5); +?> +--EXPECT-- +int(4)

« previous php.cvs (#115712) next »