By defalut IEEE754 denormal support is disabled on iOS;
turn it on.
Reviewed by Filip Pizlo.
* jsc.cpp:
(main):
- clear the appropriate bit in the fpscr.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115523
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-27 Gavin Barraclough <barraclough@apple.com>
+
+ <rdar://problem/7909395> Math in JavaScript is inaccurate on iOS
+
+ By defalut IEEE754 denormal support is disabled on iOS;
+ turn it on.
+
+ Reviewed by Filip Pizlo.
+
+ * jsc.cpp:
+ (main):
+ - clear the appropriate bit in the fpscr.
+
2012-04-27 Michael Saboff <msaboff@apple.com>
Memory wasted in JSString for non-rope strings
#include <QDateTime>
#endif
+#if PLATFORM(IOS)
+#include <fenv.h>
+#include <arm/arch.h>
+#endif
+
using namespace JSC;
using namespace WTF;
int main(int argc, char** argv)
{
+#if PLATFORM(IOS)
+ // Enabled IEEE754 denormal support.
+ fenv_t env;
+ fegetenv( &env );
+ env.__fpscr &= ~0x01000000u;
+ fesetenv( &env );
+#endif
+
#if OS(WINDOWS)
#if !OS(WINCE)
// Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for