Nikita Popov
ea256a218b
Add %0 format to run-tests.php
...
This format matches against null bytes, and prevents the test
expectation from being interpreted as binary data.
bless_tests.php will automatically replace \0 with %0 as well.
2021-05-29 11:33:13 +02:00
Máté Kocsis
48981f4f1e
Declare tentative return types for ext/standard ( #7065 )
2021-05-28 15:46:04 +02:00
Nikita Popov
010d6a491c
Convert SKIPIF -> EXTENSIONS in new opcache test
2021-05-27 16:33:30 +02:00
Dmitry Stogov
a50a1b643e
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #81051 (Broken property type handling after incrementing reference)
2021-05-27 15:23:20 +03:00
Dmitry Stogov
ac65f6af6e
Fixed bug #81051 (Broken property type handling after incrementing reference)
2021-05-27 15:22:34 +03:00
twosee
795efd7613
Add zend_getpagesize() and reuse it in accelerator and fiber ( #7057 )
2021-05-27 18:27:18 +08:00
Dmitry Stogov
3c827b3084
Fixed ARM64 JIT build
2021-05-27 13:22:07 +03:00
Dmitry Stogov
5557cb7950
Fix edge cases in JIT for ASSIGN_DIM_OP.
2021-05-27 13:19:24 +03:00
Máté Kocsis
ceb0951fa5
mysqli_get_client_info() cannot return null
...
This method is already deprecated
2021-05-26 17:48:35 +02:00
Nikita Popov
9f6ee9f4d7
Update func info for mysqli_connect
2021-05-26 14:36:21 +02:00
Nikita Popov
1fb9f5f93e
Revert "Fix edge cases in JIT for ASSIGN_DIM_OP."
...
This reverts commit 4744dc8d21 .
This seems to have broken some tests in sapi/fpm, and also causes
the test runner to get killed.
2021-05-24 20:46:42 +02:00
Dmitry Stogov
4744dc8d21
Fix edge cases in JIT for ASSIGN_DIM_OP.
...
(This fixes Zend/tests/bug79947.phpt and
Zend/tests/undef_index_to_exception.phpt without PROFITABILITY_CHECKS).
2021-05-24 13:35:04 +03:00
Dmitry Stogov
88631e329b
DynASM/ARM64: Fix ADRP encoding with absolute address.
...
(Switch to Mike Pall's version)
2021-05-24 10:17:52 +03:00
Dmitry Stogov
77ce2537f7
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Disable ASSIGN + SEND_VAL fusion for cases when destroying of old value may throw an exception.
2021-05-21 13:38:50 +03:00
Dmitry Stogov
11a7310b49
Disable ASSIGN + SEND_VAL fusion for cases when destroying of old value may throw an exception.
2021-05-21 13:36:58 +03:00
Hao Sun
3ce26d80b7
JIT/AArch64: [macos] Fix arguments to variadic function ( #7023 )
...
zend_throw_error() and zend_error() are variadic functions. In Linux,
arguments are passed in registers, whereas they must be put on stack in
Macos [1][2].
In this patch:
1. preprocessor macro "__APPLE__" is used to distinguish the OS.
2. the third argument "CARG3" is the only variadic argument and put on
stack.
3. the invocation of zend_error() is converted back to regular call in
zend_jit_undefined_offset_stub() and zend_jit_undefined_index_stub().
With this patch, all ~4k test cases can pass for "nonZTS+CALL"
functional/tracing JIT with Macos Apple Silicion.
[1]
https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Overview
[2] https://github.com/below/HelloSilicon#listing-9-1
Change-Id: I49bc3233fc253ad3e77e8664464ff3e830dcd183
2021-05-21 17:59:15 +08:00
Dmitry Stogov
0b4706819b
Fix register save/restore around calls. (This fixes ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202 without PROFITABILITY_CHECKS)
2021-05-21 11:12:22 +03:00
Dmitry Stogov
e9d171805a
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix register save/restore around calls. (This fixes ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202 without PROFITABILITY_CHECKS)
2021-05-21 11:10:20 +03:00
Dmitry Stogov
025c0763e7
Fix register save/restore around calls. (This fixes
...
ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202
without PROFITABILITY_CHECKS)
2021-05-21 11:08:56 +03:00
Dmitry Stogov
ab1827f3d4
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Add missing undefined variable warning an result initialization. (This fixes Zend/tests/bug78531.phpt without PROFITABILITY_CHECKS).
2021-05-21 10:04:38 +03:00
Dmitry Stogov
bf21261c63
Add missing undefined variable warning an result initialization.
...
(This fixes Zend/tests/bug78531.phpt without PROFITABILITY_CHECKS).
2021-05-21 10:03:00 +03:00
Hao Sun
b8a29319a7
JIT/AArch64: Fix typo in commit dc0e259 ( #7021 )
...
PHP JIT/AArch64 building is broken. Instruction "beq" should be used.
Change-Id: I16c00f87bafb3a565141e1e02c9e15653f39a276
2021-05-21 14:06:33 +08:00
Dmitry Stogov
6881a002d4
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Don't assign to string offset after exception (This fixes Zend/tests/bug31098.phpt failure without PROFITABILITY_CHECKS)
2021-05-21 00:49:44 +03:00
Dmitry Stogov
db309b2e4b
Don't assign to string offset after exception (This fixes
...
Zend/tests/bug31098.phpt failure without PROFITABILITY_CHECKS)
2021-05-21 00:48:24 +03:00
Dmitry Stogov
dc0e259154
Merge branch 'PHP-8.0'
...
* PHP-8.0:
JIT: Fixed incorrect condition (this leaded to Zend/tests/type_declarations/typed_properties_083.phpt failure without PROFITABILITY_CHECKS)
2021-05-21 00:02:46 +03:00
Dmitry Stogov
cce0cc8836
JIT: Fixed incorrect condition (this leaded to
...
Zend/tests/type_declarations/typed_properties_083.phpt failure without
PROFITABILITY_CHECKS)
2021-05-21 00:01:00 +03:00
Dmitry Stogov
cb376d8f61
Fixed Zend/tests/type_declarations/union_types/incdec_prop.phpt failure
...
masked by PROFITABILITY_CHECKS.
2021-05-20 22:52:47 +03:00
Dmitry Stogov
6be0278332
Fixed 32-bit x86 disassembler
2021-05-20 20:17:50 +03:00
Dmitry Stogov
4135ce9d38
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #80968 (JIT segfault with return from required file)
2021-05-20 16:50:14 +03:00
Dmitry Stogov
6e2d47e071
Fixed bug #80968 (JIT segfault with return from required file)
2021-05-20 16:45:24 +03:00
Dmitry Stogov
f44ff44516
JIT/AArch64: Fixed incorrect MEM_LOAD usage
2021-05-20 14:43:49 +03:00
Dmitry Stogov
53021b4b9b
JIT/AArch64: Fixed DWARF frame description for helper stubs
2021-05-20 12:14:29 +03:00
Dmitry Stogov
e5d2681074
JIT/AArch64: Link traces through exit tables.
...
1. Generate exit table at the end of each trace (list of unconditional branches for all side exit)
2. Jump to this table if conditional branch to side exit can't be performed because of limited jump distance (+/-1MB) (avoid extra veneers for side exits).
3. During trace linking, update targets of conditional branches to this exit table, if target trace can't be reachd because of limited jump distance (+/-1MB)
2021-05-20 02:53:00 +03:00
Dmitry Stogov
7358457aa7
JIT: Don't include zend_jit_trace_info.jmp_table_size into zend_jit_trace_info.code_size
2021-05-20 02:46:14 +03:00
Dmitry Stogov
45325bd425
JIT/AArch64: Fixed code alignment
2021-05-20 02:32:35 +03:00
Dmitry Stogov
d52fdd5056
DynASM/ARM64: Fixed incorrect ADRP instruction encoding (-4 => +4)
2021-05-19 18:21:01 +03:00
Nikita Popov
f31c531960
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Move preload_autoload assignment into preload_load()
2021-05-19 12:56:28 +02:00
Nikita Popov
62a9f97381
Move preload_autoload assignment into preload_load()
...
We need to set the preload autoloader even if preloading happened
in a different process. accel_preload() will only run in one.
In particular, this fixes the behavior if preload_user is used.
2021-05-19 12:55:46 +02:00
Dmitry Stogov
9a907b2e17
JIT/AArch64: Combine ADRP+ADD+LDR into ADRP+LDR
...
before:
adrp x15, #0xffff8ae5a000
add x15, x15, #0xd90
ldr d16, [x15]
after:
adrp x15, #0xffff8ae5a000
ldr d16, [x15, #0xd90]
2021-05-19 13:23:28 +03:00
Dmitry Stogov
ddb35fe14a
JIT/AArch64: Use ADR/ADRP if it makes sense
2021-05-19 11:52:59 +03:00
Dmitry Stogov
dec7b7493b
DynASM/ARM64: Fixed incorrect ADRP instruction encoding
...
See: https://developer.arm.com/documentation/ddi0596/2021-03/Base-Instructions/ADRP--Form-PC-relative-address-to-4KB-page-
2021-05-19 11:51:30 +03:00
Dmitry Stogov
2fabe2751c
JIT/AArch64: Rename B_IMM26 into B_IMM.
2021-05-19 09:47:23 +03:00
Dmitry Stogov
a6bb79f16d
Correct DWARF frame description.
...
Now GDB correctly shows backtraces that involves JIT-ed code for
functional/tracing JIT, HYBRID/CALL VM, x86/AArch64 CPU.
(opcache.jit_debug=0x100 should be set).
2021-05-19 09:09:51 +03:00
Dmitry Stogov
767a4af2c7
Introduce and use ZEND_JIT_TARGET_X86 and ZEND_JIT_TARGET_ARM64 macros.
...
Remove x86 specific code from ext/opcache/jit/zend_jit_arm64.dasc.
Fixed ARM64 build without libcapstone.
2021-05-18 21:59:32 +03:00
Dmitry Stogov
5fe2062585
Correct DWARF frame description.
...
Now GDB correctly shows backtraces that involves JIT-ed code for
functional/tracing JIT, HYBRID/CALL VM, x86/AArch64 CPU.
(opcache.jit_debug=0x100 should be set).
2021-05-18 18:21:08 +03:00
Dmitry Stogov
dae662ffbc
Fixed zend_long_is_power_of_two/zend_long_floor_log2 mess
2021-05-18 15:32:36 +03:00
Dmitry Stogov
d6d0b1c389
Remove unnecessary #ifdef
2021-05-18 15:32:36 +03:00
Dmitry Stogov
f70ac416c3
Fixed possible failure when repair after overflow detection
2021-05-18 15:32:36 +03:00
Dmitry Stogov
a69701de2e
Fix "store to misaligned address" ASAN warnings
2021-05-18 15:32:36 +03:00
Dmitry Stogov
d6bf98428d
Fixed format specifier
2021-05-18 15:32:35 +03:00