Title: [145551] trunk/Source/_javascript_Core
Revision
145551
Author
rga...@webkit.org
Date
2013-03-12 08:28:10 -0700 (Tue, 12 Mar 2013)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=112141
LLInt CLoop backend misses Double2Ints() on 32bit architectures

Reviewed by Filip Pizlo.

Implement Double2Ints() in CLoop backend of LLInt on 32bit architectures.

* llint/LowLevelInterpreter.cpp:
(LLInt):
(JSC::LLInt::Double2Ints):
* offlineasm/cloop.rb:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (145550 => 145551)


--- trunk/Source/_javascript_Core/ChangeLog	2013-03-12 15:23:08 UTC (rev 145550)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-03-12 15:28:10 UTC (rev 145551)
@@ -1,5 +1,19 @@
 2013-03-12  Gabor Rapcsanyi  <rga...@webkit.org>
 
+        https://bugs.webkit.org/show_bug.cgi?id=112141
+        LLInt CLoop backend misses Double2Ints() on 32bit architectures
+
+        Reviewed by Filip Pizlo.
+
+        Implement Double2Ints() in CLoop backend of LLInt on 32bit architectures.
+
+        * llint/LowLevelInterpreter.cpp:
+        (LLInt):
+        (JSC::LLInt::Double2Ints):
+        * offlineasm/cloop.rb:
+
+2013-03-12  Gabor Rapcsanyi  <rga...@webkit.org>
+
         Making more sophisticated cache flush on ARM Linux platform
         https://bugs.webkit.org/show_bug.cgi?id=111854
 

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp (145550 => 145551)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp	2013-03-12 15:23:08 UTC (rev 145550)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp	2013-03-12 15:28:10 UTC (rev 145551)
@@ -117,6 +117,17 @@
     u.ival64 = (static_cast<uint64_t>(hi) << 32) | lo;
     return u.dval;
 }
+
+static void Double2Ints(double val, uint32_t& lo, uint32_t& hi)
+{
+    union {
+        double dval;
+        uint64_t ival64;
+    } u;
+    u.dval = val;
+    hi = static_cast<uint32_t>(u.ival64 >> 32);
+    lo = static_cast<uint32_t>(u.ival64);
+}
 #endif // USE(JSVALUE32_64)
 
 } // namespace LLint

Modified: trunk/Source/_javascript_Core/offlineasm/cloop.rb (145550 => 145551)


--- trunk/Source/_javascript_Core/offlineasm/cloop.rb	2013-03-12 15:23:08 UTC (rev 145550)
+++ trunk/Source/_javascript_Core/offlineasm/cloop.rb	2013-03-12 15:28:10 UTC (rev 145551)
@@ -1025,7 +1025,7 @@
         # 32-bit instruction: f2dii dblOp int32LoOp int32HiOp (based on ARMv7)
         # Encode a 64-bit double into 2 32-bit ints (low and high).
         when "fd2ii"
-            $asm.putc "Double2Ints(#{operands[0].clValue(:double)}, #{operands[1].clValue}, #{operands[2].clValue});"
+            $asm.putc "Double2Ints(#{operands[0].clValue(:double)}, #{operands[1].clValue(:uint32)}, #{operands[2].clValue(:uint32)});"
 
         # 64-bit instruction: fq2d int64Op dblOp (based on X64)
         # Copy a bit-encoded double in a 64-bit int register to a double register.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to