Switch to HYBRID VM

This commit is contained in:
Dmitry Stogov 2017-05-17 15:07:33 +03:00
parent 4bdd63595b
commit fc927dc263
3 changed files with 8925 additions and 238 deletions

File diff suppressed because it is too large Load diff

View file

@ -2723,7 +2723,7 @@ function gen_vm($def, $skel) {
function usage() { function usage() {
echo("\nUsage: php zend_vm_gen.php [options]\n". echo("\nUsage: php zend_vm_gen.php [options]\n".
"\nOptions:". "\nOptions:".
"\n --with-vm-kind=CALL|SWITCH|GOTO|HYBRID - select threading model (default is CALL)". "\n --with-vm-kind=CALL|SWITCH|GOTO|HYBRID - select threading model (default is HYBRID)".
"\n --without-specializer - disable executor specialization". "\n --without-specializer - disable executor specialization".
"\n --with-lines - enable #line directives". "\n --with-lines - enable #line directives".
"\n\n"); "\n\n");
@ -2770,7 +2770,7 @@ for ($i = 1; $i < $argc; $i++) {
// Using defaults // Using defaults
if (!defined("ZEND_VM_KIND")) { if (!defined("ZEND_VM_KIND")) {
// Using CALL threading by default // Using CALL threading by default
define("ZEND_VM_KIND", ZEND_VM_KIND_CALL); define("ZEND_VM_KIND", ZEND_VM_KIND_HYBRID);
} }
if (!defined("ZEND_VM_SPEC")) { if (!defined("ZEND_VM_SPEC")) {
// Using specialized executor by default // Using specialized executor by default

View file

@ -27,7 +27,12 @@
#define ZEND_VM_KIND_SWITCH 2 #define ZEND_VM_KIND_SWITCH 2
#define ZEND_VM_KIND_GOTO 3 #define ZEND_VM_KIND_GOTO 3
#define ZEND_VM_KIND_HYBRID 4 #define ZEND_VM_KIND_HYBRID 4
#define ZEND_VM_KIND ZEND_VM_KIND_CALL /* HYBRID requires support for computed GOTO and global register variables*/
#if (defined(__GNUC__) && defined(HAVE_GCC_GLOBAL_REGS))
# define ZEND_VM_KIND ZEND_VM_KIND_HYBRID
#else
# define ZEND_VM_KIND ZEND_VM_KIND_CALL
#endif
#define ZEND_VM_OP_SPEC 0x00000001 #define ZEND_VM_OP_SPEC 0x00000001
#define ZEND_VM_OP_CONST 0x00000002 #define ZEND_VM_OP_CONST 0x00000002