diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-02-06 14:56:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-07 10:44:22 +0100 |
commit | 357e034f70a60e4016e0f0cd25f97631080cc60a (patch) | |
tree | 45ed60f356980c7b0aa5512d9d101d4ce1fe257f /src/qml/compiler/qv4instr_moth_p.h | |
parent | 9a61f10f268f15dc3dcdabe70ec2c4969cf206d8 (diff) |
Add specialized instructions for right and left shift
These give a measurable speedup as the critical code
paths are now inline.
Change-Id: I3cee8a432fbe96d66ba1e6bd277a38e624a50c14
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index a691f37b52..c49b0798ad 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -121,9 +121,13 @@ QT_BEGIN_NAMESPACE F(BitAnd, bitAnd) \ F(BitOr, bitOr) \ F(BitXor, bitXor) \ + F(Shr, shr) \ + F(Shl, shl) \ F(BitAndConst, bitAndConst) \ F(BitOrConst, bitOrConst) \ F(BitXorConst, bitXorConst) \ + F(ShrConst, shrConst) \ + F(ShlConst, shlConst) \ F(Mul, mul) \ F(Sub, sub) \ F(BinopContext, binopContext) \ @@ -629,6 +633,18 @@ union Instr Param rhs; Param result; }; + struct instr_shr { + MOTH_INSTR_HEADER + Param lhs; + Param rhs; + Param result; + }; + struct instr_shl { + MOTH_INSTR_HEADER + Param lhs; + Param rhs; + Param result; + }; struct instr_bitAndConst { MOTH_INSTR_HEADER Param lhs; @@ -647,6 +663,18 @@ union Instr int rhs; Param result; }; + struct instr_shrConst { + MOTH_INSTR_HEADER + Param lhs; + int rhs; + Param result; + }; + struct instr_shlConst { + MOTH_INSTR_HEADER + Param lhs; + int rhs; + Param result; + }; struct instr_mul { MOTH_INSTR_HEADER Param lhs; @@ -782,9 +810,13 @@ union Instr instr_bitAnd bitAnd; instr_bitOr bitOr; instr_bitXor bitXor; + instr_shr shr; + instr_shl shl; instr_bitAndConst bitAndConst; instr_bitOrConst bitOrConst; instr_bitXorConst bitXorConst; + instr_shrConst shrConst; + instr_shlConst shlConst; instr_mul mul; instr_sub sub; instr_binopContext binopContext; |