Specify that the input to a gnu asm statemnt is also an output so gcc knows the value in the register gets clobbered (bug 749486, r=jbramley)
authorMarty Rosenberg <mrosenberg@mozilla.com>
Fri, 27 Apr 2012 14:58:03 -0700
changeset 92650 04e00b912240f574bf09c20a4c91b50216c7e23e
parent 92649 cf9be410ceaf030ebab656340c7385f903f96dd2
child 92651 1ed9525b2a9f96c755791cccf50ea7e3884c0867
push id22549
push userryanvm@gmail.com
push dateSun, 29 Apr 2012 20:42:32 +0000
treeherdermozilla-central@32a0e99932b2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjbramley
bugs749486
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Specify that the input to a gnu asm statemnt is also an output so gcc knows the value in the register gets clobbered (bug 749486, r=jbramley)
js/src/vm/NumericConversions.h
--- a/js/src/vm/NumericConversions.h
+++ b/js/src/vm/NumericConversions.h
@@ -221,18 +221,18 @@ ToInt32(double d)
 "   eor     %Q4, %Q4, %R4, ASR #31\n"
 "   add     %0, %Q4, %R4, LSR #31\n"
 "   b       9f\n"
 "8:\n"
     // +/-INFINITY, +/-0, subnormals, NaNs, and anything else out-of-range that
     // will result in a conversion of '0'.
 "   mov     %0, #0\n"
 "9:\n"
-    : "=r" (i), "=&r" (tmp0), "=&r" (tmp1), "=&r" (tmp2)
-    : "r" (d)
+    : "=r" (i), "=&r" (tmp0), "=&r" (tmp1), "=&r" (tmp2), "=&r" (d)
+    : "4" (d)
     : "cc"
         );
     return i;
 #else
     int32_t i;
     double two32, two31;
 
     if (!MOZ_DOUBLE_IS_FINITE(d))