#include "src/compiler/code-generator-impl.h"
#include "src/compiler/linkage.h"
+#include "src/compiler/pipeline.h"
namespace v8 {
namespace internal {
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 internal
} // namespace v8
#elif V8_TARGET_ARCH_X64
#include "src/compiler/x64/instruction-codes-x64.h"
#else
-#error "Unsupported target architecture."
+#define TARGET_ARCH_OPCODE_LIST(V)
+#define TARGET_ADDRESSING_MODE_LIST(V)
#endif
#include "src/utils.h"
#include "src/compiler/instruction-selector-impl.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties-inl.h"
+#include "src/compiler/pipeline.h"
namespace v8 {
namespace internal {
}
+#if V8_TURBOFAN_TARGET
+
void InstructionSelector::VisitWord32Equal(Node* node) {
FlagsContinuation cont(kEqual, node);
Int32BinopMatcher m(node);
VisitFloat64Compare(node, &cont);
}
+#endif // V8_TURBOFAN_TARGET
// 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(); }
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) {
UNIMPLEMENTED();
UNIMPLEMENTED();
}
-#endif // V8_TARGET_ARCH_32_BIT
+#endif // V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET
void InstructionSelector::VisitPhi(Node* node) {
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 internal
} // namespace v8
CallDescriptor* Linkage::GetSimplifiedCDescriptor(
Zone* zone, int num_params, MachineRepresentation return_type,
- MachineRepresentation* param_types) {
+ const MachineRepresentation* param_types) {
UNIMPLEMENTED();
return NULL;
}
#include "src/arm/lithium-arm.h" // NOLINT
#elif V8_TARGET_ARCH_MIPS
#include "src/mips/lithium-mips.h" // NOLINT
+#elif V8_TARGET_ARCH_MIPS64
+#include "src/mips64/lithium-mips64.h" // NOLINT
#elif V8_TARGET_ARCH_X87
#include "src/x87/lithium-x87.h" // NOLINT
#else
#include "src/globals.h" // Need the BitCast.
#include "src/mips/constants-mips.h"
#include "src/mips/simulator-mips.h"
+#include "src/ostreams.h"
// Only build the simulator if not compiling for real MIPS hardware.
#include "src/globals.h" // Need the BitCast.
#include "src/mips64/constants-mips64.h"
#include "src/mips64/simulator-mips64.h"
-
+#include "src/ostreams.h"
// Only build the simulator if not compiling for real MIPS hardware.
#if defined(USE_SIMULATOR)
using namespace v8::internal;
using namespace v8::internal::compiler;
+
+#if V8_TURBOFAN_TARGET
+
typedef RawMachineAssembler::Label MLabel;
static Handle<JSFunction> NewFunction(const char* source) {
CHECK(!has_pending_exception);
CHECK(result->SameValue(Smi::FromInt(42)));
}
+
+#endif
using namespace v8::internal;
using namespace v8::internal::compiler;
+#if V8_TURBOFAN_TARGET
+
TEST(InstructionSelectionReturnZero) {
InstructionSelectorTester m(InstructionSelectorTester::kInternalMode);
m.Return(m.Int32Constant(0));
CHECK_EQ(kArchRet, m.code[1]->opcode());
CHECK_EQ(1, static_cast<int>(m.code[1]->InputCount()));
}
+
+#endif
CHECK_NE(NULL, info.scope());
Pipeline pipeline(&info);
- Handle<Code> code = pipeline.GenerateCode();
#if V8_TURBOFAN_TARGET
+ Handle<Code> code = pipeline.GenerateCode();
CHECK(Pipeline::SupportedTarget());
CHECK(!code.is_null());
#else
- USE(code);
+ USE(pipeline);
#endif
}
}
+#if V8_TURBOFAN_TARGET
+
// So we can get a real JS function.
static Handle<JSFunction> Compile(const char* source) {
Isolate* isolate = CcTest::i_isolate();
CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]);
CHECK_EQ(state_node, deopt_block->nodes_[1]);
}
+
+#endif