Title: [129730] trunk/Source/WTF
Revision
129730
Author
[email protected]
Date
2012-09-27 00:01:07 -0700 (Thu, 27 Sep 2012)

Log Message

[BlackBerry] Allow denormal floats in ARM VFP
https://bugs.webkit.org/show_bug.cgi?id=97008

Patch by Cosmin Truta <[email protected]> on 2012-09-26
Reviewed by Filip Pizlo.
Reviewed internally by Yong Li.

Cleared the Flush-to-Zero flag in the ARM FPSCR register on QNX.

* wtf/ThreadingPthreads.cpp:
(WTF::enableIEEE754Denormal): Added.
(WTF::initializeThreading):
(WTF::initializeCurrentThreadInternal):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (129729 => 129730)


--- trunk/Source/WTF/ChangeLog	2012-09-27 06:43:17 UTC (rev 129729)
+++ trunk/Source/WTF/ChangeLog	2012-09-27 07:01:07 UTC (rev 129730)
@@ -1,3 +1,18 @@
+2012-09-26  Cosmin Truta  <[email protected]>
+
+        [BlackBerry] Allow denormal floats in ARM VFP
+        https://bugs.webkit.org/show_bug.cgi?id=97008
+
+        Reviewed by Filip Pizlo.
+        Reviewed internally by Yong Li.
+
+        Cleared the Flush-to-Zero flag in the ARM FPSCR register on QNX.
+
+        * wtf/ThreadingPthreads.cpp:
+        (WTF::enableIEEE754Denormal): Added.
+        (WTF::initializeThreading):
+        (WTF::initializeCurrentThreadInternal):
+
 2012-09-26  Michael Saboff  <[email protected]>
 
         Update ComplexTextController for 8 bit TextRun changes

Modified: trunk/Source/WTF/wtf/ThreadingPthreads.cpp (129729 => 129730)


--- trunk/Source/WTF/wtf/ThreadingPthreads.cpp	2012-09-27 06:43:17 UTC (rev 129729)
+++ trunk/Source/WTF/wtf/ThreadingPthreads.cpp	2012-09-27 07:01:07 UTC (rev 129730)
@@ -110,11 +110,26 @@
     return mutex;
 }
 
+#if OS(QNX) && CPU(ARM_THUMB2)
+static void enableIEEE754Denormal()
+{
+    // Clear the ARM_VFP_FPSCR_FZ flag in FPSCR.
+    unsigned fpscr;
+    asm volatile("vmrs %0, fpscr" : "=r"(fpscr));
+    fpscr &= ~0x01000000u;
+    asm volatile("vmsr fpscr, %0" : : "r"(fpscr));
+}
+#endif
+
 void initializeThreading()
 {
     if (atomicallyInitializedStaticMutex)
         return;
 
+#if OS(QNX) && CPU(ARM_THUMB2)
+    enableIEEE754Denormal();
+#endif
+
     WTF::double_conversion::initialize();
     // StringImpl::empty() does not construct its static string in a threadsafe fashion,
     // so ensure it has been initialized from here.
@@ -212,6 +227,10 @@
     objc_registerThreadWithCollector();
 #endif
 
+#if OS(QNX) && CPU(ARM_THUMB2)
+    enableIEEE754Denormal();
+#endif
+
     ThreadIdentifier id = identifierByPthreadHandle(pthread_self());
     ASSERT(id);
     ThreadIdentifierData::initialize(id);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to