com php-src: Assign CPU registers for GOTO and SWITCH executor as well: Zend/zend_vm_gen.php
| From: | Dmitry Stogov | Date: | Mon, 24 Aug 2015 23:38:06 +0000 |
| Subject: | com php-src: Assign CPU registers for GOTO and SWITCH executor as well: Zend/zend_vm_gen.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88748@lists.php.net to get a copy of this message | ||
Commit: 2482325b3d9c45603d4fc5f7c6f7baef0e958a58
Author: Dmitry Stogov <dmitry@zend.com> Tue, 25 Aug 2015 02:38:06 +0300
Parents: a8d38674b1d75de54bb1d3d1436da759ef8e64d7
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2482325b3d9c45603d4fc5f7c6f7baef0e958a58
Log:
Assign CPU registers for GOTO and SWITCH executor as well
Changed paths:
M Zend/zend_vm_gen.php
Diff:
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index b163739..3a80705 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen..php
@@ -1111,7 +1111,11 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name,
$initializer_name)
out($f,"#undef LOAD_NEXT_OPLINE\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#define OPLINE opline\n");
- out($f,"#define DCL_OPLINE const zend_op *opline;\n");
+ out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
+ out($f,"# define DCL_OPLINE register const zend_op *opline
__asm__(ZEND_VM_IP_GLOBAL_REG);\n");
+ out($f,"#else\n");
+ out($f,"# define DCL_OPLINE const zend_op *opline;\n");
+ out($f,"#endif\n");
out($f,"#define USE_OPLINE\n");
out($f,"#define LOAD_OPLINE() opline = EX(opline)\n");
out($f,"#define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
@@ -1136,7 +1140,11 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name,
$initializer_name)
out($f,"#undef LOAD_NEXT_OPLINE\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#define OPLINE opline\n");
- out($f,"#define DCL_OPLINE const zend_op *opline;\n");
+ out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
+ out($f,"# define DCL_OPLINE register const zend_op *opline
__asm__(ZEND_VM_IP_GLOBAL_REG);\n");
+ out($f,"#else\n");
+ out($f,"# define DCL_OPLINE const zend_op *opline;\n");
+ out($f,"#endif\n");
out($f,"#define USE_OPLINE\n");
out($f,"#define LOAD_OPLINE() opline = EX(opline)\n");
out($f,"#define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
@@ -1171,7 +1179,11 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name,
$initializer_name)
foreach ($params as $param => $x) {
out($f,$m[1].$param.";\n");
}
+ out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
+ out($f,$m[1]."register zend_execute_data *execute_data __asm__(ZEND_VM_FP_GLOBAL_REG) =
ex;\n");
+ out($f,"#else\n");
out($f,$m[1]."zend_execute_data *execute_data = ex;\n");
+ out($f,"#endif\n");
} else {
out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
out($f,$m[1]."const zend_op *orig_opline = opline;\n");