aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-02-07 22:03:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-22 10:11:45 +0100
commit61c682b410707ca610e92d4f6934e01f6233a6a8 (patch)
treeb4dc2743a112fe5ca97ae40ebae5522614c86ad0 /src/qml/compiler
parent2f3ffc875628b6a90102588f1684c4ba80e128a4 (diff)
Slightly simplify generated code for conversion to int
Take only one branch for integers, and save one instruction in total. Change-Id: I496f11fb3f080f71e9f415ebb4201228c63471b8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4isel_masm.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp
index af4439fd44..c786a5c19c 100644
--- a/src/qml/compiler/qv4isel_masm.cpp
+++ b/src/qml/compiler/qv4isel_masm.cpp
@@ -1576,10 +1576,8 @@ void InstructionSelection::convertTypeToSInt32(V4IR::Temp *source, V4IR::Temp *t
// check if it's a number
_as->urshift64(Assembler::TrustedImm32(QV4::Value::IsNumber_Shift), Assembler::ScratchRegister);
+ Assembler::Jump isInt = _as->branch32(Assembler::Equal, Assembler::ScratchRegister, Assembler::TrustedImm32(1));
Assembler::Jump fallback = _as->branch32(Assembler::Equal, Assembler::ScratchRegister, Assembler::TrustedImm32(0));
- // we have a number
- _as->urshift64(Assembler::TrustedImm32(1), Assembler::ScratchRegister);
- Assembler::Jump isInt = _as->branch32(Assembler::Equal, Assembler::ScratchRegister, Assembler::TrustedImm32(0));
// it's a double
_as->move(Assembler::TrustedImm64(QV4::Value::NaNEncodeMask), Assembler::ScratchRegister);