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

Side by Side Diff: src/interpreter/bytecode-array-iterator.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 unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/bytecode-array-iterator.h" 5 #include "src/interpreter/bytecode-array-iterator.h"
6 6
7 #include "src/objects-inl.h" 7 #include "src/objects-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 DCHECK(operand_type == OperandType::kIdx8 || 80 DCHECK(operand_type == OperandType::kIdx8 ||
81 operand_type == OperandType::kIdx16); 81 operand_type == OperandType::kIdx16);
82 uint32_t operand = GetRawOperand(operand_index, operand_type); 82 uint32_t operand = GetRawOperand(operand_index, operand_type);
83 return static_cast<int>(operand); 83 return static_cast<int>(operand);
84 } 84 }
85 85
86 86
87 Register BytecodeArrayIterator::GetRegisterOperand(int operand_index) const { 87 Register BytecodeArrayIterator::GetRegisterOperand(int operand_index) const {
88 OperandType operand_type = 88 OperandType operand_type =
89 Bytecodes::GetOperandType(current_bytecode(), operand_index); 89 Bytecodes::GetOperandType(current_bytecode(), operand_index);
90 DCHECK(operand_type == OperandType::kReg8 || 90 DCHECK(Bytecodes::IsRegisterOperandType(operand_type));
91 operand_type == OperandType::kRegPair8 ||
92 operand_type == OperandType::kRegTriple8 ||
93 operand_type == OperandType::kMaybeReg8 ||
94 operand_type == OperandType::kReg16);
95 uint32_t operand = GetRawOperand(operand_index, operand_type); 91 uint32_t operand = GetRawOperand(operand_index, operand_type);
96 switch (Bytecodes::GetOperandSize(current_bytecode(), operand_index)) { 92 switch (Bytecodes::GetOperandSize(current_bytecode(), operand_index)) {
97 case OperandSize::kByte: 93 case OperandSize::kByte:
98 return Register::FromOperand(static_cast<uint8_t>(operand)); 94 return Register::FromOperand(static_cast<uint8_t>(operand));
99 case OperandSize::kShort: 95 case OperandSize::kShort:
100 return Register::FromWideOperand(static_cast<uint16_t>(operand)); 96 return Register::FromWideOperand(static_cast<uint16_t>(operand));
101 case OperandSize::kNone: 97 case OperandSize::kNone:
102 UNREACHABLE(); 98 UNREACHABLE();
103 } 99 }
104 return Register(); 100 return Register();
(...skipping 18 matching lines...) Expand all
123 return current_offset() + smi->value(); 119 return current_offset() + smi->value();
124 } else { 120 } else {
125 UNREACHABLE(); 121 UNREACHABLE();
126 return kMinInt; 122 return kMinInt;
127 } 123 }
128 } 124 }
129 125
130 } // namespace interpreter 126 } // namespace interpreter
131 } // namespace internal 127 } // namespace internal
132 } // namespace v8 128 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698