[ios] Add missing clobber for 'd1' register in ARM round_int assembly. Make rnd_val...
authorChris Lance <chris_lance@sbcglobal.net>
Sun, 3 Jul 2011 01:46:20 +0000 (21:46 -0400)
committerChris Lance <chris_lance@sbcglobal.net>
Sun, 3 Jul 2011 01:46:20 +0000 (21:46 -0400)
xbmc/utils/MathUtils.h

index 649b352..4d6faec 100644 (file)
@@ -50,12 +50,12 @@ namespace MathUtils
     i = floor(x + round_to_nearest);
 #elif defined(__arm__)
     __asm__ __volatile__ (
-                          "vmov.F64 d1,%[rnd_val]             \n\t" // Copy 0.5 into a working register 
-                          "vadd.F64 %P[value],%P[value],d1    \n\t" // Add round_to_nearest to the working register
+                          "vmov.F64 d1,%[rnd_val]             \n\t" // Copy round_to_nearest into a working register 
+                          "vadd.F64 %P[value],%P[value],d1    \n\t" // Add round_to_nearest to value
                           "vcvt.S32.F64 %[result],%P[value]   \n\t" // Truncate(round towards zero) and store the result
-                          : [result] "=w"(i), [value] "+w"(x)  /* Outputs  */
-                          : [rnd_val] "Da" (round_to_nearest)
-                          );
+                          : [result] "=w"(i), [value] "+w"(x)  // Outputs
+                          : [rnd_val] "Dv" (round_to_nearest)  // Inputs
+                          : "d1");                             // Clobbers
 #else
     __asm__ __volatile__ (
                           "fadd %%st\n\t"