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

Unified Diff: src/platform.h

Issue 125133002: ARM: Enable the subnormal floats on QNX. Base URL: git://github.com/v8/v8.git@master
Patch Set: Reworked CL 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
« include/v8.h ('K') | « src/mksnapshot.cc ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index 51eefc10f802a7691a1ef4dcebf753eb87be2c5d..fedd30e1eef1192f41022006c20ba97aa9d55b3f 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -398,6 +398,20 @@ class OS {
static const int kMinComplexMemCopy = 16 * kPointerSize;
#endif // V8_TARGET_ARCH_IA32
+ // Perform the per-thread setup necessary for specific OSes and CPUs.
+ static void PerThreadSetUp() {
+#if V8_OS_QNX && defined(V8_HOST_ARCH_ARM)
+ // Clear the ARM_VFP_FPSCR_FZ flag in the FPSCR register.
+ // This disables the flush-to-zero mode in the VFP, allowing
+ // the handling of subnormals.
+ asm volatile(
+ "vmrs r3, fpscr \n\t"
+ "bic r3, r3, 0x01000000 \n\t"
+ "vmsr fpscr, r3"
+ : : : "r3");
+#endif // V8_OS_QNX && V8_HOST_ARCH_ARM
+ }
+
static int GetCurrentProcessId();
private:
« include/v8.h ('K') | « src/mksnapshot.cc ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698