Ignore:
Timestamp:
Apr 25, 2017, 7:15:42 AM (8 years ago)
Author:
[email protected]
Message:

[aarch64] moveConditionally32(), moveConditionallyTest32() should move from/to 64-bit registers
https://bugs.webkit.org/show_bug.cgi?id=170891

Reviewed by Saam Barati.

moveConditionally32() and moveConditionallyTest32() operations in
MacroAssemblerARM64 properly perform comparisons and tests on 32-bit
values, but end up performing the moves from and to 32-bit registers.

Move operations should instead be done on 64-bit registers, just like
on the X86_64 platform. This is achieved by specifying 64 as the data
size for the csel instructions.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::moveConditionally32):
(JSC::MacroAssemblerARM64::moveConditionallyTest32):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h

    r215592 r215731  
    22342234    {
    22352235        m_assembler.cmp<32>(left, right);
    2236         m_assembler.csel<32>(dest, src, dest, ARM64Condition(cond));
     2236        m_assembler.csel<64>(dest, src, dest, ARM64Condition(cond));
    22372237    }
    22382238
     
    22402240    {
    22412241        m_assembler.cmp<32>(left, right);
    2242         m_assembler.csel<32>(dest, thenCase, elseCase, ARM64Condition(cond));
     2242        m_assembler.csel<64>(dest, thenCase, elseCase, ARM64Condition(cond));
    22432243    }
    22442244
     
    22982298    {
    22992299        m_assembler.tst<32>(testReg, mask);
    2300         m_assembler.csel<32>(dest, src, dest, ARM64Condition(cond));
     2300        m_assembler.csel<64>(dest, src, dest, ARM64Condition(cond));
    23012301    }
    23022302
     
    23042304    {
    23052305        m_assembler.tst<32>(left, right);
    2306         m_assembler.csel<32>(dest, thenCase, elseCase, ARM64Condition(cond));
     2306        m_assembler.csel<64>(dest, thenCase, elseCase, ARM64Condition(cond));
    23072307    }
    23082308
     
    23102310    {
    23112311        test32(left, right);
    2312         m_assembler.csel<32>(dest, thenCase, elseCase, ARM64Condition(cond));
     2312        m_assembler.csel<64>(dest, thenCase, elseCase, ARM64Condition(cond));
    23132313    }
    23142314
Note: See TracChangeset for help on using the changeset viewer.