Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: src/platform-qnx.cc

Issue 125133002: ARM: Enable the subnormal floats on QNX. Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform-posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-qnx.cc
diff --git a/src/platform-qnx.cc b/src/platform-qnx.cc
index cd031e795648c69d5dc910761c6e7394f6b59793..710345854b79741d2aa525c61cd8613e471b0813 100644
--- a/src/platform-qnx.cc
+++ b/src/platform-qnx.cc
@@ -107,6 +107,21 @@ bool OS::ArmUsingHardFloat() {
#undef GCC_VERSION
}
+
+void OS::ArmEnableSubnormalFloat() {
+ // Clear the ARM_VFP_FPSCR_FZ flag in the FPSCR register.
+ uint32_t fpscr;
+ asm volatile("vmrs %0, fpscr" : "=r"(fpscr));
+ fpscr &= ~0x01000000u;
+ asm volatile("vmsr fpscr, %0" : : "r"(fpscr));
Sven Panne 2014/01/07 09:48:49 I think a single parameter-less asm with 3 instruc
+}
+
+struct QnxArmStaticInitializer {
+ QnxArmStaticInitializer() {
+ OS::ArmEnableSubnormalFloat();
+ }
+} qnx_arm_static_initializer;
Sven Panne 2014/01/07 09:48:49 No new static initializers, please, use V8::Initia
+
#endif // __arm__
« no previous file with comments | « src/platform-posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698