Revision: 22753
Author:   [email protected]
Date:     Thu Jul 31 11:59:49 2014 UTC
Log:      Fix MIPS build: use stubbed-out TF implementation

[email protected]

Review URL: https://codereview.chromium.org/426833005
http://code.google.com/p/v8/source/detail?r=22753

Modified:
 /branches/bleeding_edge/src/compiler/code-generator.cc
 /branches/bleeding_edge/src/compiler/instruction-codes.h
 /branches/bleeding_edge/src/compiler/instruction-selector.cc
 /branches/bleeding_edge/src/compiler/linkage.cc
 /branches/bleeding_edge/src/lithium-inl.h
 /branches/bleeding_edge/src/mips/simulator-mips.cc
 /branches/bleeding_edge/src/mips64/simulator-mips64.cc
 /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc
 /branches/bleeding_edge/test/cctest/compiler/test-instruction-selector.cc
 /branches/bleeding_edge/test/cctest/compiler/test-pipeline.cc
 /branches/bleeding_edge/test/cctest/compiler/test-scheduler.cc

=======================================
--- /branches/bleeding_edge/src/compiler/code-generator.cc Wed Jul 30 16:21:36 2014 UTC +++ /branches/bleeding_edge/src/compiler/code-generator.cc Thu Jul 31 11:59:49 2014 UTC
@@ -6,6 +6,7 @@

 #include "src/compiler/code-generator-impl.h"
 #include "src/compiler/linkage.h"
+#include "src/compiler/pipeline.h"

 namespace v8 {
 namespace internal {
@@ -284,6 +285,57 @@
   deoptimization_states_[deoptimization_id] =
       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
=======================================
--- /branches/bleeding_edge/src/compiler/instruction-codes.h Wed Jul 30 13:54:45 2014 UTC +++ /branches/bleeding_edge/src/compiler/instruction-codes.h Thu Jul 31 11:59:49 2014 UTC
@@ -14,7 +14,8 @@
 #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"

=======================================
--- /branches/bleeding_edge/src/compiler/instruction-selector.cc Thu Jul 31 11:45:22 2014 UTC +++ /branches/bleeding_edge/src/compiler/instruction-selector.cc Thu Jul 31 11:59:49 2014 UTC
@@ -7,6 +7,7 @@
 #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 {
@@ -586,6 +587,8 @@
   }
 }

+
+#if V8_TURBOFAN_TARGET

 void InstructionSelector::VisitWord32Equal(Node* node) {
   FlagsContinuation cont(kEqual, node);
@@ -660,9 +663,10 @@
   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(); }

@@ -712,6 +716,12 @@
   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();
@@ -723,7 +733,7 @@
   UNIMPLEMENTED();
 }

-#endif  // V8_TARGET_ARCH_32_BIT
+#endif  // V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET


 void InstructionSelector::VisitPhi(Node* node) {
@@ -871,6 +881,36 @@
   int deoptimization_id = sequence()->AddDeoptimizationEntry(descriptor);
   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
=======================================
--- /branches/bleeding_edge/src/compiler/linkage.cc Wed Jul 30 13:54:45 2014 UTC +++ /branches/bleeding_edge/src/compiler/linkage.cc Thu Jul 31 11:59:49 2014 UTC
@@ -130,7 +130,7 @@

 CallDescriptor* Linkage::GetSimplifiedCDescriptor(
     Zone* zone, int num_params, MachineRepresentation return_type,
-    MachineRepresentation* param_types) {
+    const MachineRepresentation* param_types) {
   UNIMPLEMENTED();
   return NULL;
 }
=======================================
--- /branches/bleeding_edge/src/lithium-inl.h   Wed Jul 30 13:54:45 2014 UTC
+++ /branches/bleeding_edge/src/lithium-inl.h   Thu Jul 31 11:59:49 2014 UTC
@@ -17,6 +17,8 @@
 #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
=======================================
--- /branches/bleeding_edge/src/mips/simulator-mips.cc Mon Jul 7 16:01:09 2014 UTC +++ /branches/bleeding_edge/src/mips/simulator-mips.cc Thu Jul 31 11:59:49 2014 UTC
@@ -16,6 +16,7 @@
 #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.
=======================================
--- /branches/bleeding_edge/src/mips64/simulator-mips64.cc Tue Jul 29 18:02:26 2014 UTC +++ /branches/bleeding_edge/src/mips64/simulator-mips64.cc Thu Jul 31 11:59:49 2014 UTC
@@ -16,7 +16,7 @@
 #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)
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Wed Jul 30 13:54:45 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Thu Jul 31 11:59:49 2014 UTC
@@ -25,6 +25,9 @@
 using namespace v8::internal;
 using namespace v8::internal::compiler;

+
+#if V8_TURBOFAN_TARGET
+
 typedef RawMachineAssembler::Label MLabel;

 static Handle<JSFunction> NewFunction(const char* source) {
@@ -329,3 +332,5 @@
   CHECK(!has_pending_exception);
   CHECK(result->SameValue(Smi::FromInt(42)));
 }
+
+#endif
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-instruction-selector.cc Wed Jul 30 16:21:36 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-instruction-selector.cc Thu Jul 31 11:59:49 2014 UTC
@@ -7,6 +7,8 @@
 using namespace v8::internal;
 using namespace v8::internal::compiler;

+#if V8_TURBOFAN_TARGET
+
 TEST(InstructionSelectionReturnZero) {
   InstructionSelectorTester m(InstructionSelectorTester::kInternalMode);
   m.Return(m.Int32Constant(0));
@@ -16,3 +18,5 @@
   CHECK_EQ(kArchRet, m.code[1]->opcode());
   CHECK_EQ(1, static_cast<int>(m.code[1]->InputCount()));
 }
+
+#endif
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-pipeline.cc Wed Jul 30 13:54:45 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-pipeline.cc Thu Jul 31 11:59:49 2014 UTC
@@ -30,11 +30,11 @@
   CHECK_NE(NULL, info.scope());

   Pipeline pipeline(&info);
+#if V8_TURBOFAN_TARGET
   Handle<Code> code = pipeline.GenerateCode();
-#if V8_TURBOFAN_TARGET
   CHECK(Pipeline::SupportedTarget());
   CHECK(!code.is_null());
 #else
-  USE(code);
+  USE(pipeline);
 #endif
 }
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-scheduler.cc Thu Jul 31 10:17:25 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-scheduler.cc Thu Jul 31 11:59:49 2014 UTC
@@ -1695,6 +1695,8 @@
 }


+#if V8_TURBOFAN_TARGET
+
 // So we can get a real JS function.
 static Handle<JSFunction> Compile(const char* source) {
   Isolate* isolate = CcTest::i_isolate();
@@ -1826,3 +1828,5 @@
   CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]);
   CHECK_EQ(state_node, deopt_block->nodes_[1]);
 }
+
+#endif

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to