[php-src] master: Merge branch 'PHP-8.6'

From: Date: Tue, 27 Oct 2026 21:49:23 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142863@lists.php.net to get a copy of this message
Author: Jorg Sowa (jorgsowa) Date: 2026-10-27T22:38:11+01:00 Commit: https://github.com/php/php-src/commit/780f4e8217b7e6afc28477b6ca12ba8efe7ba6c8 Raw diff: https://github.com/php/php-src/commit/780f4e8217b7e6afc28477b6ca12ba8efe7ba6c8.diff Merge branch 'PHP-8.6' * PHP-8.6: Fix AArch64 JIT encoding of invalid logical immediates Changed paths: A ext/opcache/tests/jit/and_003.phpt A ext/opcache/tests/jit/and_004.phpt A ext/opcache/tests/jit/or_001.phpt A ext/opcache/tests/jit/or_002.phpt A ext/opcache/tests/jit/xor_004.phpt A ext/opcache/tests/jit/xor_005.phpt Diff: diff --git a/ext/opcache/tests/jit/and_003.phpt b/ext/opcache/tests/jit/and_003.phpt new file mode 100644 index 000000000000..8a6abbc0e1c3 --- /dev/null +++ b/ext/opcache/tests/jit/and_003.phpt @@ -0,0 +1,19 @@ +--TEST-- +JIT BW_AND: 003 (non-encodable AArch64 logical immediate, wrong result) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit=function +opcache.jit_buffer_size=64M +--EXTENSIONS-- +opcache +--SKIPIF-- +<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?> +--FILE-- +<?php +function foo($x) { return $x & 0x5555555555555554; } +var_dump(foo(-1)); +?> +--EXPECT-- +int(6148914691236517204) diff --git a/ext/opcache/tests/jit/and_004.phpt b/ext/opcache/tests/jit/and_004.phpt new file mode 100644 index 000000000000..6debc67bf5e4 --- /dev/null +++ b/ext/opcache/tests/jit/and_004.phpt @@ -0,0 +1,19 @@ +--TEST-- +JIT BW_AND: 004 (non-encodable AArch64 logical immediate, illegal instruction) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit=function +opcache.jit_buffer_size=64M +--EXTENSIONS-- +opcache +--SKIPIF-- +<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?> +--FILE-- +<?php +function foo($x) { return $x & 0x200000003; } +var_dump(foo(-1)); +?> +--EXPECT-- +int(8589934595) diff --git a/ext/opcache/tests/jit/or_001.phpt b/ext/opcache/tests/jit/or_001.phpt new file mode 100644 index 000000000000..7adfd0fdf895 --- /dev/null +++ b/ext/opcache/tests/jit/or_001.phpt @@ -0,0 +1,19 @@ +--TEST-- +JIT BW_OR: 001 (non-encodable AArch64 logical immediate, wrong result) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit=function +opcache.jit_buffer_size=64M +--EXTENSIONS-- +opcache +--SKIPIF-- +<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?> +--FILE-- +<?php +function foo($x) { return $x | 0x5555555555555554; } +var_dump(foo(0)); +?> +--EXPECT-- +int(6148914691236517204) diff --git a/ext/opcache/tests/jit/or_002.phpt b/ext/opcache/tests/jit/or_002.phpt new file mode 100644 index 000000000000..8c2b37af297d --- /dev/null +++ b/ext/opcache/tests/jit/or_002.phpt @@ -0,0 +1,19 @@ +--TEST-- +JIT BW_OR: 002 (non-encodable AArch64 logical immediate, illegal instruction) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit=function +opcache.jit_buffer_size=64M +--EXTENSIONS-- +opcache +--SKIPIF-- +<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?> +--FILE-- +<?php +function foo($x) { return $x | 0x200000003; } +var_dump(foo(0)); +?> +--EXPECT-- +int(8589934595) diff --git a/ext/opcache/tests/jit/xor_004.phpt b/ext/opcache/tests/jit/xor_004.phpt new file mode 100644 index 000000000000..cb9709d841bd --- /dev/null +++ b/ext/opcache/tests/jit/xor_004.phpt @@ -0,0 +1,19 @@ +--TEST-- +JIT XOR: 004 (non-encodable AArch64 logical immediate, wrong result) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit=function +opcache.jit_buffer_size=64M +--EXTENSIONS-- +opcache +--SKIPIF-- +<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?> +--FILE-- +<?php +function foo($x) { return $x ^ 0x5555555555555554; } +var_dump(foo(0)); +?> +--EXPECT-- +int(6148914691236517204) diff --git a/ext/opcache/tests/jit/xor_005.phpt b/ext/opcache/tests/jit/xor_005.phpt new file mode 100644 index 000000000000..b0afa9f1da8a --- /dev/null +++ b/ext/opcache/tests/jit/xor_005.phpt @@ -0,0 +1,19 @@ +--TEST-- +JIT XOR: 005 (non-encodable AArch64 logical immediate, illegal instruction) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit=function +opcache.jit_buffer_size=64M +--EXTENSIONS-- +opcache +--SKIPIF-- +<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?> +--FILE-- +<?php +function foo($x) { return $x ^ 0x200000003; } +var_dump(foo(0)); +?> +--EXPECT-- +int(8589934595)

« previous php.cvs (#142863) next »