Ignore:
Timestamp:
Apr 27, 2012, 6:02:03 PM (13 years ago)
Author:
[email protected]
Message:

<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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r114702 r115523  
    7373#endif
    7474
     75#if PLATFORM(IOS)
     76#include <fenv.h>
     77#include <arm/arch.h>
     78#endif
     79
    7580using namespace JSC;
    7681using namespace WTF;
     
    446451int main(int argc, char** argv)
    447452{
     453#if PLATFORM(IOS)
     454    // Enabled IEEE754 denormal support.
     455    fenv_t env;
     456    fegetenv( &env );
     457    env.__fpscr &= ~0x01000000u;
     458    fesetenv( &env );
     459#endif
     460
    448461#if OS(WINDOWS)
    449462#if !OS(WINCE)
Note: See TracChangeset for help on using the changeset viewer.