mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02: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
4 changed files with 14 additions and 0 deletions
|
@ -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++) {
|
for (i = 0; i < sizeof(zend_jit_stubs)/sizeof(zend_jit_stubs[0]); i++) {
|
||||||
dasm_setup(&dasm_state, dasm_actions);
|
dasm_setup(&dasm_state, dasm_actions);
|
||||||
|
zend_jit_align_stub(&dasm_state);
|
||||||
if (!zend_jit_stubs[i].stub(&dasm_state)) {
|
if (!zend_jit_stubs[i].stub(&dasm_state)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2854,6 +2854,12 @@ static int zend_jit_align_func(dasm_State **Dst)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int zend_jit_align_stub(dasm_State **Dst)
|
||||||
|
{
|
||||||
|
|.align 16
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int zend_jit_prologue(dasm_State **Dst)
|
static int zend_jit_prologue(dasm_State **Dst)
|
||||||
{
|
{
|
||||||
if (zend_jit_vm_kind == ZEND_VM_KIND_HYBRID) {
|
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_init(&dasm_state, DASM_MAXSECTION);
|
||||||
dasm_setupglobal(&dasm_state, dasm_labels, zend_lb_MAX);
|
dasm_setupglobal(&dasm_state, dasm_labels, zend_lb_MAX);
|
||||||
dasm_setup(&dasm_state, dasm_actions);
|
dasm_setup(&dasm_state, dasm_actions);
|
||||||
|
zend_jit_align_stub(&dasm_state);
|
||||||
zend_jit_trace_exit_group_stub(&dasm_state, n);
|
zend_jit_trace_exit_group_stub(&dasm_state, n);
|
||||||
|
|
||||||
sprintf(name, "jit$$trace_exit_%d", n);
|
sprintf(name, "jit$$trace_exit_%d", n);
|
||||||
|
|
|
@ -3070,6 +3070,12 @@ static int zend_jit_align_func(dasm_State **Dst)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int zend_jit_align_stub(dasm_State **Dst)
|
||||||
|
{
|
||||||
|
|.align 16
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int zend_jit_prologue(dasm_State **Dst)
|
static int zend_jit_prologue(dasm_State **Dst)
|
||||||
{
|
{
|
||||||
| ENDBR
|
| ENDBR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue