Commit 218395eb authored by danno@chromium.org's avatar danno@chromium.org

Fix MIPS build: use stubbed-out TF implementation

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
parent d521ed25
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "src/compiler/code-generator-impl.h" #include "src/compiler/code-generator-impl.h"
#include "src/compiler/linkage.h" #include "src/compiler/linkage.h"
#include "src/compiler/pipeline.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -285,6 +286,57 @@ void CodeGenerator::BuildTranslation(Instruction* instr, ...@@ -285,6 +286,57 @@ void CodeGenerator::BuildTranslation(Instruction* instr,
new (zone()) DeoptimizationState(translation.index()); new (zone()) DeoptimizationState(translation.index());
} }
#if !V8_TURBOFAN_TARGET
void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
UNIMPLEMENTED();
}
void CodeGenerator::AssembleArchBranch(Instruction* instr,
FlagsCondition condition) {
UNIMPLEMENTED();
}
void CodeGenerator::AssembleArchBoolean(Instruction* instr,
FlagsCondition condition) {
UNIMPLEMENTED();
}
void CodeGenerator::AssemblePrologue() { UNIMPLEMENTED(); }
void CodeGenerator::AssembleReturn() { UNIMPLEMENTED(); }
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
UNIMPLEMENTED();
}
void CodeGenerator::AssembleSwap(InstructionOperand* source,
InstructionOperand* destination) {
UNIMPLEMENTED();
}
void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); }
#ifdef DEBUG
bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
int end_pc) {
UNIMPLEMENTED();
return false;
}
#endif
#endif
} // namespace compiler } // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
#elif V8_TARGET_ARCH_X64 #elif V8_TARGET_ARCH_X64
#include "src/compiler/x64/instruction-codes-x64.h" #include "src/compiler/x64/instruction-codes-x64.h"
#else #else
#error "Unsupported target architecture." #define TARGET_ARCH_OPCODE_LIST(V)
#define TARGET_ADDRESSING_MODE_LIST(V)
#endif #endif
#include "src/utils.h" #include "src/utils.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "src/compiler/instruction-selector-impl.h" #include "src/compiler/instruction-selector-impl.h"
#include "src/compiler/node-matchers.h" #include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties-inl.h" #include "src/compiler/node-properties-inl.h"
#include "src/compiler/pipeline.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -587,6 +588,8 @@ void InstructionSelector::VisitNode(Node* node) { ...@@ -587,6 +588,8 @@ void InstructionSelector::VisitNode(Node* node) {
} }
#if V8_TURBOFAN_TARGET
void InstructionSelector::VisitWord32Equal(Node* node) { void InstructionSelector::VisitWord32Equal(Node* node) {
FlagsContinuation cont(kEqual, node); FlagsContinuation cont(kEqual, node);
Int32BinopMatcher m(node); Int32BinopMatcher m(node);
...@@ -660,9 +663,10 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { ...@@ -660,9 +663,10 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) {
VisitFloat64Compare(node, &cont); VisitFloat64Compare(node, &cont);
} }
#endif // V8_TURBOFAN_TARGET
// 32 bit targets do not implement the following instructions. // 32 bit targets do not implement the following instructions.
#if V8_TARGET_ARCH_32_BIT #if V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_TARGET
void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); }
...@@ -712,6 +716,12 @@ void InstructionSelector::VisitConvertInt32ToInt64(Node* node) { ...@@ -712,6 +716,12 @@ void InstructionSelector::VisitConvertInt32ToInt64(Node* node) {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
#endif // V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_TARGET
// 32-bit targets and unsupported architectures need dummy implementations of
// selected 64-bit ops.
#if V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET
void InstructionSelector::VisitWord64Test(Node* node, FlagsContinuation* cont) { void InstructionSelector::VisitWord64Test(Node* node, FlagsContinuation* cont) {
UNIMPLEMENTED(); UNIMPLEMENTED();
...@@ -723,7 +733,7 @@ void InstructionSelector::VisitWord64Compare(Node* node, ...@@ -723,7 +733,7 @@ void InstructionSelector::VisitWord64Compare(Node* node,
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
#endif // V8_TARGET_ARCH_32_BIT #endif // V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET
void InstructionSelector::VisitPhi(Node* node) { void InstructionSelector::VisitPhi(Node* node) {
...@@ -872,6 +882,36 @@ void InstructionSelector::VisitDeoptimization(Node* deopt) { ...@@ -872,6 +882,36 @@ void InstructionSelector::VisitDeoptimization(Node* deopt) {
Emit(kArchDeoptimize | MiscField::encode(deoptimization_id), NULL); Emit(kArchDeoptimize | MiscField::encode(deoptimization_id), NULL);
} }
#if !V8_TURBOFAN_TARGET
#define DECLARE_UNIMPLEMENTED_SELECTOR(x) \
void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); }
MACHINE_OP_LIST(DECLARE_UNIMPLEMENTED_SELECTOR)
#undef DECLARE_UNIMPLEMENTED_SELECTOR
void InstructionSelector::VisitWord32Test(Node* node, FlagsContinuation* cont) {
UNIMPLEMENTED();
}
void InstructionSelector::VisitWord32Compare(Node* node,
FlagsContinuation* cont) {
UNIMPLEMENTED();
}
void InstructionSelector::VisitFloat64Compare(Node* node,
FlagsContinuation* cont) {
UNIMPLEMENTED();
}
void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
BasicBlock* deoptimization) {}
#endif
} // namespace compiler } // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -130,7 +130,7 @@ CallDescriptor* Linkage::GetStubCallDescriptor( ...@@ -130,7 +130,7 @@ CallDescriptor* Linkage::GetStubCallDescriptor(
CallDescriptor* Linkage::GetSimplifiedCDescriptor( CallDescriptor* Linkage::GetSimplifiedCDescriptor(
Zone* zone, int num_params, MachineRepresentation return_type, Zone* zone, int num_params, MachineRepresentation return_type,
MachineRepresentation* param_types) { const MachineRepresentation* param_types) {
UNIMPLEMENTED(); UNIMPLEMENTED();
return NULL; return NULL;
} }
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include "src/arm/lithium-arm.h" // NOLINT #include "src/arm/lithium-arm.h" // NOLINT
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#include "src/mips/lithium-mips.h" // NOLINT #include "src/mips/lithium-mips.h" // NOLINT
#elif V8_TARGET_ARCH_MIPS64
#include "src/mips64/lithium-mips64.h" // NOLINT
#elif V8_TARGET_ARCH_X87 #elif V8_TARGET_ARCH_X87
#include "src/x87/lithium-x87.h" // NOLINT #include "src/x87/lithium-x87.h" // NOLINT
#else #else
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "src/globals.h" // Need the BitCast. #include "src/globals.h" // Need the BitCast.
#include "src/mips/constants-mips.h" #include "src/mips/constants-mips.h"
#include "src/mips/simulator-mips.h" #include "src/mips/simulator-mips.h"
#include "src/ostreams.h"
// Only build the simulator if not compiling for real MIPS hardware. // Only build the simulator if not compiling for real MIPS hardware.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "src/globals.h" // Need the BitCast. #include "src/globals.h" // Need the BitCast.
#include "src/mips64/constants-mips64.h" #include "src/mips64/constants-mips64.h"
#include "src/mips64/simulator-mips64.h" #include "src/mips64/simulator-mips64.h"
#include "src/ostreams.h"
// Only build the simulator if not compiling for real MIPS hardware. // Only build the simulator if not compiling for real MIPS hardware.
#if defined(USE_SIMULATOR) #if defined(USE_SIMULATOR)
......
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
using namespace v8::internal; using namespace v8::internal;
using namespace v8::internal::compiler; using namespace v8::internal::compiler;
#if V8_TURBOFAN_TARGET
typedef RawMachineAssembler::Label MLabel; typedef RawMachineAssembler::Label MLabel;
static Handle<JSFunction> NewFunction(const char* source) { static Handle<JSFunction> NewFunction(const char* source) {
...@@ -329,3 +332,5 @@ TEST(TurboTrivialRuntimeDeoptCodegenAndRun) { ...@@ -329,3 +332,5 @@ TEST(TurboTrivialRuntimeDeoptCodegenAndRun) {
CHECK(!has_pending_exception); CHECK(!has_pending_exception);
CHECK(result->SameValue(Smi::FromInt(42))); CHECK(result->SameValue(Smi::FromInt(42)));
} }
#endif
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
using namespace v8::internal; using namespace v8::internal;
using namespace v8::internal::compiler; using namespace v8::internal::compiler;
#if V8_TURBOFAN_TARGET
TEST(InstructionSelectionReturnZero) { TEST(InstructionSelectionReturnZero) {
InstructionSelectorTester m(InstructionSelectorTester::kInternalMode); InstructionSelectorTester m(InstructionSelectorTester::kInternalMode);
m.Return(m.Int32Constant(0)); m.Return(m.Int32Constant(0));
...@@ -16,3 +18,5 @@ TEST(InstructionSelectionReturnZero) { ...@@ -16,3 +18,5 @@ TEST(InstructionSelectionReturnZero) {
CHECK_EQ(kArchRet, m.code[1]->opcode()); CHECK_EQ(kArchRet, m.code[1]->opcode());
CHECK_EQ(1, static_cast<int>(m.code[1]->InputCount())); CHECK_EQ(1, static_cast<int>(m.code[1]->InputCount()));
} }
#endif
...@@ -30,11 +30,11 @@ TEST(PipelineAdd) { ...@@ -30,11 +30,11 @@ TEST(PipelineAdd) {
CHECK_NE(NULL, info.scope()); CHECK_NE(NULL, info.scope());
Pipeline pipeline(&info); Pipeline pipeline(&info);
Handle<Code> code = pipeline.GenerateCode();
#if V8_TURBOFAN_TARGET #if V8_TURBOFAN_TARGET
Handle<Code> code = pipeline.GenerateCode();
CHECK(Pipeline::SupportedTarget()); CHECK(Pipeline::SupportedTarget());
CHECK(!code.is_null()); CHECK(!code.is_null());
#else #else
USE(code); USE(pipeline);
#endif #endif
} }
...@@ -1695,6 +1695,8 @@ TEST(BuildScheduleSimpleLoopWithCodeMotion) { ...@@ -1695,6 +1695,8 @@ TEST(BuildScheduleSimpleLoopWithCodeMotion) {
} }
#if V8_TURBOFAN_TARGET
// So we can get a real JS function. // So we can get a real JS function.
static Handle<JSFunction> Compile(const char* source) { static Handle<JSFunction> Compile(const char* source) {
Isolate* isolate = CcTest::i_isolate(); Isolate* isolate = CcTest::i_isolate();
...@@ -1826,3 +1828,5 @@ TEST(BuildScheduleTrivialLazyDeoptCall) { ...@@ -1826,3 +1828,5 @@ TEST(BuildScheduleTrivialLazyDeoptCall) {
CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]); CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]);
CHECK_EQ(state_node, deopt_block->nodes_[1]); CHECK_EQ(state_node, deopt_block->nodes_[1]);
} }
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment