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

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: Rebaseline previous CL Created 6 years, 6 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/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 497e3a86cd70ecaac15105ea39ef799e720f61db..a023192ce822f867921e360fd3fc047eb9e1f0f1 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -297,6 +297,20 @@ class OS {
// the platform doesn't care. Guaranteed to be a power of two.
static int ActivationFrameAlignment();
+ // Perform the per-thread setup necessary for specific OSes and CPUs.
+ static void PerformPerThreadSetup() {
+#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:
« no previous file with comments | « src/mksnapshot.cc ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698