OLD | NEW |
---|---|
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64) | 7 #if defined(TARGET_ARCH_ARM64) |
8 | 8 |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/cpuinfo.h" | 10 #include "vm/cpuinfo.h" |
11 #include "vm/simulator.h" | 11 #include "vm/simulator.h" |
12 | 12 |
13 #if !defined(USING_SIMULATOR) | 13 #if !defined(USING_SIMULATOR) |
14 #include <sys/syscall.h> /* NOLINT */ | 14 #include <sys/syscall.h> /* NOLINT */ |
15 #include <unistd.h> /* NOLINT */ | 15 #include <unistd.h> /* NOLINT */ |
16 #endif | 16 #endif |
17 | 17 |
18 namespace dart { | 18 namespace dart { |
19 | 19 |
20 void CPU::FlushICache(uword start, uword size) { | 20 void CPU::FlushICache(uword start, uword size) { |
rmacnak
2015/10/21 23:06:18
#if TARGET_OS_IOS
// Precompilation never patche
Chinmay
2015/10/22 00:13:17
ack
| |
21 #if !defined(USING_SIMULATOR) | 21 #if !defined(USING_SIMULATOR) && !TARGET_OS_IOS |
22 // Nothing to do. Flushing no instructions. | 22 // Nothing to do. Flushing no instructions. |
23 if (size == 0) { | 23 if (size == 0) { |
24 return; | 24 return; |
25 } | 25 } |
26 | 26 |
27 // ARM recommends using the gcc intrinsic __clear_cache on Linux and Android. | 27 // ARM recommends using the gcc intrinsic __clear_cache on Linux and Android. |
28 // blogs.arm.com/software-enablement/141-caches-and-self-modifying-code/ | 28 // blogs.arm.com/software-enablement/141-caches-and-self-modifying-code/ |
29 #if defined(__linux__) || defined(ANDROID) | 29 #if defined(__linux__) || defined(ANDROID) |
30 extern void __clear_cache(char*, char*); | 30 extern void __clear_cache(char*, char*); |
31 char* beg = reinterpret_cast<char*>(start); | 31 char* beg = reinterpret_cast<char*>(start); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 ASSERT(hardware_ != NULL); | 94 ASSERT(hardware_ != NULL); |
95 free(const_cast<char*>(hardware_)); | 95 free(const_cast<char*>(hardware_)); |
96 hardware_ = NULL; | 96 hardware_ = NULL; |
97 CpuInfo::Cleanup(); | 97 CpuInfo::Cleanup(); |
98 } | 98 } |
99 #endif // !defined(USING_SIMULATOR) | 99 #endif // !defined(USING_SIMULATOR) |
100 | 100 |
101 } // namespace dart | 101 } // namespace dart |
102 | 102 |
103 #endif // defined TARGET_ARCH_ARM64 | 103 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |