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

Unified Diff: runtime/vm/cpu_mips.cc

Issue 13884017: Adds support for UseDartApi vm test on MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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: runtime/vm/cpu_mips.cc
===================================================================
--- runtime/vm/cpu_mips.cc (revision 21386)
+++ runtime/vm/cpu_mips.cc (working copy)
@@ -7,6 +7,7 @@
#if defined(TARGET_ARCH_MIPS)
#if defined(HOST_ARCH_MIPS)
+#include <asm/cachectl.h> /* NOLINT */
#include <sys/syscall.h> /* NOLINT */
#include <unistd.h> /* NOLINT */
#endif
@@ -16,7 +17,15 @@
namespace dart {
void CPU::FlushICache(uword start, uword size) {
- UNIMPLEMENTED();
+#if defined(HOST_ARCH_MIPS)
+ int res;
+ // See http://www.linux-mips.org/wiki/Cacheflush_Syscall.
+ res = syscall(__NR_cacheflush, start, size, ICACHE);
+ ASSERT(res == 0);
+#else // defined(HOST_ARCH_MIPS)
+ // When running in simulated mode we do not need to flush the ICache because
+ // we are not running on the actual hardware.
+#endif // defined(HOST_ARCH_MIPS)
}

Powered by Google App Engine
This is Rietveld 408576698