Re: com php-src: Make CALL VM with FP and IP in global registers not to return anything from opcode handlers. Set OPLINE to NULL to terminate VM loop
instead. This saves 1 CPU instruction for each opcode handler.: Zend/zend_vm_execute.h Zend/zend

From: Date: Tue, 16 Jun 2015 12:20:40 +0000
Subject: Re: com php-src: Make CALL VM with FP and IP in global registers not to return anything from opcode handlers. Set OPLINE to NULL to terminate VM loop
instead. This saves 1 CPU instruction for each opcode handler.: Zend/zend_vm_execute.h Zend/zend
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-86711@lists.php.net to get a copy of this message
Hi Dmitry, ----- Original Message ----- From: "Dmitry Stogov" Sent: Tuesday, June 16, 2015
Commit:    48ed660cdf6fe94ac2cd8eac217ea97340766e75
Author:    Dmitry Stogov <dmitry@zend.com>         Tue, 16 Jun 2015 14:11:16 +0300
Parents: 3180b8e100285e5bd9088e9981608dfd14f6ff27 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=48ed660cdf6fe94ac2cd8eac217ea97340766e75 Log: Make CALL VM with FP and IP in global registers not to return anything from opcode handlers. Set OPLINE to NULL to terminate VM loop instead. This saves 1 CPU instruction for each opcode handler. Changed paths: M Zend/zend_vm_execute.h M Zend/zend_vm_gen.php In zend_vm_gen.php, it seems lines 1073-1075 can be removed, since they have identical #define's. So, pseudo-diff: -out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
-out($f,"# define ZEND_VM_ENTER()           ...");
-out($f,"# define ZEND_VM_LEAVE()           ZEND_VM_CONTINUE()\n");
-out($f,"#elif defined(ZEND_VM_FP_GLOBAL_REG)\n"); +out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG)\n"); Just FYI. Unless you purposely kept it like that for semantics or will be adding something else distinct soon/later. :-) But always neat to see extra optimization tricks (thanks!), even when they don't apply for Windows builds. :-( - Matt

« previous php.internals (#86711) next »