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

Side by Side Diff: src/interpreter/interpreter-assembler.cc

Issue 2336203002: [Interpreter] Add an unsigned immediate operand type (Closed)
Patch Set: Address comments Created 4 years, 3 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
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/interpreter-assembler.h" 5 #include "src/interpreter/interpreter-assembler.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 Node* InterpreterAssembler::BytecodeOperandFlag(int operand_index) { 365 Node* InterpreterAssembler::BytecodeOperandFlag(int operand_index) {
366 DCHECK_EQ(OperandType::kFlag8, 366 DCHECK_EQ(OperandType::kFlag8,
367 Bytecodes::GetOperandType(bytecode_, operand_index)); 367 Bytecodes::GetOperandType(bytecode_, operand_index));
368 OperandSize operand_size = 368 OperandSize operand_size =
369 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale()); 369 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale());
370 DCHECK_EQ(operand_size, OperandSize::kByte); 370 DCHECK_EQ(operand_size, OperandSize::kByte);
371 return BytecodeUnsignedOperand(operand_index, operand_size); 371 return BytecodeUnsignedOperand(operand_index, operand_size);
372 } 372 }
373 373
374 Node* InterpreterAssembler::BytecodeOperandUImm(int operand_index) {
375 DCHECK_EQ(OperandType::kUImm,
376 Bytecodes::GetOperandType(bytecode_, operand_index));
377 OperandSize operand_size =
378 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale());
379 return BytecodeUnsignedOperand(operand_index, operand_size);
380 }
381
374 Node* InterpreterAssembler::BytecodeOperandImm(int operand_index) { 382 Node* InterpreterAssembler::BytecodeOperandImm(int operand_index) {
375 DCHECK_EQ(OperandType::kImm, 383 DCHECK_EQ(OperandType::kImm,
376 Bytecodes::GetOperandType(bytecode_, operand_index)); 384 Bytecodes::GetOperandType(bytecode_, operand_index));
377 OperandSize operand_size = 385 OperandSize operand_size =
378 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale()); 386 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale());
379 return BytecodeSignedOperand(operand_index, operand_size); 387 return BytecodeSignedOperand(operand_index, operand_size);
380 } 388 }
381 389
382 Node* InterpreterAssembler::BytecodeOperandIdx(int operand_index) { 390 Node* InterpreterAssembler::BytecodeOperandIdx(int operand_index) {
383 DCHECK(OperandType::kIdx == 391 DCHECK(OperandType::kIdx ==
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 Goto(&loop); 1362 Goto(&loop);
1355 } 1363 }
1356 Bind(&done_loop); 1364 Bind(&done_loop);
1357 1365
1358 return array; 1366 return array;
1359 } 1367 }
1360 1368
1361 } // namespace interpreter 1369 } // namespace interpreter
1362 } // namespace internal 1370 } // namespace internal
1363 } // namespace v8 1371 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/interpreter-assembler.h ('k') | test/cctest/interpreter/bytecode-expectations-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698