Changeset 231301 in webkit


Ignore:
Timestamp:
May 3, 2018 4:58:50 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Disable usage of fused multiply-add instructions for JSC with compiler flag
https://bugs.webkit.org/show_bug.cgi?id=184909

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-05-03
Reviewed by Yusuke Suzuki.

Adds -ffp-contract as compiler flag for building JSC. This ensures that functions
like parseInt() do not return slightly different results depending on whether the
compiler was able to use fused multiply-add instructions or not.

  • CMakeLists.txt:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r231194 r231301  
    11801180WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
    11811181
     1182if (COMPILER_IS_GCC_OR_CLANG)
     1183    # Avoid using fused multiply-add instructions since this could give different results
     1184    # for e.g. parseInt depending on the platform and compilation flags.
     1185    WEBKIT_ADD_TARGET_CXX_FLAGS(JavaScriptCore -ffp-contract=off)
     1186endif ()
     1187
    11821188WEBKIT_MAKE_FORWARDING_HEADERS(JavaScriptCore
    11831189    FILES ${JavaScriptCore_PUBLIC_FRAMEWORK_HEADERS}
  • trunk/Source/JavaScriptCore/ChangeLog

    r231290 r231301  
     12018-05-03  Dominik Infuehr  <dinfuehr@igalia.com>
     2
     3        Disable usage of fused multiply-add instructions for JSC with compiler flag
     4        https://bugs.webkit.org/show_bug.cgi?id=184909
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        Adds -ffp-contract as compiler flag for building JSC. This ensures that functions
     9        like parseInt() do not return slightly different results depending on whether the
     10        compiler was able to use fused multiply-add instructions or not.
     11
     12        * CMakeLists.txt:
     13
    1142018-05-02  Yusuke Suzuki  <utatane.tea@gmail.com>
    215
Note: See TracChangeset for help on using the changeset viewer.