From 27f2afddea389746f2a6d3e2ebb934f6fd1a8101 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 14 Oct 2013 08:54:44 +0200 Subject: 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 --- src/qml/compiler/qv4isel_masm.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/qml') 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; -- cgit v1.2.3