Title: [259556] trunk/Source/_javascript_Core
Revision
259556
Author
[email protected]
Date
2020-04-05 15:59:45 -0700 (Sun, 05 Apr 2020)

Log Message

ARM64 moveConditionallyDouble() for DoubleNotEqualAndOrdered is wrong.
https://bugs.webkit.org/show_bug.cgi?id=210039
<rdar://problem/61321778>

Reviewed by Yusuke Suzuki.

For the scenario where the dest register is same as the then case register, there
is one csel instruction that should be checking the overflow condition to test
for unordered operands.  Instead, we were testing for the not equal condition.
This patch fixes it to check for the overflow condition.

This bug was caught by testmasm.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (259555 => 259556)


--- trunk/Source/_javascript_Core/ChangeLog	2020-04-05 22:01:38 UTC (rev 259555)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-04-05 22:59:45 UTC (rev 259556)
@@ -1,3 +1,21 @@
+2020-04-05  Mark Lam  <[email protected]>
+
+        ARM64 moveConditionallyDouble() for DoubleNotEqualAndOrdered is wrong.
+        https://bugs.webkit.org/show_bug.cgi?id=210039
+        <rdar://problem/61321778>
+
+        Reviewed by Yusuke Suzuki.
+
+        For the scenario where the dest register is same as the then case register, there
+        is one csel instruction that should be checking the overflow condition to test
+        for unordered operands.  Instead, we were testing for the not equal condition.
+        This patch fixes it to check for the overflow condition.
+
+        This bug was caught by testmasm.
+
+        * assembler/MacroAssemblerARM64.h:
+        (JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):
+
 2020-04-05  David Kilzer  <[email protected]>
 
         Sort _javascript_Core Xcode project file

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerARM64.h (259555 => 259556)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerARM64.h	2020-04-05 22:01:38 UTC (rev 259555)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerARM64.h	2020-04-05 22:59:45 UTC (rev 259556)
@@ -2033,7 +2033,7 @@
                 // next csel has all arguments equal to elseCase.
                 // If the compare is ordered, dest is unchanged and NE decides
                 // what value to set.
-                m_assembler.csel<datasize>(thenCase, elseCase, thenCase, Assembler::ConditionNE);
+                m_assembler.csel<datasize>(thenCase, elseCase, thenCase, Assembler::ConditionVS);
                 m_assembler.csel<datasize>(dest, thenCase, elseCase, Assembler::ConditionNE);
             } else {
                 move(elseCase, dest);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to