⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259556 in webkit


Ignore:
Timestamp:
Apr 5, 2020, 3:59:45 PM (6 years ago)
Author:
mark.lam@apple.com
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):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r259555 r259556  
     12020-04-05  Mark Lam  <mark.lam@apple.com>
     2
     3        ARM64 moveConditionallyDouble() for DoubleNotEqualAndOrdered is wrong.
     4        https://bugs.webkit.org/show_bug.cgi?id=210039
     5        <rdar://problem/61321778>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        For the scenario where the dest register is same as the then case register, there
     10        is one csel instruction that should be checking the overflow condition to test
     11        for unordered operands.  Instead, we were testing for the not equal condition.
     12        This patch fixes it to check for the overflow condition.
     13
     14        This bug was caught by testmasm.
     15
     16        * assembler/MacroAssemblerARM64.h:
     17        (JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):
     18
    1192020-04-05  David Kilzer  <ddkilzer@apple.com>
    220
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h

    r258063 r259556  
    20342034                // If the compare is ordered, dest is unchanged and NE decides
    20352035                // what value to set.
    2036                 m_assembler.csel<datasize>(thenCase, elseCase, thenCase, Assembler::ConditionNE);
     2036                m_assembler.csel<datasize>(thenCase, elseCase, thenCase, Assembler::ConditionVS);
    20372037                m_assembler.csel<datasize>(dest, thenCase, elseCase, Assembler::ConditionNE);
    20382038            } else {
Note: See TracChangeset for help on using the changeset viewer.