[php-src] PR #24663: JIT: Fix AArch64 JIT encoding of invalid logical immediates

From: Date: Sat, 24 Oct 2026 20:30:41 +0000
Subject: [php-src] PR #24663: JIT: Fix AArch64 JIT encoding of invalid logical immediates
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39841@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24663 Author: jorgsowa Backport of the dasm_imm13() rewrite from DynASM (LuaJIT a9981441, LuaJIT/LuaJIT#1522), which landed in master with the IR update in #24298. The old dasm_imm13() accepts some constants that are not valid AArch64 logical immediates and returns a bogus encoding. AND/OR/XOR with such a constant then: - computes a wrong result, e.g. $x & 0x5555555555555554 has bit 0 set - or emits an illegal instruction (SIGILL), e.g. $x & 0x200000003 It also negates INT64_MIN in signed arithmetic (UB). Only dasm_imm13() and its helpers are taken from the DynASM update; the rest of that update stays in master.

« previous php.git-pulls (#39841) next »