Bug 750620 - Declare double conversion correctness for more architectures. r=nfroyd
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 22 May 2012 08:38:44 +0200
changeset 94577 72e4dea9d2b26ef144b506db7c3a7e6528f7ed69
parent 94576 30e6a12b319a011417e79368adbc4379da7d0808
child 94578 d2635f3f4770afbe788cc38bd0f318c019b59bec
push id782
push usertim.taubert@gmx.de
push dateThu, 24 May 2012 09:48:22 +0000
treeherderfx-team@fa7a21561d68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfroyd
bugs750620
milestone15.0a1
Bug 750620 - Declare double conversion correctness for more architectures. r=nfroyd
mfbt/double-conversion/more-architectures.patch
mfbt/double-conversion/update.sh
mfbt/double-conversion/utils.h
new file mode 100644
--- /dev/null
+++ b/mfbt/double-conversion/more-architectures.patch
@@ -0,0 +1,26 @@
+diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
+--- a/mfbt/double-conversion/utils.h
++++ b/mfbt/double-conversion/utils.h
+@@ -48,17 +48,21 @@
+ // An easy way to test if the floating-point operations are correct is to
+ // evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then
+ // the result is equal to 89255e-22.
+ // The best way to test this, is to create a division-function and to compare
+ // the output of the division with the expected result. (Inlining must be
+ // disabled.)
+ // On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
+ #if defined(_M_X64) || defined(__x86_64__) || \
+-    defined(__ARMEL__) || \
++    defined(__ARMEL__) || defined(__avr32__) || \
++    defined(__hppa__) || defined(__ia64__) || \
++    defined(__mips__) || defined(__powerpc__) || \
++    defined(__sparc__) || defined(__s390__) || \
++    defined(__SH4__) || defined(__alpha__) || \
+     defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__)
+ #if defined(_WIN32)
+ // Windows uses a 64bit wide floating point stack.
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #else
+ #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
--- a/mfbt/double-conversion/update.sh
+++ b/mfbt/double-conversion/update.sh
@@ -9,8 +9,9 @@ cp $1/README ./
 # Includes
 cp $1/src/*.h ./
 
 # Source
 cp $1/src/*.cc ./
 
 patch -p3 < add-mfbt-api-markers.patch
 patch -p3 < use-StandardInteger.patch
+patch -p3 < more-architectures.patch
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
@@ -48,17 +48,21 @@
 // An easy way to test if the floating-point operations are correct is to
 // evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then
 // the result is equal to 89255e-22.
 // The best way to test this, is to create a division-function and to compare
 // the output of the division with the expected result. (Inlining must be
 // disabled.)
 // On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
 #if defined(_M_X64) || defined(__x86_64__) || \
-    defined(__ARMEL__) || \
+    defined(__ARMEL__) || defined(__avr32__) || \
+    defined(__hppa__) || defined(__ia64__) || \
+    defined(__mips__) || defined(__powerpc__) || \
+    defined(__sparc__) || defined(__s390__) || \
+    defined(__SH4__) || defined(__alpha__) || \
     defined(_MIPS_ARCH_MIPS32R2)
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
 #elif defined(_M_IX86) || defined(__i386__)
 #if defined(_WIN32)
 // Windows uses a 64bit wide floating point stack.
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
 #else
 #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS