1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00
Commit Graph

77 Commits

Author SHA1 Message Date
Dmitry Stogov 3cc6dd9c76 Fixed JIT 2019-07-19 10:50:51 +03:00
Nikita Popov cf7dd00280 Drop support for JIT without SSE
Closes GH-4388.
2019-07-10 17:31:51 +02:00
Nikita Popov 36235cf5d7 Read from original address
References are derefed into FCARG1, which is later clobbered by the
undef handling code. Make sure we load from the original address
instead.
2019-07-10 14:13:29 +02:00
Nikita Popov 26431d1995 Implement array access notice in JIT 2019-07-10 12:20:16 +02:00
Dmitry Stogov db02d7ae75 Reduce cost for GC references to strings and resources in JIT 2019-07-10 12:41:19 +03:00
Nikita Popov 3ee570ae0d Remove redundant variable declaration 2019-07-08 12:50:00 +02:00
David Carlier 5e13688142 JIT: Reading php binary symbols list on FreeBSD
Closes GH-4363.
2019-07-08 12:39:18 +02:00
Nikita Popov da8b583ac1 Always generate interrupt check in jit
Even if zend_interrupt_function is NULL, we still need to perform
the interrupt check for timeouts (which do not use
zend_interrupt_function).
2019-07-05 20:52:30 +02:00
Dmitry Stogov 1b5b8175af Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
2019-07-05 12:16:30 +03:00
Nikita Popov 4a8fe02c7c Undef opline result on mod/shift error in jit 2019-07-01 10:15:06 +02:00
Nikita Popov b7ed20662e Fix out of bounds read in jit_fetch_obj_read 2019-07-01 09:54:21 +02:00
Nikita Popov 7a1ca07a60 Don't try to exclude zreg_none
zreg_none has no representation in the regset, so this operation
doesn't make sense.
2019-06-21 10:24:58 +02:00
Nikita Popov 291eb19419 Dasm: Perform unaligned stores through unaligned pointers 2019-06-21 09:47:25 +02:00
Nikita Popov 42f3ed480d Avoid shift ub for regsets 2019-06-20 17:24:32 +02:00
Nikita Popov bb940d9969 Avoid UB in overflow checks
Some of the overflow checks in zend_may_overflow were optimized
away by clang, causing JIT failures on release macos.
2019-06-19 12:02:42 +02:00
Dmitry Stogov 22b2d9d088 Fixed JIT failure, on ZTS build without global register vatriables 2019-06-18 13:52:52 +03:00
Dmitry Stogov 7a236b6761 Attempt to fix JIT on Mac OSX ZTS build 2019-06-17 17:08:58 +03:00
Nikita Popov 4d90848d68 Don't verify arginfo types for internal functions
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.

Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00
Dmitry Stogov 5883dbcb18 Fixed incorect register allocation in ZTS build 2019-06-14 00:29:22 +03:00
Nikita Popov 3b27689d46 Fix helper call on 32-bit
This is using the fast-call calling convention. Use FCARG1a and
same code for 32-bit and 64-bit.
2019-06-13 12:11:23 +02:00
Nikita Popov 792e38d863 Fix bug #78154 with JIT 2019-06-13 11:53:31 +02:00
Nikita Popov 51d82da6b0 Suppress -Wtautological-compare in dasc file 2019-06-13 09:59:42 +02:00
Nikita Popov 39034dbc67 Determine thread ID on macos
Also initialize the variable to 0 -- I don't think we really care
if this is not determine on some platform, but it should at least
not be uninitialized.
2019-06-13 09:59:42 +02:00
Nikita Popov e4fae9c061 Merge branch 'PHP-7.4' 2019-06-11 13:16:38 +02:00
Nikita Popov 45a0656e95 Remove get() object handler
Now that set() is gone, there is little point in keeping get(), as
it is essentially just a different way of writing cast_object()
now.

