From 63f5e11d9bf361d86dd47994d85951bd4a5b6d4a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 8 May 2018 00:00:59 +0300 Subject: [PATCH] Use add/sub instead of inc/dec --- Zend/zend_operators.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index e7e7c59452..17c24ab306 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -469,7 +469,7 @@ static zend_always_inline void fast_long_increment_function(zval *op1) { #if defined(HAVE_ASM_GOTO) && defined(__i386__) __asm__ goto( - "incl (%0)\n\t" + "addl $1,(%0)\n\t" "jo %l1\n" : : "r"(&op1->value) @@ -480,7 +480,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(op1, (double)ZEND_LONG_MAX + 1.0); #elif defined(HAVE_ASM_GOTO) && defined(__x86_64__) __asm__ goto( - "incq (%0)\n\t" + "addq $1,(%0)\n\t" "jo %l1\n" : : "r"(&op1->value) @@ -519,7 +519,7 @@ static zend_always_inline void fast_long_decrement_function(zval *op1) { #if defined(HAVE_ASM_GOTO) && defined(__i386__) __asm__ goto( - "decl (%0)\n\t" + "subl $1,(%0)\n\t" "jo %l1\n" : : "r"(&op1->value) @@ -530,7 +530,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL ZVAL_DOUBLE(op1, (double)ZEND_LONG_MIN - 1.0); #elif defined(HAVE_ASM_GOTO) && defined(__x86_64__) __asm__ goto( - "decq (%0)\n\t" + "subq $1,(%0)\n\t" "jo %l1\n" : : "r"(&op1->value) -- 2.40.0