Dmitry Stogov
dde5572937
Eliminate some repeatable IS_REFERENCE checks
2020-12-10 14:45:54 +03:00
Dmitry Stogov
e9f9e9f863
Perform early guard type check for result of FETCH_CONSTANT
2020-12-09 22:24:03 +03:00
Dmitry Stogov
8d268e8443
Fixed IS_32BIT/IS_SIGNED_32BIT mess
2020-12-09 17:16:54 +03:00
Dmitry Stogov
db34491a62
Avoid unnecessary checks
2020-12-08 13:10:35 +03:00
Dmitry Stogov
7971602574
Fixed bug #80480 (Segmentation fault with JIT enabled)
2020-12-07 13:28:37 +03:00
Christoph M. Becker
72cd5793be
Fix failing VirtualProtect() calls
...
Whenever JIT is disabled due to incompatibilities, we also need to set
`JIT_G(on)` to zero.
Closes GH-6470.
2020-12-02 16:51:50 +01:00
Dmitry Stogov
1674c96c0b
Bug #80447 (Strange out of memory error when running with JIT)
2020-12-01 16:43:05 +03:00
Dmitry Stogov
841b00f641
Preallocate stack space for JIT in execute_ex() to eliminate JIT prologue/epilogue.
2020-11-30 17:56:08 +03:00
Dmitry Stogov
5f36d0497f
Fixed "may be used uninitialized" compilation warnings
2020-11-30 17:46:43 +03:00
Dmitry Stogov
a0baa09b99
Hide phpdbg/JIT incompatibility macro (JIT is disabled for phpdbg)
2020-11-30 16:42:17 +03:00
Dmitry Stogov
d5a82e2c4e
Disable JIT with incompatible third-party extensions
2020-11-30 13:58:34 +03:00
Nikita Popov
2772f7c3ad
Avoid direct calls to zend_cpu_supports()
...
While the use of zend_cpu_supports_*() is only strictly necessary
inside ifunc resolvers, where the cpu state has not been initialized
yet, we should prefer the compiler builtins in all cases.
2020-11-27 11:18:10 +01:00
Nikita Popov
4a7ebb6d83
Move avx check into a macro
2020-11-27 11:06:05 +01:00
Nikita Popov
48ff654fb9
Fixed bug #80433
...
Use ZEND_STRTOL to allow leading zeros in opcache.jit option.
2020-11-27 10:51:57 +01:00
Dmitry Stogov
3697648be5
Eliminate deafd stores
2020-11-26 21:05:07 +03:00
Dmitry Stogov
cb399d0410
Use diferent temporary register (%r0 may keep a method address)
2020-11-25 03:49:42 +03:00
Dmitry Stogov
337d2af6ca
zend_jit_trace_stack_frame.stack can't be NULL
2020-11-23 16:19:22 +03:00
Dmitry Stogov
586ccfdfd5
Fixed use-after-free in PHPUnit tests
2020-11-23 14:42:38 +03:00
Dmitry Stogov
4cf3da7383
Keep value of register before possible side exit
2020-11-23 12:07:05 +03:00
Dmitry Stogov
c0d1dbcb43
Fixed incorrect TRACE_FRAME_MASK_NESTED flag setting
2020-11-20 18:22:21 +03:00
Dmitry Stogov
c8df28d276
Fixed 32-bit JIT
2020-11-20 15:12:30 +03:00
Dmitry Stogov
069f9cbaa5
Added missing deoptimization code for trampoline handling
2020-11-19 12:32:36 +03:00
Dmitry Stogov
feed041fc8
Fixed register clobbering
2020-11-18 10:22:25 +03:00
Dmitry Stogov
9841e8e411
Fixed trampoline handling
2020-11-17 23:56:05 +03:00
Dmitry Stogov
e364af91b5
Fixed allocated register clobbering
2020-11-17 18:31:14 +03:00
Dmitry Stogov
1523733bc4
Fixed false pasitive ASAN NULL pointer dereference warning
2020-11-17 16:23:30 +03:00
Dmitry Stogov
e3c63de05b
Fixed alias handling
2020-11-16 16:11:25 +03:00
Dmitry Stogov
eb6d496a93
Fixed reference-counting
2020-11-16 14:51:55 +03:00
Dmitry Stogov
edf5c1901f
Fixed incorrect FETCH_THIS optimization
2020-11-16 14:51:39 +03:00
Dmitry Stogov
bd321df479
Fixed inconsistent VM stack state
2020-11-16 13:19:44 +03:00
Dmitry Stogov
64dc79f906
Trampoline cleanup
2020-11-16 12:05:45 +03:00
Dmitry Stogov
9acebe14df
Fixed incorrectly eliminated type store
2020-11-11 20:13:58 +03:00
Dmitry Stogov
03e7854381
Remove assertion
2020-11-11 18:34:16 +03:00
Dmitry Stogov
2d2d42b268
Fixed incorrect invariant guard motion
2020-11-11 17:34:46 +03:00
Dmitry Stogov
de359c00b4
Stop on fake frame
2020-11-11 14:54:54 +03:00
Dmitry Stogov
a0de82ad75
Fixed reference-counting propagation
2020-11-11 14:54:00 +03:00
Dmitry Stogov
11c4821ba9
[Observer+JIT] Save opline before calling begin/end handlers
2020-11-11 13:50:53 +03:00
Dmitry Stogov
4bbe55b250
Fixed missaligned access
2020-11-09 11:50:26 +03:00
Dmitry Stogov
98e4f9466d
Move stack overflow checks out of the loops
2020-11-06 12:09:56 +03:00
Dmitry Stogov
ff91800602
Fixed incorrect invariant guard motion
2020-11-05 18:32:00 +03:00
Nikita Popov
0571f09424
Rename opcache.jit_max_loops_unroll to opcache.jit_max_loop_unrolls
2020-11-02 12:25:21 +01:00
Alex Dowad
d44235acae
Convert numeric string array keys to integers correctly in JITted code
...
While fixing bugs in mbstring, one of my new test cases failed with a strange
error message stating: 'Warning: Undefined array key 1...', when clearly the
array key had been set properly.
GDB'd that sucker and found that JIT'd PHP code was calling directly into
`zend_hash_add_new` (which was not converting the numeric string key to an
integer properly). But where was that code coming from? I examined the disasm,
looked up symbols to figure out where call instructions were going, then grepped
the codebase for those function names. It soon became clear that the disasm I
was looking at was compiled from `zend_jit_fetch_dim_w_helper`.
2020-10-30 22:07:08 +02:00
Dmitry Stogov
b133183e35
Create TSSA loops for recursive call/return traces and move invariant type guards out of loops.
2020-10-30 13:08:31 +03:00
Dmitry Stogov
47a56208f0
Fixed memory leak in Zend/tests/bug78999.phpt
2020-10-28 10:47:23 +03:00
Dmitry Stogov
e6b51ccc58
Fixed tracing JIT support for aliasses (Zend/tests/bug75420.13.phpt and ext/standard/tests/streams/bug60106.phpt)
2020-10-27 23:44:29 +03:00
Dmitry Stogov
43e493884c
Fixed support for named parameters (Zend/tests/named_params/references.phpt)
2020-10-27 16:35:24 +03:00
Dmitry Stogov
45e2b9a7dd
Fixed support for typed references
2020-10-27 12:59:35 +03:00
Dmitry Stogov
b8a6717da6
Fixed tracing JIT for tests/classes/unset_properties.phpt
2020-10-27 10:30:38 +03:00
Dmitry Stogov
a17cec446a
Fixed memory leak
2020-10-27 01:20:22 +03:00
Dmitry Stogov
ba525a68d9
Fixed register allocation
2020-10-26 21:48:47 +03:00