In AArch64, 32 registers, i.e. v0~v31, can be used by the SIMD and floating-point operations. [1][2] In PHP the floating-point operations use 64-bit DOUBLE type, and SIMD operations are not supported currently. Hence we can use D registers directly. Note that "ZREG_V*" is kept to denote the register index. [1] https://developer.arm.com/documentation/den0024/a/ARMv8-Registers/NEON-and-floating-point-registers/Scalar-register-sizes [2] https://github.com/ARM-software/abi-aa/blob/2bcab1e3b22d55170c563c3c7940134089176746/aapcs64/aapcs64.rst#612simd-and-floating-point-registers Change-Id: I286ce07a49e837b560e3401c742ec91fc561546b
Opcache JIT
This is the implementation of Opcache's JIT (Just-In-Time compiler), This converts the PHP Virtual Machine's opcodes into x64/x86 assembly, on POSIX platforms and Windows.
It generates native code directly from PHP byte-code and information collected by the SSA static analysis framework (a part of the opcache optimizer). Code is usually generated separately for each PHP byte-code instruction. Only a few combinations are considered together (e.g. compare + conditional jump).
See the JIT RFC for more details.
DynAsm
This uses DynAsm (developed for LuaJIT project) for the generation of native code. It's a very lightweight and advanced tool, but does assume good, and very low-level development knowledge of target assembler languages. In the past we tried LLVM, but its code generation speed was almost 100 times slower, making it prohibitively expensive to use.
The unofficial DynASM Documentation has a tutorial, reference, and instruction listing.
zend_jit_x86.dasc gets automatically converted to zend_jit_x86.c by the bundled
dynasm during make.