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

Unified Diff: test/cctest/compiler/test-instruction-selector-ia32.cc

Issue 469743002: [turbofan] Refactor the InstructionSelector tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM64 Created 6 years, 4 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 | « test/cctest/compiler/test-instruction-selector-arm64.cc ('k') | test/compiler-unittests/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-instruction-selector-ia32.cc
diff --git a/test/cctest/compiler/test-instruction-selector-ia32.cc b/test/cctest/compiler/test-instruction-selector-ia32.cc
deleted file mode 100644
index b6509584e068acc7ce888fbb356391c321820aaf..0000000000000000000000000000000000000000
--- a/test/cctest/compiler/test-instruction-selector-ia32.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "test/cctest/compiler/instruction-selector-tester.h"
-#include "test/cctest/compiler/value-helper.h"
-
-using namespace v8::internal;
-using namespace v8::internal::compiler;
-
-TEST(InstructionSelectorInt32AddP) {
- InstructionSelectorTester m;
- m.Return(m.Int32Add(m.Parameter(0), m.Parameter(1)));
- m.SelectInstructions();
- CHECK_EQ(1, m.code.size());
- CHECK_EQ(kIA32Add, m.code[0]->arch_opcode());
-}
-
-
-TEST(InstructionSelectorInt32AddImm) {
- FOR_INT32_INPUTS(i) {
- int32_t imm = *i;
- {
- InstructionSelectorTester m;
- m.Return(m.Int32Add(m.Parameter(0), m.Int32Constant(imm)));
- m.SelectInstructions();
- CHECK_EQ(1, m.code.size());
- CHECK_EQ(kIA32Add, m.code[0]->arch_opcode());
- CHECK_EQ(2, m.code[0]->InputCount());
- CHECK_EQ(imm, m.ToInt32(m.code[0]->InputAt(1)));
- }
- {
- InstructionSelectorTester m;
- m.Return(m.Int32Add(m.Int32Constant(imm), m.Parameter(0)));
- m.SelectInstructions();
- CHECK_EQ(1, m.code.size());
- CHECK_EQ(kIA32Add, m.code[0]->arch_opcode());
- CHECK_EQ(2, m.code[0]->InputCount());
- CHECK_EQ(imm, m.ToInt32(m.code[0]->InputAt(1)));
- }
- }
-}
-
-
-TEST(InstructionSelectorInt32SubP) {
- InstructionSelectorTester m;
- m.Return(m.Int32Sub(m.Parameter(0), m.Parameter(1)));
- m.SelectInstructions();
- CHECK_EQ(1, m.code.size());
- CHECK_EQ(kIA32Sub, m.code[0]->arch_opcode());
- CHECK_EQ(1, m.code[0]->OutputCount());
-}
-
-
-TEST(InstructionSelectorInt32SubImm) {
- FOR_INT32_INPUTS(i) {
- int32_t imm = *i;
- InstructionSelectorTester m;
- m.Return(m.Int32Sub(m.Parameter(0), m.Int32Constant(imm)));
- m.SelectInstructions();
- CHECK_EQ(1, m.code.size());
- CHECK_EQ(kIA32Sub, m.code[0]->arch_opcode());
- CHECK_EQ(2, m.code[0]->InputCount());
- CHECK_EQ(imm, m.ToInt32(m.code[0]->InputAt(1)));
- }
-}
« no previous file with comments | « test/cctest/compiler/test-instruction-selector-arm64.cc ('k') | test/compiler-unittests/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698