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

Unified Diff: src/compiler/interpreter-assembler.cc

Issue 1633153002: [interpreter] Reduce move operations for wide register support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove RegisterOperandIsMovable from RegisterMover interface Created 4 years, 11 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 | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/interpreter-assembler.cc
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc
index 8684345f8eab8d7ec98d4263ceb86f5f196fe6ea..6d10b150a47622d0130b5b3bec6723365b25282a 100644
--- a/src/compiler/interpreter-assembler.cc
+++ b/src/compiler/interpreter-assembler.cc
@@ -305,31 +305,18 @@ Node* InterpreterAssembler::BytecodeOperandIdx(int operand_index) {
Node* InterpreterAssembler::BytecodeOperandReg(int operand_index) {
- switch (interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)) {
- case interpreter::OperandType::kMaybeReg8:
- case interpreter::OperandType::kReg8:
- case interpreter::OperandType::kRegPair8:
- case interpreter::OperandType::kRegTriple8:
- DCHECK_EQ(
- interpreter::OperandSize::kByte,
- interpreter::Bytecodes::GetOperandSize(bytecode_, operand_index));
+ interpreter::OperandType operand_type =
+ interpreter::Bytecodes::GetOperandType(bytecode_, operand_index);
+ if (interpreter::Bytecodes::IsRegisterOperandType(operand_type)) {
+ interpreter::OperandSize operand_size =
+ interpreter::Bytecodes::SizeOfOperand(operand_type);
+ if (operand_size == interpreter::OperandSize::kByte) {
return BytecodeOperandSignExtended(operand_index);
- case interpreter::OperandType::kMaybeReg16:
- case interpreter::OperandType::kReg16:
- case interpreter::OperandType::kRegPair16:
- case interpreter::OperandType::kRegTriple16:
- DCHECK_EQ(
- interpreter::OperandSize::kShort,
- interpreter::Bytecodes::GetOperandSize(bytecode_, operand_index));
+ } else if (operand_size == interpreter::OperandSize::kShort) {
return BytecodeOperandShortSignExtended(operand_index);
- case interpreter::OperandType::kNone:
- case interpreter::OperandType::kIdx8:
- case interpreter::OperandType::kIdx16:
- case interpreter::OperandType::kImm8:
- case interpreter::OperandType::kRegCount8:
- case interpreter::OperandType::kRegCount16:
- UNREACHABLE();
+ }
}
+ UNREACHABLE();
return nullptr;
}
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698