Ignore:
Timestamp:
Jul 1, 2011, 9:33:46 AM (14 years ago)
Author:
[email protected]
Message:

2011-06-30 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

Add optimised paths for a few maths functions
https://bugs.webkit.org/show_bug.cgi?id=63757

Relanding as a Mac only patch.

This adds specialised thunks for Math.abs, Math.round, Math.ceil,
Math.floor, Math.log, and Math.exp as they are apparently more
important in real web content than we thought, which is somewhat
mind-boggling. On average doubles the performance of the common
cases (eg. actually passing numbers in). They're not as efficient
as they could be, but this way gives them the most portability.

  • assembler/MacroAssemblerARM.h: (JSC::MacroAssemblerARM::supportsDoubleBitops): (JSC::MacroAssemblerARM::andnotDouble):
  • assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::supportsDoubleBitops): (JSC::MacroAssemblerARMv7::andnotDouble):
  • assembler/MacroAssemblerMIPS.h: (JSC::MacroAssemblerMIPS::andnotDouble): (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
  • assembler/MacroAssemblerSH4.h: (JSC::MacroAssemblerSH4::supportsDoubleBitops): (JSC::MacroAssemblerSH4::andnotDouble):
  • assembler/MacroAssemblerX86.h: (JSC::MacroAssemblerX86::supportsDoubleBitops):
  • assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::andnotDouble):
  • assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
  • assembler/X86Assembler.h: (JSC::X86Assembler::andnpd_rr):
  • create_hash_table:
  • jit/SpecializedThunkJIT.h: (JSC::SpecializedThunkJIT::finalize): (JSC::SpecializedThunkJIT::callDoubleToDouble):
  • jit/ThunkGenerators.cpp: (JSC::floorThunkGenerator): (JSC::ceilThunkGenerator): (JSC::roundThunkGenerator): (JSC::expThunkGenerator): (JSC::logThunkGenerator): (JSC::absThunkGenerator):
  • jit/ThunkGenerators.h:
File:
1 edited

Legend:

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

    r90215 r90237  
    180180        m_assembler.movs_r(dest, m_assembler.asr_r(dest, ARMRegisters::S0));
    181181    }
    182 
     182   
    183183    void rshift32(TrustedImm32 imm, RegisterID dest)
    184184    {
    185         m_assembler.movs_r(dest, m_assembler.asr(dest, imm.m_value & 0x1f));
     185        rshift32(dest, imm, dest);
     186    }
     187
     188    void rshift32(RegisterID src, TrustedImm32 imm, RegisterID dest)
     189    {
     190        m_assembler.movs_r(dest, m_assembler.asr(src, imm.m_value & 0x1f));
    186191    }
    187192   
     
    790795        return s_isVFPPresent;
    791796    }
     797    bool supportsDoubleBitops() const { return false; }
    792798
    793799    void loadDouble(ImplicitAddress address, FPRegisterID dest)
     
    855861    {
    856862        m_assembler.vsqrt_f64_r(dest, src);
     863    }
     864   
     865    void andnotDouble(FPRegisterID, FPRegisterID)
     866    {
     867        ASSERT_NOT_REACHED();
    857868    }
    858869
Note: See TracChangeset for help on using the changeset viewer.