aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-08-21 13:45:24 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-28 11:00:51 +0200
commit9a7489cc925540611383f8db044a5c79fe472317 (patch)
treea9abff3767aa07aba9c8effea0404b90eaa0b83a /src/3rdparty/masm
parent8ecb5288c96ede33970536d0f819c16a78f18238 (diff)
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/3rdparty/masm')
-rw-r--r--src/3rdparty/masm/assembler/MacroAssemblerX86.h10
1 files changed, 4 insertions, 6 deletions
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)
{