Skip to content

Commit fd6c0f7

Browse files
committed
Merge branch 'master' into jit
2 parents 5234b06 + f6f1d38 commit fd6c0f7

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/push.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ jobs:
5454
uses: ./.github/actions/install-linux
5555
- name: Setup
5656
uses: ./.github/actions/setup-x64
57-
- name: Test
58-
uses: ./.github/actions/test-linux
59-
with:
60-
runTestsParameters: >-
61-
${{ matrix.run_tests_parameters }}
6257
- name: Test Tracing JIT
6358
uses: ./.github/actions/test-linux
6459
with:

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1633,6 +1633,12 @@ static size_t tsrm_tls_offset;
16331633
||#endif
16341634
|.endmacro
16351635

1636+
#if defined (__CET__) && (__CET__ & 1) != 0
1637+
# define ENDBR_PADDING 4
1638+
#else
1639+
# define ENDBR_PADDING 0
1640+
#endif
1641+
16361642
static bool reuse_ip = 0;
16371643
static bool delayed_call_chain = 0;
16381644
static uint32_t delayed_call_level = 0;
@@ -2302,6 +2308,7 @@ static int zend_jit_hybrid_hot_code_stub(dasm_State **Dst)
23022308
*/
23032309
static int zend_jit_hybrid_hot_counter_stub(dasm_State **Dst, uint32_t cost)
23042310
{
2311+
| ENDBR
23052312
| mov r0, EX->func
23062313
| mov r1, aword [r0 + offsetof(zend_op_array, reserved[zend_func_info_rid])]
23072314
| mov r2, aword [r1 + offsetof(zend_jit_op_array_hot_extension, counter)]
@@ -2372,6 +2379,7 @@ static int zend_jit_hybrid_hot_trace_stub(dasm_State **Dst)
23722379

23732380
static int zend_jit_hybrid_trace_counter_stub(dasm_State **Dst, uint32_t cost)
23742381
{
2382+
| ENDBR
23752383
| mov r0, EX->func
23762384
| mov r1, aword [r0 + offsetof(zend_op_array, reserved[zend_func_info_rid])]
23772385
| mov r1, aword [r1 + offsetof(zend_jit_op_array_trace_extension, offset)]
@@ -3059,6 +3067,7 @@ static int zend_jit_align_func(dasm_State **Dst)
30593067

30603068
static int zend_jit_prologue(dasm_State **Dst)
30613069
{
3070+
| ENDBR
30623071
if (zend_jit_vm_kind == ZEND_VM_KIND_HYBRID) {
30633072
| SUB_HYBRID_SPAD
30643073
} else if (GCC_GLOBAL_REGS) {
@@ -3466,7 +3475,7 @@ static int zend_jit_trace_link_to_root(dasm_State **Dst, zend_jit_trace_info *t,
34663475
prologue_size = 13;
34673476
#endif
34683477
}
3469-
link_addr = (const void*)((const char*)t->code_start + prologue_size);
3478+
link_addr = (const void*)((const char*)t->code_start + prologue_size + ENDBR_PADDING);
34703479

34713480
if (timeout_exit_addr) {
34723481
/* Check timeout for links to LOOP */

0 commit comments

Comments
 (0)