php-src/ext/opcache/jit
2022-10-17 11:22:59 +03:00
..
dynasm Avoid ASAN integer overflow warnings 2021-07-19 14:53:23 +03:00
libudis86 opcache jit fix message format for OpenBSD. 2022-08-19 16:40:29 +01:00
vtune
Makefile.frag Fix opcache phpize build on FreeBSD 2021-01-25 15:10:47 +01:00
Makefile.frag.w32
README.md
zend_elf.c opcache: more reliable way to get the current binary on solaris/illumos 2021-05-06 14:33:53 +02:00
zend_elf.h
zend_jit.c Discard disasm symbols on opcache restart 2022-10-17 11:22:59 +03:00
zend_jit.h Disable JIT with incompatible third-party extensions 2020-11-30 13:58:34 +03:00
zend_jit_disasm_x86.c JIT: Fix memory leak 2022-02-28 15:43:03 +03:00
zend_jit_gdb.c opcache gdb: Set the EI_OSABI value for NetBSD. 2020-08-07 17:00:32 +02:00
zend_jit_helpers.c JIT: Fixed memory leak 2022-03-25 16:54:50 +03:00
zend_jit_internal.h Tracing JIT: Fixed incorrect assumption about stack slot type 2022-04-11 11:42:01 +03:00
zend_jit_oprofile.c
zend_jit_perf_dump.c opcache: more reliable way to get the current binary on solaris/illumos 2021-05-06 14:33:53 +02:00
zend_jit_trace.c Fix typo 2022-10-05 21:39:16 +03:00
zend_jit_vm_helpers.c Tracing: Prevent recording types of variables used to pass zend_class_entry 2022-08-01 17:02:53 +03:00
zend_jit_vtune.c
zend_jit_x86.dasc Fix abstract trace consisency for FE_FETCH instruction 2022-10-03 14:48:03 +03:00
zend_jit_x86.h Eliminate some reference-counting 2020-07-17 00:40:10 +03:00

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.