87
87
|.define T3, [r4+0x18] // Used to store old value of IP (CALL VM only)
88
88
|.define T2, [r4+0x14] // Used to store old value of FP (CALL VM only)
89
89
|.define T1, [r4]
90
+ |.define A4, [r4+0xC] // preallocated slots for arguments of "cdecl" functions (intersect with T1)
91
+ |.define A3, [r4+0x8]
92
+ |.define A2, [r4+0x4]
93
+ |.define A1, [r4]
90
94
|.endif
91
95
92
96
|.define HYBRID_SPAD, 16 // padding for stack alignment
@@ -1734,10 +1738,8 @@ static int zend_jit_interrupt_handler_stub(dasm_State **Dst)
1734
1738
| mov CARG1, FP
1735
1739
| EXT_CALL zend_interrupt_function, r0
1736
1740
|.else
1737
- | sub r4, 12
1738
- | push FP
1741
+ | mov aword A1, FP
1739
1742
| EXT_CALL zend_interrupt_function, r0
1740
- | add r4, 16
1741
1743
|.endif
1742
1744
| //ZEND_VM_ENTER();
1743
1745
| //execute_data = EG(current_execute_data);
@@ -2143,15 +2145,13 @@ static int zend_jit_undefined_function_stub(dasm_State **Dst)
2143
2145
| add CARG3, offsetof(zend_string, val)
2144
2146
| EXT_CALL zend_throw_error, r0
2145
2147
|.else
2146
- | sub r4, 4
2147
2148
| mov r0, aword [r0 + offsetof(zend_op, op2.zv)]
2148
2149
| mov r0, aword [r0]
2149
2150
| add r0, offsetof(zend_string, val)
2150
- | push r0
2151
- | push "Call to undefined function %s()"
2152
- | push 0
2151
+ | mov aword A3, r0
2152
+ | mov aword A2, "Call to undefined function %s()"
2153
+ | mov aword A1, 0
2153
2154
| EXT_CALL zend_throw_error, r0
2154
- | add r4, 16
2155
2155
|.endif
2156
2156
| jmp ->exception_handler
2157
2157
return 1;
@@ -12417,8 +12417,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zen
12417
12417
| sub r4, 8
12418
12418
| mov r0, EX->func
12419
12419
| push dword [r0 + offsetof(zend_op_array, scope)]
12420
- | LOAD_ZVAL_ADDR r0, res_addr
12421
- | push r0
12420
+ | PUSH_ZVAL_ADDR res_addr, r0
12422
12421
| EXT_CALL zval_update_constant_ex, r0
12423
12422
| add r4, 16
12424
12423
|.endif
@@ -13989,11 +13988,9 @@ static int zend_jit_echo(dasm_State **Dst, const zend_op *opline, uint32_t op1_i
13989
13988
| LOAD_ADDR CARG2, len
13990
13989
| EXT_CALL zend_write, r0
13991
13990
|.else
13992
- | sub r4, 8
13993
- | push len
13994
- | push str
13991
+ | mov aword A2, len
13992
+ | mov aword A1, str
13995
13993
| EXT_CALL zend_write, r0
13996
- | add r4, 16
13997
13994
|.endif
13998
13995
if (!zend_jit_check_exception(Dst)) {
13999
13996
return 0;
@@ -14011,12 +14008,11 @@ static int zend_jit_echo(dasm_State **Dst, const zend_op *opline, uint32_t op1_i
14011
14008
| mov CARG2, aword [r0 + offsetof(zend_string, len)]
14012
14009
| EXT_CALL zend_write, r0
14013
14010
|.else
14014
- | sub r4, 8
14015
- | push aword [r0 + offsetof(zend_string, len)]
14016
14011
| add r0, offsetof(zend_string, val)
14017
- | push r0
14012
+ | mov aword A1, r0
14013
+ | mov r0, aword [r0 + (offsetof(zend_string, len)-offsetof(zend_string, val))]
14014
+ | mov aword A2, r0
14018
14015
| EXT_CALL zend_write, r0
14019
- | add r4, 16
14020
14016
|.endif
14021
14017
if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) {
14022
14018
| ZVAL_PTR_DTOR op1_addr, op1_info, 0, 0, opline
0 commit comments