V4 JIT: fix constant shifts.
authorErik Verbruggen <erik.verbruggen@digia.com>
Fri, 11 Apr 2014 08:30:45 +0000 (10:30 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 15 Apr 2014 13:27:12 +0000 (15:27 +0200)
commit63f757faea7008e478e0a1edea4f0ae79aaba5f7
tree52e63f585b68771a7dad4440de162f58a05bd6dc
parent926a98eb5e3f1eb7f872f7c94812589abd18a90d
V4 JIT: fix constant shifts.

Do not generate constant shifts of 0. We do not use the flags, so it's a
move. On ARM it's actually important not to do this, because lsr/asr
with imm=0 is a special case (shift of 32 bits).

When in the area, also skip generating an and of the second operand with
0x1f. For Intel this is done on the CPU, and for ARM the JSC assembler
will generate it for us.

This patch also updates the ARM disassembler to print the right
immediate values for the shifts.

Change-Id: I7c92c8d899352712c84e5534c48392d75466be0e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/3rdparty/masm/disassembler/ARMv7/ARMv7DOpcode.cpp
src/3rdparty/masm/disassembler/ARMv7/ARMv7DOpcode.h
src/qml/jit/qv4binop.cpp