Chromium Code Reviews| 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 |