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

Side by Side Diff: src/mips/cpu-mips.cc

Issue 549079: Support for MIPS in architecture independent files.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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
OLDNEW
(Empty)
1 // FROM ARM code below
2 // CPU specific code for arm independent of OS goes here.
3
4 #include "v8.h"
5 #include "cpu.h"
6
7 #include <sys/syscall.h>
8 #include <unistd.h>
9
10 #ifdef __mips
11 #include <asm/cachectl.h>
12 #endif // #ifdef __mips
13
14 namespace v8 {
15 namespace internal {
16
17 void CPU::Setup() {
18 // Nothing to do.
19 }
20
21 // TODO : Implement void CPU::FlushICache(void* start, size_t size) {
22 void CPU::FlushICache(void* start, size_t size) {
23 #ifdef __mips
24 int res;
25
26 // int cacheflush(char *addr, int nbytes, int cache);
27 // See http://www.linux-mips.org/wiki/Cacheflush_Syscall
28 res = syscall(__NR_cacheflush, start, size, ICACHE);
29
30 if(res)
31 V8_Fatal(__FILE__, __LINE__, "Failed to flush the instruction cache");
32
33 #endif // #ifdef __mips
34 }
35
36
37 void CPU::DebugBreak() {
38 #ifdef __mips
39 asm volatile("break");
40 #endif // #ifdef __mips
41 }
42
43 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698