From 7ca46bc34d194fe824f6474caf930b186bb98025 Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Mon, 3 Mar 2014 10:17:15 +0100 Subject: Use moveDoubleToInts in SpecializedThunkJIT::returnDouble for non-X86 JSVALUE32_64 ports. https://bugs.webkit.org/show_bug.cgi?id=124936 Patch by Julien Brianceau on 2013-11-29 Reviewed by Zoltan Herczeg. The moveDoubleToInts implementations in ARM, MIPS and SH4 macro assemblers do not clobber src FPRegister and are likely to be more efficient than the current generic implementation using the stack. * jit/SpecializedThunkJIT.h: (JSC::SpecializedThunkJIT::returnDouble): Change-Id: Ie3b6516a4047717212521315e85f5e2094373cbc git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159873 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen --- Source/JavaScriptCore/jit/SpecializedThunkJIT.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Source/JavaScriptCore/jit') diff --git a/Source/JavaScriptCore/jit/SpecializedThunkJIT.h b/Source/JavaScriptCore/jit/SpecializedThunkJIT.h index 9a0e0a30e..6b09781a0 100644 --- a/Source/JavaScriptCore/jit/SpecializedThunkJIT.h +++ b/Source/JavaScriptCore/jit/SpecializedThunkJIT.h @@ -97,10 +97,15 @@ namespace JSC { zero.link(this); move(tagTypeNumberRegister, regT0); done.link(this); +#else +#if !CPU(X86) + // The src register is not clobbered by moveDoubleToInts with ARM, MIPS and SH4 macro assemblers, so let's use it. + moveDoubleToInts(src, regT0, regT1); #else storeDouble(src, Address(stackPointerRegister, -(int)sizeof(double))); loadPtr(Address(stackPointerRegister, OBJECT_OFFSETOF(JSValue, u.asBits.tag) - sizeof(double)), regT1); loadPtr(Address(stackPointerRegister, OBJECT_OFFSETOF(JSValue, u.asBits.payload) - sizeof(double)), regT0); +#endif Jump lowNonZero = branchTestPtr(NonZero, regT1); Jump highNonZero = branchTestPtr(NonZero, regT0); move(TrustedImm32(0), regT0); -- cgit v1.2.1