[php-src] jit-arm64: Support for ECHO with non-constant operand
| From: | Dmitry Stogov | Date: | Thu, 22 Apr 2021 10:33:44 +0000 |
| Subject: | [php-src] jit-arm64: Support for ECHO with non-constant operand | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-115754@lists.php.net to get a copy of this message | ||
Author: Dmitry Stogov (dstogov)
Date: 2021-04-22T13:33:22+03:00
Commit: https://github.com/php/php-src/commit/fd8b7490774bbf361bec13441273d4433f97c6e2
Raw diff: https://github.com/php/php-src/commit/fd8b7490774bbf361bec13441273d4433f97c6e2.diff
Support for ECHO with non-constant operand
Changed paths:
M ext/opcache/jit/zend_jit_arm64.dasc
Diff:
diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc
index 2f3db1fe1384..8219dc19650f 100644
--- a/ext/opcache/jit/zend_jit_arm64.dasc
+++ b/ext/opcache/jit/zend_jit_arm64.dasc
@@ -11505,7 +11505,17 @@ static int zend_jit_echo(dasm_State **Dst, const zend_op *opline, uint32_t
op1_i
ZEND_ASSERT((op1_info & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_STRING);
- | NIY // TODO: test
+ | SET_EX_OPLINE opline, REG0
+ | GET_ZVAL_PTR REG0, op1_addr, TMP1
+ | add CARG1, REG0, #offsetof(zend_string, val)
+ | ldr CARG2, [REG0, #offsetof(zend_string, len)]
+ | EXT_CALL zend_write, REG0
+ if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) {
+ | ZVAL_PTR_DTOR op1_addr, op1_info, 0, 0, opline, ZREG_TMP1, ZREG_TMP2
+ }
+ if (!zend_jit_check_exception(Dst)) {
+ return 0;
+ }
}
return 1;
}