mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
JIT: Align JIT stubs (#11149)
Fixed phpGH-11120 Signed-off-by: PeterYang12 <yuhan.yang@intel.com>
This commit is contained in:
parent
f0122664fe
commit
f127e6581a
@ -4696,6 +4696,7 @@ static int zend_jit_make_stubs(void)
|
||||
|
||||
for (i = 0; i < sizeof(zend_jit_stubs)/sizeof(zend_jit_stubs[0]); i++) {
|
||||
dasm_setup(&dasm_state, dasm_actions);
|
||||
zend_jit_align_stub(&dasm_state);
|
||||
if (!zend_jit_stubs[i].stub(&dasm_state)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -2854,6 +2854,12 @@ static int zend_jit_align_func(dasm_State **Dst)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int zend_jit_align_stub(dasm_State **Dst)
|
||||
{
|
||||
|.align 16
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int zend_jit_prologue(dasm_State **Dst)
|
||||
{
|
||||
if (zend_jit_vm_kind == ZEND_VM_KIND_HYBRID) {
|
||||
|
@ -94,6 +94,7 @@ static const void *zend_jit_trace_allocate_exit_group(uint32_t n)
|
||||
dasm_init(&dasm_state, DASM_MAXSECTION);
|
||||
dasm_setupglobal(&dasm_state, dasm_labels, zend_lb_MAX);
|
||||
dasm_setup(&dasm_state, dasm_actions);
|
||||
zend_jit_align_stub(&dasm_state);
|
||||
zend_jit_trace_exit_group_stub(&dasm_state, n);
|
||||
|
||||
sprintf(name, "jit$$trace_exit_%d", n);
|
||||
|
@ -3070,6 +3070,12 @@ static int zend_jit_align_func(dasm_State **Dst)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int zend_jit_align_stub(dasm_State **Dst)
|
||||
{
|
||||
|.align 16
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int zend_jit_prologue(dasm_State **Dst)
|
||||
{
|
||||
| ENDBR
|
||||
|
Loading…
Reference in New Issue
Block a user