Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: src/interpreter/interpreter.cc

Issue 1392913002: [Interpreter] Adds shift operators to interpreter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased the patch Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 156d3b4e90cba5ce5bbe995ec46e976702feae83..01f05e7621faa1bfd9369c60e1721c68d1f37d10 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -375,6 +375,33 @@ void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) {
}
+// ShiftLeft <src>
+//
+// Left shifts accumulator by the count specified in register <src>.
oth 2015/10/07 13:53:17 Can the comments here and below mention that the a
mythria 2015/10/08 14:33:44 Done.
+void Interpreter::DoShiftLeft(compiler::InterpreterAssembler* assembler) {
+ DoBinaryOp(Runtime::kShiftLeft, assembler);
+}
+
+
+// ShiftRight <src>
+//
+// Right shifts accumulator by the count specified in register <src>.
+// Result is sign extended.
+void Interpreter::DoShiftRight(compiler::InterpreterAssembler* assembler) {
+ DoBinaryOp(Runtime::kShiftRight, assembler);
+}
+
+
+// ShiftRightLogical <src>
+//
+// Right Shifts accumulator by the count specified in register <src>.
+// Result is zero-filled.
+void Interpreter::DoShiftRightLogical(
+ compiler::InterpreterAssembler* assembler) {
+ DoBinaryOp(Runtime::kShiftRightLogical, assembler);
+}
+
+
// LogicalNot
//
// Perform logical-not on the accumulator, first casting the

Powered by Google App Engine
This is Rietveld 408576698