Fix clobber list for inline add/sub/mul instructions
authorSimon Hausmann <simon.hausmann@digia.com>
Sun, 2 Dec 2012 19:10:09 +0000 (20:10 +0100)
committerLars Knoll <lars.knoll@digia.com>
Sun, 2 Dec 2012 19:23:22 +0000 (20:23 +0100)
These inline asm blocks do also change flags, therefore we need to add the
condition code register to the list of clobbered pseudo registers.

Change-Id: Iea7b2557813bbb2fa86d7506e6416092fdc14702
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qmljs_math.h

index 1fb9261..b9dbff8 100644 (file)
@@ -60,7 +60,7 @@ static inline Value add_int32(int a, int b)
          "seto %0"
     : "=q" (overflow), "=r" (aa)
          : "r" (b), "1" (aa)
-         :
+         : "cc"
     );
     if (!overflow)
         return Value::fromInt32(aa);
@@ -76,7 +76,7 @@ static inline Value sub_int32(int a, int b)
          "seto %0"
     : "=q" (overflow), "=r" (aa)
          : "r" (b), "1" (aa)
-         :
+         : "cc"
     );
     if (!overflow)
         return Value::fromInt32(aa);
@@ -92,7 +92,7 @@ static inline Value mul_int32(int a, int b)
          "setc %0"
          : "=q" (overflow), "=a" (aa)
          : "r" (b), "1" (aa)
-         : "edx"
+         : "edx", "cc"
     );
     if (!overflow)
         return Value::fromInt32(aa);