1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 05:32:28 +02:00
Files
archived-php-src/ext/opcache/jit
Hao Sun 191fb2a364 Updates for commits between 121a0f7 and 12dcf34
1. Pre-allocated bytes are missing in function
zend_jit_assign_const_stub().

2. 'w' register should be used for macro SET_ZVAL_TYPE_INFO.

3. 'w' register should be used to load "num_args" in function
zend_jit_do_fcall().

4. Remove the local path name in test case recv_002.phpt

5. One option is disabled temporarily in [1] and several test cases
would fail, e.g. shift_right_003.phpt. I suppose new execution paths are
touched. We will support them in the near future.

[1] https://github.com/php/php-src/commit/63d673d
2021-05-18 15:32:26 +03:00
..
2021-05-12 13:40:13 +03:00
2021-05-18 15:32:23 +03:00
2021-05-06 14:34:28 +02:00
2021-05-18 15:32:23 +03:00
2021-05-18 15:32:23 +03:00
2021-05-18 15:32:23 +03:00
2021-05-18 15:32:23 +03:00
2021-05-18 15:32:23 +03:00
2021-05-18 15:32:23 +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.