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

Unified Diff: src/interpreter/bytecodes.h

Issue 2111923002: [interpreter] Introduce binary op bytecodes for Smi operand. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « src/interpreter/bytecode-pipeline.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index 556e0b0195c8884105319b955164ff5b916f1c82..36041cb97e5bc59b27a5be846787275ef2844395 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -157,6 +157,18 @@ namespace interpreter {
V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg) \
V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg) \
\
+ /* Binary operators with immediate operands */ \
+ V(AddSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg) \
+ V(SubSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg) \
+ V(BitwiseOrSmi, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kReg) \
+ V(BitwiseAndSmi, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kReg) \
+ V(ShiftLeftSmi, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kReg) \
+ V(ShiftRightSmi, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kReg) \
+ \
/* Unary Operators */ \
V(Inc, AccumulatorUse::kReadWrite) \
V(Dec, AccumulatorUse::kReadWrite) \
@@ -592,6 +604,9 @@ class Bytecodes {
// Returns true if the bytecode is Ldar or Star.
static bool IsLdarOrStar(Bytecode bytecode);
+ // Returns true if the bytecode is LdaSmi or LdaZero.
+ static bool IsLdaSmiOrLdaZero(Bytecode bytecode);
+
// Returns true if the bytecode has wider operand forms.
static bool IsBytecodeWithScalableOperands(Bytecode bytecode);
« no previous file with comments | « src/interpreter/bytecode-pipeline.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698