OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 void CPU::Setup() { | 40 void CPU::Setup() { |
41 // Nothing to do. | 41 // Nothing to do. |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 void CPU::FlushICache(void* start, size_t size) { | 45 void CPU::FlushICache(void* start, size_t size) { |
46 #if !defined (__arm__) | 46 #if !defined (__arm__) |
47 // Not generating ARM instructions for C-code. This means that we are | 47 // Not generating ARM instructions for C-code. This means that we are |
48 // building an ARM emulator based target. No I$ flushes are necessary. | 48 // building an ARM emulator based target. No I$ flushes are necessary. |
| 49 // None of this code ends up in the snapshot so there are no issues |
| 50 // around whether or not to generate the code when building snapshots. |
49 #else | 51 #else |
50 // Ideally, we would call | 52 // Ideally, we would call |
51 // syscall(__ARM_NR_cacheflush, start, | 53 // syscall(__ARM_NR_cacheflush, start, |
52 // reinterpret_cast<intptr_t>(start) + size, 0); | 54 // reinterpret_cast<intptr_t>(start) + size, 0); |
53 // however, syscall(int, ...) is not supported on all platforms, especially | 55 // however, syscall(int, ...) is not supported on all platforms, especially |
54 // not when using EABI, so we call the __ARM_NR_cacheflush syscall directly. | 56 // not when using EABI, so we call the __ARM_NR_cacheflush syscall directly. |
55 | 57 |
56 register uint32_t beg asm("a1") = reinterpret_cast<uint32_t>(start); | 58 register uint32_t beg asm("a1") = reinterpret_cast<uint32_t>(start); |
57 register uint32_t end asm("a2") = | 59 register uint32_t end asm("a2") = |
58 reinterpret_cast<uint32_t>(start) + size; | 60 reinterpret_cast<uint32_t>(start) + size; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 118 |
117 void CPU::DebugBreak() { | 119 void CPU::DebugBreak() { |
118 #if !defined (__arm__) | 120 #if !defined (__arm__) |
119 UNIMPLEMENTED(); // when building ARM emulator target | 121 UNIMPLEMENTED(); // when building ARM emulator target |
120 #else | 122 #else |
121 asm volatile("bkpt 0"); | 123 asm volatile("bkpt 0"); |
122 #endif | 124 #endif |
123 } | 125 } |
124 | 126 |
125 } } // namespace v8::internal | 127 } } // namespace v8::internal |
OLD | NEW |