projects
/
platform
/
upstream
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f75c05b
)
Use two operand version of imul
author
Simon Hausmann
<simon.hausmann@digia.com>
Tue, 4 Dec 2012 19:00:25 +0000
(20:00 +0100)
committer
Lars Knoll
<lars.knoll@digia.com>
Tue, 4 Dec 2012 22:02:48 +0000
(23:02 +0100)
This is a slightly nicer variant to use and is easier on the register
usage
Change-Id: I6c9299f99251594b5a1adaed1e7dae9a5419c370
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qmljs_math.h
patch
|
blob
|
history
diff --git
a/qmljs_math.h
b/qmljs_math.h
index
b9dbff8
..
4645c5a
100644
(file)
--- 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);