From 9a7489cc925540611383f8db044a5c79fe472317 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 21 Aug 2013 13:45:24 +0200 Subject: Generate code conversion to double. Performance improves by about 15% on fact.3.js when Qt is build in debug mode. Change-Id: I4a1c868fe211c1e0f9e7d9a5652f7726b37405d1 Reviewed-by: Simon Hausmann --- src/3rdparty/masm/assembler/MacroAssemblerX86.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/3rdparty/masm') diff --git a/src/3rdparty/masm/assembler/MacroAssemblerX86.h b/src/3rdparty/masm/assembler/MacroAssemblerX86.h index eb0702d464..7a01e41e11 100644 --- a/src/3rdparty/masm/assembler/MacroAssemblerX86.h +++ b/src/3rdparty/masm/assembler/MacroAssemblerX86.h @@ -123,20 +123,18 @@ public: m_assembler.cvtsi2sd_mr(src.m_ptr, dest); } -#if 0 // FIXME: UNTESTED! void convertUInt32ToDouble(RegisterID src, FPRegisterID dest, RegisterID scratch) { Jump intRange = branch32(GreaterThanOrEqual, src, TrustedImm32(0)); and32(TrustedImm32(INT_MAX), src, scratch); - convertInt32ToDouble(scratch, dst); - static const double magic = INT_MAX + 1; - addDouble(&magic, dst); + convertInt32ToDouble(scratch, dest); + static const double magic = double(INT_MAX) + 1; + addDouble(AbsoluteAddress(&magic), dest); Jump done = jump(); intRange.link(this); - convertInt32ToDouble(src, dst); + convertInt32ToDouble(src, dest); done.link(this); } -#endif void store32(TrustedImm32 imm, void* address) { -- cgit v1.2.3