Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 156d3b4e90cba5ce5bbe995ec46e976702feae83..604166c3d9e6c4186d5aae4768d987883740c362 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -375,6 +375,40 @@ void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) { |
} |
+// ShiftLeft <src> |
+// |
+// Left shifts register <src> by the count specified in the accumulator. |
+// Register <src> is converted to an int32 and the accumulator to uint32 |
+// before the operation. 5 lsb bits from the accumulator are used as count |
+// i.e. <src> << (accumulator & 0x1F). |
+void Interpreter::DoShiftLeft(compiler::InterpreterAssembler* assembler) { |
+ DoBinaryOp(Runtime::kShiftLeft, assembler); |
+} |
+ |
+ |
+// ShiftRight <src> |
+// |
+// Right shifts register <src> by the count specified in the accumulator. |
+// Result is sign extended. Register <src> is converted to an int32 and the |
+// accumulator to uint32 before the operation. 5 lsb bits from the accumulator |
+// are used as count i.e. <src> >> (accumulator & 0x1F). |
+void Interpreter::DoShiftRight(compiler::InterpreterAssembler* assembler) { |
+ DoBinaryOp(Runtime::kShiftRight, assembler); |
+} |
+ |
+ |
+// ShiftRightLogical <src> |
+// |
+// Right Shifts register <src> by the count specified in the accumulator. |
+// Result is zero-filled. The accumulator and register <src> are converted to |
+// uint32 before the operation 5 lsb bits from the accumulator are used as |
+// count i.e. <src> << (accumulator & 0x1F). |
+void Interpreter::DoShiftRightLogical( |
+ compiler::InterpreterAssembler* assembler) { |
+ DoBinaryOp(Runtime::kShiftRightLogical, assembler); |
+} |
+ |
+ |
// LogicalNot |
// |
// Perform logical-not on the accumulator, first casting the |