Commit 70e7a119 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Cleanup V8_TURBOFAN_TARGET definition.

Move to globals.h so we do no longer skip any number of
tests. Introduce V8_TURBOFAN_BACKEND, which is 1 if we
actually have a backend and want to compile it, but don't
run the tests.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/444503003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 77838cf5
...@@ -9,8 +9,6 @@ namespace v8 { ...@@ -9,8 +9,6 @@ namespace v8 {
namespace internal { namespace internal {
namespace compiler { namespace compiler {
#if V8_TURBOFAN_TARGET
enum ImmediateMode { enum ImmediateMode {
kArithimeticImm, // 12 bit unsigned immediate shifted left 0 or 12 bits kArithimeticImm, // 12 bit unsigned immediate shifted left 0 or 12 bits
kShift32Imm, // 0 - 31 kShift32Imm, // 0 - 31
...@@ -664,8 +662,6 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, ...@@ -664,8 +662,6 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
} }
} }
#endif // V8_TURBOFAN_TARGET
} // namespace compiler } // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -287,7 +287,8 @@ void CodeGenerator::BuildTranslation(Instruction* instr, ...@@ -287,7 +287,8 @@ void CodeGenerator::BuildTranslation(Instruction* instr,
} }
#if !V8_TURBOFAN_TARGET #if !V8_TURBOFAN_BACKEND
void CodeGenerator::AssembleArchInstruction(Instruction* instr) { void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
...@@ -334,7 +335,7 @@ bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc, ...@@ -334,7 +335,7 @@ bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
} }
#endif #endif
#endif #endif // !V8_TURBOFAN_BACKEND
} // namespace compiler } // namespace compiler
......
...@@ -604,7 +604,7 @@ void InstructionSelector::VisitNode(Node* node) { ...@@ -604,7 +604,7 @@ void InstructionSelector::VisitNode(Node* node) {
} }
#if V8_TURBOFAN_TARGET #if V8_TURBOFAN_BACKEND
void InstructionSelector::VisitWord32Equal(Node* node) { void InstructionSelector::VisitWord32Equal(Node* node) {
FlagsContinuation cont(kEqual, node); FlagsContinuation cont(kEqual, node);
...@@ -699,10 +699,10 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { ...@@ -699,10 +699,10 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) {
VisitFloat64Compare(node, &cont); VisitFloat64Compare(node, &cont);
} }
#endif // V8_TURBOFAN_TARGET #endif // V8_TURBOFAN_BACKEND
// 32 bit targets do not implement the following instructions. // 32 bit targets do not implement the following instructions.
#if V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_TARGET #if V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_BACKEND
void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); }
...@@ -752,12 +752,12 @@ void InstructionSelector::VisitConvertInt32ToInt64(Node* node) { ...@@ -752,12 +752,12 @@ void InstructionSelector::VisitConvertInt32ToInt64(Node* node) {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
#endif // V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_TARGET #endif // V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_BACKEND
// 32-bit targets and unsupported architectures need dummy implementations of // 32-bit targets and unsupported architectures need dummy implementations of
// selected 64-bit ops. // selected 64-bit ops.
#if V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET #if V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_BACKEND
void InstructionSelector::VisitWord64Test(Node* node, FlagsContinuation* cont) { void InstructionSelector::VisitWord64Test(Node* node, FlagsContinuation* cont) {
UNIMPLEMENTED(); UNIMPLEMENTED();
...@@ -769,7 +769,7 @@ void InstructionSelector::VisitWord64Compare(Node* node, ...@@ -769,7 +769,7 @@ void InstructionSelector::VisitWord64Compare(Node* node,
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
#endif // V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET #endif // V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_BACKEND
void InstructionSelector::VisitParameter(Node* node) { void InstructionSelector::VisitParameter(Node* node) {
...@@ -963,7 +963,7 @@ void InstructionSelector::VisitDeoptimization(Node* deopt) { ...@@ -963,7 +963,7 @@ void InstructionSelector::VisitDeoptimization(Node* deopt) {
} }
#if !V8_TURBOFAN_TARGET #if !V8_TURBOFAN_BACKEND
#define DECLARE_UNIMPLEMENTED_SELECTOR(x) \ #define DECLARE_UNIMPLEMENTED_SELECTOR(x) \
void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); }
...@@ -1003,7 +1003,7 @@ void InstructionSelector::VisitFloat64Compare(Node* node, ...@@ -1003,7 +1003,7 @@ void InstructionSelector::VisitFloat64Compare(Node* node,
void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
BasicBlock* deoptimization) {} BasicBlock* deoptimization) {}
#endif // !V8_TURBOFAN_TARGET #endif // !V8_TURBOFAN_BACKEND
} // namespace compiler } // namespace compiler
} // namespace internal } // namespace internal
......
...@@ -12,16 +12,6 @@ ...@@ -12,16 +12,6 @@
// Note: TODO(turbofan) implies a performance improvement opportunity, // Note: TODO(turbofan) implies a performance improvement opportunity,
// and TODO(name) implies an incomplete implementation // and TODO(name) implies an incomplete implementation
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM
#ifndef _WIN64
#define V8_TURBOFAN_TARGET 1
#else
#define V8_TURBOFAN_TARGET 0
#endif
#else
#define V8_TURBOFAN_TARGET 0
#endif
namespace v8 { namespace v8 {
namespace internal { namespace internal {
namespace compiler { namespace compiler {
...@@ -49,6 +39,7 @@ class Pipeline { ...@@ -49,6 +39,7 @@ class Pipeline {
Zone* zone() { return info_->zone(); } Zone* zone() { return info_->zone(); }
Isolate* isolate() { return info_->isolate(); } Isolate* isolate() { return info_->isolate(); }
static inline bool SupportedBackend() { return V8_TURBOFAN_BACKEND != 0; }
static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; } static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; }
static inline bool VerifyGraphs() { static inline bool VerifyGraphs() {
......
...@@ -25,6 +25,19 @@ ...@@ -25,6 +25,19 @@
# define V8_INFINITY INFINITY # define V8_INFINITY INFINITY
#endif #endif
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM || \
V8_TARGET_ARCH_ARM64
#define V8_TURBOFAN_BACKEND 1
#else
#define V8_TURBOFAN_BACKEND 0
#endif
#if V8_TURBOFAN_BACKEND && !V8_TARGET_ARCH_ARM64 && \
!(V8_OS_WIN && V8_TARGET_ARCH_X64)
#define V8_TURBOFAN_TARGET 1
#else
#define V8_TURBOFAN_TARGET 0
#endif
namespace v8 { namespace v8 {
namespace base { namespace base {
......
...@@ -1763,7 +1763,7 @@ TEST(BuildScheduleTrivialLazyDeoptCall) { ...@@ -1763,7 +1763,7 @@ TEST(BuildScheduleTrivialLazyDeoptCall) {
Node* undef_node = graph.NewNode(common_builder.HeapConstant(undef_constant)); Node* undef_node = graph.NewNode(common_builder.HeapConstant(undef_constant));
Node* start_node = graph.NewNode(common_builder.Start()); Node* start_node = graph.NewNode(common_builder.Start(0));
CallDescriptor* descriptor = linkage.GetJSCallDescriptor(0); CallDescriptor* descriptor = linkage.GetJSCallDescriptor(0);
Node* call_node = graph.NewNode(common_builder.Call(descriptor), Node* call_node = graph.NewNode(common_builder.Call(descriptor),
......
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