218395ebaa
R=titzer@chromium.org Review URL: https://codereview.chromium.org/426833005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
23 lines
698 B
C++
23 lines
698 B
C++
// 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"
|
|
|
|
using namespace v8::internal;
|
|
using namespace v8::internal::compiler;
|
|
|
|
#if V8_TURBOFAN_TARGET
|
|
|
|
TEST(InstructionSelectionReturnZero) {
|
|
InstructionSelectorTester m(InstructionSelectorTester::kInternalMode);
|
|
m.Return(m.Int32Constant(0));
|
|
m.SelectInstructions();
|
|
CHECK_EQ(2, static_cast<int>(m.code.size()));
|
|
CHECK_EQ(kArchNop, m.code[0]->opcode());
|
|
CHECK_EQ(kArchRet, m.code[1]->opcode());
|
|
CHECK_EQ(1, static_cast<int>(m.code[1]->InputCount()));
|
|
}
|
|
|
|
#endif
|