aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-14 08:54:44 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-14 20:23:57 +0200
commit27f2afddea389746f2a6d3e2ebb934f6fd1a8101 (patch)
tree1f8efd32692ee7efb58d4133b0412f9e013ffdf9 /src/qml
parent77e566b6f68a0b6bdf3823fe713470c4865d37d1 (diff)
Fix a small bug in conversion to SInt32
If the truncation from double returned out of bounds, the code was not generating the right call to the fallback method on 64 bit. Change-Id: I6a126dd013c5b6373762beef0c1459fae1c26ef2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/compiler/qv4isel_masm.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp
index 14956190aa..842b2611bb 100644
--- a/src/qml/compiler/qv4isel_masm.cpp
+++ b/src/qml/compiler/qv4isel_masm.cpp
@@ -1612,9 +1612,6 @@ void InstructionSelection::convertTypeToSInt32(V4IR::Temp *source, V4IR::Temp *t
Assembler::Jump success =
_as->branchTruncateDoubleToInt32(Assembler::FPGpr0, Assembler::ReturnValueRegister,
Assembler::BranchIfTruncateSuccessful);
- generateFunctionCall(Assembler::ReturnValueRegister, __qmljs_double_to_int32,
- Assembler::PointerToValue(source));
- Assembler::Jump converted = _as->jump();
// not an int:
fallback.link(_as);
@@ -1623,12 +1620,7 @@ void InstructionSelection::convertTypeToSInt32(V4IR::Temp *source, V4IR::Temp *t
isInt.link(_as);
success.link(_as);
- converted.link(_as);
if (target->kind == V4IR::Temp::StackSlot) {
-// _as->move(Assembler::TrustedImm32(QV4::Value::_Integer_Type), Assembler::ScratchRegister);
-// _as->lshift64(Assembler::TrustedImm32(32), Assembler::ScratchRegister);
-// _as->or64(Assembler::ScratchRegister, Assembler::ReturnValueRegister, Assembler::ScratchRegister);
-// _as->store64(Assembler::ScratchRegister, target);
Assembler::Pointer targetAddr = _as->stackSlotPointer(target);
_as->store32(Assembler::ReturnValueRegister, targetAddr);
targetAddr.offset += 4;