Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: disable fast math on arm #1398

Merged
merged 2 commits into from
Apr 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3541,6 +3541,20 @@ void Init(int* argc,
DispatchDebugMessagesAsyncCallback);
uv_unref(reinterpret_cast<uv_handle_t*>(&dispatch_debug_messages_async));

#if defined(__ARM_ARCH_6__) || \
defined(__ARM_ARCH_6J__) || \
defined(__ARM_ARCH_6K__) || \
defined(__ARM_ARCH_6M__) || \
defined(__ARM_ARCH_6T2__) || \
defined(__ARM_ARCH_6ZK__) || \
defined(__ARM_ARCH_6Z__)
// See https://github.com/iojs/io.js/issues/1376
// and https://code.google.com/p/v8/issues/detail?id=4019
// TODO(bnoordhuis): Remove test/parallel/test-arm-math-exp-regress-1376.js
// and this workaround when v8:4019 has been fixed and the patch back-ported.
V8::SetFlagsFromString("--nofast_math", sizeof("--nofast_math") - 1);
#endif

#if defined(NODE_V8_OPTIONS)
// Should come before the call to V8::SetFlagsFromCommandLine()
// so the user can disable a flag --foo at run-time by passing
Expand Down
30 changes: 30 additions & 0 deletions test/parallel/test-arm-math-exp-regress-1376.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// See https://github.com/iojs/io.js/issues/1376
// and https://code.google.com/p/v8/issues/detail?id=4019

Math.abs(-0.5);
Math.acos(-0.5);
Math.acosh(-0.5);
Math.asin(-0.5);
Math.asinh(-0.5);
Math.atan(-0.5);
Math.atanh(-0.5);
Math.cbrt(-0.5);
Math.ceil(-0.5);
Math.cos(-0.5);
Math.cosh(-0.5);
Math.exp(-0.5);
Math.expm1(-0.5);
Math.floor(-0.5);
Math.fround(-0.5);
Math.log(-0.5);
Math.log10(-0.5);
Math.log1p(-0.5);
Math.log2(-0.5);
Math.round(-0.5);
Math.sign(-0.5);
Math.sin(-0.5);
Math.sinh(-0.5);
Math.sqrt(-0.5);
Math.tan(-0.5);
Math.tanh(-0.5);
Math.trunc(-0.5);