From cde1dd670a49bc37809e8100bef1b7c711779a31 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 4 Dec 2012 20:00:25 +0100 Subject: [PATCH] Use two operand version of imul This is a slightly nicer variant to use and is easier on the register usage Change-Id: I6c9299f99251594b5a1adaed1e7dae9a5419c370 Reviewed-by: Lars Knoll --- qmljs_math.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qmljs_math.h b/qmljs_math.h index b9dbff8..4645c5a 100644 --- a/qmljs_math.h +++ b/qmljs_math.h @@ -88,11 +88,11 @@ static inline Value mul_int32(int a, int b) quint8 overflow = 0; int aa = a; - asm ("imul %2\n" + asm ("imul %2, %1\n" "setc %0" - : "=q" (overflow), "=a" (aa) + : "=q" (overflow), "=r" (aa) : "r" (b), "1" (aa) - : "edx", "cc" + : "cc" ); if (!overflow) return Value::fromInt32(aa); -- 2.7.4