Commit 85aad64
committed
VM: Reuse result variable in ICALL_0 implementation
This reduces the assembly size from 52 to 46 bytes on x86-64 with GCC
15.2.1, strangely.
Before:
```
<+0>: sub $0x8,%rsp
<+4>: movslq 0x10(%r15),%rax
<+8>: movslq 0x10(%r15),%rdi
<+12>: mov %r15,(%r14)
<+15>: mov 0x14(%r15),%edx
<+19>: movl $0x1,0x8(%r14,%rax,1)
<+28>: mov 0x140695d(%rip),%rax # 0x1addfe0 <zend_flf_handlers>
<+35>: add %r14,%rdi
<+38>: call *(%rax,%rdx,8)
<+41>: mov (%r14),%r15
<+44>: add $0x8,%rsp
<+48>: add $0x20,%r15
<+52>: ret
```
After:
```
<+0>: sub $0x8,%rsp
<+4>: movslq 0x10(%r15),%rdi
<+8>: mov 0x14(%r15),%edx
<+12>: mov %r15,(%r14)
<+15>: mov 0xace58a(%rip),%rax # 0x10d9840 <zend_flf_handlers>
<+22>: add %r14,%rdi
<+25>: movl $0x1,0x8(%rdi)
<+32>: call *(%rax,%rdx,8)
<+35>: mov (%r14),%r15
<+38>: add $0x8,%rsp
<+42>: add $0x20,%r15
<+46>: ret
```1 parent 8398038 commit 85aad64
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9800 | 9800 | | |
9801 | 9801 | | |
9802 | 9802 | | |
9803 | | - | |
| 9803 | + | |
9804 | 9804 | | |
9805 | 9805 | | |
9806 | 9806 | | |
| |||
0 commit comments