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

Side by Side Diff: test/unittests/compiler/interpreter-assembler-unittest.cc

Issue 1595103006: [Interpreter] Preparation for wide registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. 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
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 "test/unittests/compiler/interpreter-assembler-unittest.h" 5 #include "test/unittests/compiler/interpreter-assembler-unittest.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/interface-descriptors.h" 10 #include "src/interface-descriptors.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 331 }
332 332
333 333
334 TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) { 334 TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) {
335 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { 335 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
336 InterpreterAssemblerForTest m(this, bytecode); 336 InterpreterAssemblerForTest m(this, bytecode);
337 int number_of_operands = interpreter::Bytecodes::NumberOfOperands(bytecode); 337 int number_of_operands = interpreter::Bytecodes::NumberOfOperands(bytecode);
338 for (int i = 0; i < number_of_operands; i++) { 338 for (int i = 0; i < number_of_operands; i++) {
339 int offset = interpreter::Bytecodes::GetOperandOffset(bytecode, i); 339 int offset = interpreter::Bytecodes::GetOperandOffset(bytecode, i);
340 switch (interpreter::Bytecodes::GetOperandType(bytecode, i)) { 340 switch (interpreter::Bytecodes::GetOperandType(bytecode, i)) {
341 case interpreter::OperandType::kCount8: 341 case interpreter::OperandType::kRegCount8:
342 EXPECT_THAT(m.BytecodeOperandCount(i), m.IsBytecodeOperand(offset)); 342 EXPECT_THAT(m.BytecodeOperandCount(i), m.IsBytecodeOperand(offset));
343 break; 343 break;
344 case interpreter::OperandType::kIdx8: 344 case interpreter::OperandType::kIdx8:
345 EXPECT_THAT(m.BytecodeOperandIdx(i), m.IsBytecodeOperand(offset)); 345 EXPECT_THAT(m.BytecodeOperandIdx(i), m.IsBytecodeOperand(offset));
346 break; 346 break;
347 case interpreter::OperandType::kImm8: 347 case interpreter::OperandType::kImm8:
348 EXPECT_THAT(m.BytecodeOperandImm(i), 348 EXPECT_THAT(m.BytecodeOperandImm(i),
349 m.IsBytecodeOperandSignExtended(offset)); 349 m.IsBytecodeOperandSignExtended(offset));
350 break; 350 break;
351 case interpreter::OperandType::kMaybeReg8: 351 case interpreter::OperandType::kMaybeReg8:
352 case interpreter::OperandType::kReg8: 352 case interpreter::OperandType::kReg8:
353 case interpreter::OperandType::kRegPair8: 353 case interpreter::OperandType::kRegPair8:
354 case interpreter::OperandType::kRegTriple8: 354 case interpreter::OperandType::kRegTriple8:
355 EXPECT_THAT(m.BytecodeOperandReg(i), 355 EXPECT_THAT(m.BytecodeOperandReg(i),
356 m.IsBytecodeOperandSignExtended(offset)); 356 m.IsBytecodeOperandSignExtended(offset));
357 break; 357 break;
358 case interpreter::OperandType::kCount16: 358 case interpreter::OperandType::kRegCount16:
359 EXPECT_THAT(m.BytecodeOperandCount(i), 359 EXPECT_THAT(m.BytecodeOperandCount(i),
360 m.IsBytecodeOperandShort(offset)); 360 m.IsBytecodeOperandShort(offset));
361 break; 361 break;
362 case interpreter::OperandType::kIdx16: 362 case interpreter::OperandType::kIdx16:
363 EXPECT_THAT(m.BytecodeOperandIdx(i), 363 EXPECT_THAT(m.BytecodeOperandIdx(i),
364 m.IsBytecodeOperandShort(offset)); 364 m.IsBytecodeOperandShort(offset));
365 break; 365 break;
366 case interpreter::OperandType::kMaybeReg16:
366 case interpreter::OperandType::kReg16: 367 case interpreter::OperandType::kReg16:
368 case interpreter::OperandType::kRegPair16:
369 case interpreter::OperandType::kRegTriple16:
367 EXPECT_THAT(m.BytecodeOperandReg(i), 370 EXPECT_THAT(m.BytecodeOperandReg(i),
368 m.IsBytecodeOperandShortSignExtended(offset)); 371 m.IsBytecodeOperandShortSignExtended(offset));
369 break; 372 break;
370 case interpreter::OperandType::kNone: 373 case interpreter::OperandType::kNone:
371 UNREACHABLE(); 374 UNREACHABLE();
372 break; 375 break;
373 } 376 }
374 } 377 }
375 } 378 }
376 } 379 }
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 feedback_vector, 682 feedback_vector,
680 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher, 683 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher,
681 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - 684 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset -
682 kHeapObjectTag))); 685 kHeapObjectTag)));
683 } 686 }
684 } 687 }
685 688
686 } // namespace compiler 689 } // namespace compiler
687 } // namespace internal 690 } // namespace internal
688 } // namespace v8 691 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/test-interpreter.cc ('k') | test/unittests/interpreter/bytecode-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698