[php-src] PR #20561: VM: Reuse result variable in ICALL_0 implementation

From: Date: Sat, 22 Nov 2025 13:54:36 +0000
Subject: [php-src] PR #20561: VM: Reuse result variable in ICALL_0 implementation
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-34130@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/20561 Author: ndossche 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 ```

« previous php.git-pulls (#34130) next »