Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: src/mips/cpu-mips.cc

Issue 6709022: Re-establish mips basic infrastructure. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/mips/cpu-mips.cc
diff --git a/src/mips/cpu-mips.cc b/src/mips/cpu-mips.cc
index 659fc01ce0deb7da53fe780130e842a53a8cba15..dee969b0b31d5be01103c261705ca987e38ff79a 100644
--- a/src/mips/cpu-mips.cc
+++ b/src/mips/cpu-mips.cc
@@ -39,16 +39,25 @@
#if defined(V8_TARGET_ARCH_MIPS)
#include "cpu.h"
+#include "macro-assembler.h"
+
+#include "simulator.h" // for cache flushing.
Søren Thygesen Gjesse 2011/03/21 16:05:19 Please start comment with uppercase letter.
Paul Lind 2011/03/23 01:55:43 Done.
namespace v8 {
namespace internal {
+
void CPU::Setup() {
- // Nothing to do.
+ CpuFeatures::Probe(true);
+ // For now just disable lithium/crankshaft.
+ if (true || !CpuFeatures::IsSupported(FPU) || Serializer::enabled()) {
Søren Thygesen Gjesse 2011/03/21 16:05:19 Please remove the true here. Disabling crankshaft
Paul Lind 2011/03/23 01:55:43 Done.
+ V8::DisableCrankshaft();
+ }
}
+
void CPU::FlushICache(void* start, size_t size) {
-#ifdef __mips
+#if !defined (USE_SIMULATOR)
int res;
// See http://www.linux-mips.org/wiki/Cacheflush_Syscall
@@ -58,6 +67,13 @@ void CPU::FlushICache(void* start, size_t size) {
V8_Fatal(__FILE__, __LINE__, "Failed to flush the instruction cache");
}
+#else // simulator mode
Søren Thygesen Gjesse 2011/03/21 16:05:19 #else comment should match the #if
Paul Lind 2011/03/23 01:55:43 Done.
+ // Not generating mips instructions for C-code. This means that we are
+ // building a mips emulator based target. We should notify the simulator
+ // that the Icache was flushed.
+ // None of this code ends up in the snapshot so there are no issues
+ // around whether or not to generate the code when building snapshots.
+ Simulator::FlushICache(start, size);
#endif // #ifdef __mips
Søren Thygesen Gjesse 2011/03/21 16:05:19 #endif comment should match the #if
Paul Lind 2011/03/23 01:55:43 Done.
}
@@ -68,6 +84,7 @@ void CPU::DebugBreak() {
#endif // #ifdef __mips
}
+
} } // namespace v8::internal
#endif // V8_TARGET_ARCH_MIPS

Powered by Google App Engine
This is Rietveld 408576698