File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ PHP NEWS
12
12
. Fixed bug GH-8805 (finfo returns wrong mime type for woff/woff2 files).
13
13
(Anatol)
14
14
15
+ - Opcache:
16
+ . Added indirect call reduction for jit on x86 architectures. (wxue1)
17
+
15
18
- Sockets:
16
19
. Fixed socket constants regression as of PHP 8.2.0beta3. (Bruce Dou)
17
20
Original file line number Diff line number Diff line change @@ -152,6 +152,11 @@ static size_t tsrm_tls_offset;
152
152
153
153
#define IS_SIGNED_32BIT(val) ((((intptr_t)(val)) <= 0x7fffffff) && (((intptr_t)(val)) >= (-2147483647 - 1)))
154
154
155
+ /* Call range is before or after 2GB */
156
+ #define MAY_USE_32BIT_ADDR(addr) \
157
+ (IS_SIGNED_32BIT((char*)(addr) - (char*)dasm_buf) && \
158
+ IS_SIGNED_32BIT((char*)(addr) - (char*)dasm_end))
159
+
155
160
#define CAN_USE_AVX() (JIT_G(opt_flags) & allowed_opt_flags & ZEND_JIT_CPU_AVX)
156
161
157
162
/* Not Implemented Yet */
@@ -353,7 +358,7 @@ static size_t tsrm_tls_offset;
353
358
354
359
|.macro EXT_CALL, func, tmp_reg
355
360
| .if X64
356
- || if (IS_32BIT(dasm_end) && IS_32BIT (func)) {
361
+ || if (MAY_USE_32BIT_ADDR (func)) {
357
362
| call qword &func
358
363
|| } else {
359
364
| LOAD_ADDR tmp_reg, func
@@ -366,7 +371,7 @@ static size_t tsrm_tls_offset;
366
371
367
372
|.macro EXT_JMP, func, tmp_reg
368
373
| .if X64
369
- || if (IS_32BIT(dasm_end) && IS_32BIT (func)) {
374
+ || if (MAY_USE_32BIT_ADDR (func)) {
370
375
| jmp qword &func
371
376
|| } else {
372
377
| LOAD_ADDR tmp_reg, func
You can’t perform that action at this time.
0 commit comments