bug 1172657 - ToInt32's arm asm crashes Apple clang, so #ifdef around the assembly for now. r=waldo
authorTed Mielczarek <ted@mielczarek.org>
Sun, 22 Mar 2015 14:33:24 -0400
changeset 250951 1affb4e7d334c5411a6127aec0fada847b138bac
parent 250950 273feb3f49edcab6a4544229d47140993984691f
child 250952 7326cf7d17d84ebf62d2a502fecabda1afc8b681
push id61719
push usertmielczarek@mozilla.com
push dateWed, 01 Jul 2015 19:40:52 +0000
treeherdermozilla-inbound@7a8b58bce368 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs1172657
milestone42.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
bug 1172657 - ToInt32's arm asm crashes Apple clang, so #ifdef around the assembly for now. r=waldo
js/public/Conversions.h
--- a/js/public/Conversions.h
+++ b/js/public/Conversions.h
@@ -344,17 +344,19 @@ ToIntWidth(double d)
 }
 
 } // namespace detail
 
 /* ES5 9.5 ToInt32 (specialized for doubles). */
 inline int32_t
 ToInt32(double d)
 {
-#if defined (__arm__) && defined (__GNUC__)
+    // clang crashes compiling this when targeting arm-darwin:
+    // https://llvm.org/bugs/show_bug.cgi?id=22974
+#if defined (__arm__) && defined (__GNUC__) && !defined(__APPLE__)
     int32_t i;
     uint32_t    tmp0;
     uint32_t    tmp1;
     uint32_t    tmp2;
     asm (
     // We use a pure integer solution here. In the 'softfp' ABI, the argument
     // will start in r0 and r1, and VFP can't do all of the necessary ECMA
     // conversions by itself so some integer code will be required anyway. A