Title: [231301] trunk/Source/_javascript_Core
- Revision
- 231301
- Author
- [email protected]
- Date
- 2018-05-03 04:58:50 -0700 (Thu, 03 May 2018)
Log 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 <[email protected]> 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:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (231300 => 231301)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2018-05-03 10:17:02 UTC (rev 231300)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2018-05-03 11:58:50 UTC (rev 231301)
@@ -1179,6 +1179,12 @@
WEBKIT_FRAMEWORK_DECLARE(_javascript_Core)
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+if (COMPILER_IS_GCC_OR_CLANG)
+ # Avoid using fused multiply-add instructions since this could give different results
+ # for e.g. parseInt depending on the platform and compilation flags.
+ WEBKIT_ADD_TARGET_CXX_FLAGS(_javascript_Core -ffp-contract=off)
+endif ()
+
WEBKIT_MAKE_FORWARDING_HEADERS(_javascript_Core
FILES ${_javascript_Core_PUBLIC_FRAMEWORK_HEADERS}
FLATTENED
Modified: trunk/Source/_javascript_Core/ChangeLog (231300 => 231301)
--- trunk/Source/_javascript_Core/ChangeLog 2018-05-03 10:17:02 UTC (rev 231300)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-05-03 11:58:50 UTC (rev 231301)
@@ -1,3 +1,16 @@
+2018-05-03 Dominik Infuehr <[email protected]>
+
+ Disable usage of fused multiply-add instructions for JSC with compiler flag
+ https://bugs.webkit.org/show_bug.cgi?id=184909
+
+ 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:
+
2018-05-02 Yusuke Suzuki <[email protected]>
Unreviewed, fix build failure in ARM, ARMv7 and MIPS
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes