diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-12 17:12:21 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-14 21:49:53 +0000 |
commit | a385ea0813e8d8ea834e1d2403509777cd52d3e9 (patch) | |
tree | 74e3a02258fa582fdca7539bb90fffff28dc3ead /src/qml/jit/qv4assembler_p.h | |
parent | be2fe9b60c2c6c27ce144123dec6d284171c6fec (diff) |
Remove another instance of TrustedImmPtr usage in the JIT
Use of TrustedImmPtr means the code becomes unrelocatable. Replace the usage
with constant table use. This does not eliminate the absolute addressing right
now as the constant table still uses patches, but that needs to be ported
separately anyway.
Change-Id: I469520fba9c9068f041157e39bc57552558e3355
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jit/qv4assembler_p.h')
-rw-r--r-- | src/qml/jit/qv4assembler_p.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h index ae9302316d..9373821082 100644 --- a/src/qml/jit/qv4assembler_p.h +++ b/src/qml/jit/qv4assembler_p.h @@ -1092,9 +1092,8 @@ public: // it's not in signed int range, so load it as a double, and truncate it down loadDouble(addr, FPGpr0); - static const double magic = double(INT_MAX) + 1; - move(TrustedImmPtr(&magic), scratchReg); - subDouble(Address(scratchReg, 0), FPGpr0); + Address inversionAddress = constantTable().loadValueAddress(QV4::Primitive::fromDouble(double(INT_MAX) + 1), scratchReg); + subDouble(inversionAddress, FPGpr0); Jump canNeverHappen = branchTruncateDoubleToUint32(FPGpr0, scratchReg); canNeverHappen.link(this); or32(TrustedImm32(1 << 31), scratchReg); |