Closes GH-4202.
2019-05-29 17:15:19 +02:00
Nikita Popov b7a6430a52 Don't JIT functions with many blocks
Avoids a stack overflow in Zend/tests/runtime_compile_time_binary_operands.php
that happens in recursive RPO calculation. We could make that code
non-recursive, but I don't think it makes sense to JIT this kind of
function in the first place.
2019-05-29 11:49:44 +02:00
Nikita Popov 4d1d5babde Respect optimization_level when running JIT inference
Don't enable unsafe type inference by default -- we'll segfault on
some FFI tests.
2019-05-28 17:29:28 +02:00
Nikita Popov 0bd1fc225d JIT: Fix SWITCH_LONG/STRING codegen with exact type
We were not loading the operand if the type was known exactly.
2019-05-28 15:25:19 +02:00
Dmitry Stogov 38c75f8fd3 Fixed register allocation 2019-05-28 12:39:13 +03:00
Dmitry Stogov 66a1d821d3 Improved code for unordered comparison 2019-05-06 16:07:48 +03:00
Markus Staab 1db95f8e46 fixed typo 2019-04-29 11:07:22 +02:00
David Carlier 3a2cc1614a JIT profiling other BSD build fixes 2019-04-24 14:52:50 +02:00
Dmitry Stogov 4c25fc5479 Implemented JIT for SWITCH_LONG/SWITCH_STRING 2019-04-23 17:40:10 +03:00
Dmitry Stogov 74153193c6 Use _zend_hash_find_known_hash() for IS_CONST operand 2019-04-22 21:07:05 +03:00
Dmitry Stogov 499b25c303 Fixed JIT for DEFINED opcode 2019-04-22 20:19:34 +03:00
Dmitry Stogov e04fbdab2f Keep EX(opline) in consistency when call engine and helper functions 2019-04-18 22:19:57 +03:00
Dmitry Stogov 28828ffccb Fixed JIT for recursive functions with type-hints 2019-04-18 12:32:31 +03:00
Dmitry Stogov 35ee6dc69f Don't initialize return value before calling user functions 2019-04-18 03:00:20 +03:00
Dmitry Stogov f603f5c63c Improved support for "context threading" (not enabled).
This technique uses CPU Register Address Stack for return branch predicion and give 25% improvement on some call intensive micro-becnhmarks. Unfotrunately, it also slow downs other recursive benchmarks (probably because of RAS size). The techniquea is not compatible with VM without register variables.
2019-04-16 13:33:01 +03:00
Nikita Popov 49b97af431 Suppress some maybe uninit warnings in jit 2019-04-15 11:47:10 +02:00
Dmitry Stogov 39505764ad Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace "ZEND_CALL_CTOR" hack by additional live-range
2019-04-12 01:01:47 +03:00
Anatol Belski 853f881bd1 Avoid code duplication 2019-04-11 15:05:16 +02:00
Dmitry Stogov 6d232eec03 Improved code generated for RETURN in methpods and closures 2019-04-11 15:13:14 +03:00
Nikita Popov 9825d68c08 Use zend_quiet_write instead of ZEND_IGNORE_VALUE
Forgot this exists when I changed this earlier...
2019-04-11 12:24:10 +02:00
Nikita Popov d31104facc Mark zend_jit_print_regset as unused
This is a debugging function, so it's usually not going to be used
and we don't want to see a warning about that.
2019-04-11 11:05:42 +02:00
Nikita Popov 0351552e1e Suppress write() warnings in jit_perf_dump.c 2019-04-11 11:00:38 +02:00
Dmitry Stogov cc900edd77 Simplify call frame initialization 2019-04-11 02:08:32 +03:00
Dmitry Stogov d374920e5e Eliminated unreachable jumps 2019-04-10 11:18:59 +03:00
Dmitry Stogov 20548ab506 Removed too strict register allocation constraint. 2019-04-10 02:06:51 +03:00
Dmitry Stogov 2980de29f0 Don't split basic block after RECV, if function checks type hints 2019-04-09 21:59:47 +03:00