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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/constants_mips.h ('k') | runtime/vm/disassembler_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 6
7 #if defined(TARGET_ARCH_MIPS) 7 #if defined(TARGET_ARCH_MIPS)
8 8
9 #if defined(HOST_ARCH_MIPS) 9 #if defined(HOST_ARCH_MIPS)
10 #include <asm/cachectl.h> /* NOLINT */
10 #include <sys/syscall.h> /* NOLINT */ 11 #include <sys/syscall.h> /* NOLINT */
11 #include <unistd.h> /* NOLINT */ 12 #include <unistd.h> /* NOLINT */
12 #endif 13 #endif
13 14
14 #include "vm/cpu.h" 15 #include "vm/cpu.h"
15 16
16 namespace dart { 17 namespace dart {
17 18
18 void CPU::FlushICache(uword start, uword size) { 19 void CPU::FlushICache(uword start, uword size) {
19 UNIMPLEMENTED(); 20 #if defined(HOST_ARCH_MIPS)
21 int res;
22 // See http://www.linux-mips.org/wiki/Cacheflush_Syscall.
23 res = syscall(__NR_cacheflush, start, size, ICACHE);
24 ASSERT(res == 0);
25 #else // defined(HOST_ARCH_MIPS)
26 // When running in simulated mode we do not need to flush the ICache because
27 // we are not running on the actual hardware.
28 #endif // defined(HOST_ARCH_MIPS)
20 } 29 }
21 30
22 31
23 const char* CPU::Id() { 32 const char* CPU::Id() {
24 return "mips"; 33 return "mips";
25 } 34 }
26 35
27 } // namespace dart 36 } // namespace dart
28 37
29 #endif // defined TARGET_ARCH_MIPS 38 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/constants_mips.h ('k') | runtime/vm/disassembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698