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

Side by Side Diff: runtime/vm/cpu_arm64.cc

Issue 2750843003: Rename TARGET_OS_* to HOST_OS_*. (Closed)
Patch Set: DEPS Created 3 years, 9 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
« no previous file with comments | « runtime/vm/cpu_arm.cc ('k') | runtime/vm/cpuid.h » ('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) 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 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/cpu_arm64.h" 9 #include "vm/cpu_arm64.h"
10 10
11 #include "vm/cpuinfo.h" 11 #include "vm/cpuinfo.h"
12 #include "vm/simulator.h" 12 #include "vm/simulator.h"
13 13
14 #if !defined(USING_SIMULATOR) 14 #if !defined(USING_SIMULATOR)
15 #include <sys/syscall.h> /* NOLINT */ 15 #include <sys/syscall.h> /* NOLINT */
16 #include <unistd.h> /* NOLINT */ 16 #include <unistd.h> /* NOLINT */
17 #endif 17 #endif
18 18
19 namespace dart { 19 namespace dart {
20 20
21 void CPU::FlushICache(uword start, uword size) { 21 void CPU::FlushICache(uword start, uword size) {
22 #if TARGET_OS_IOS 22 #if HOST_OS_IOS
23 // Precompilation never patches code so there should be no I cache flushes. 23 // Precompilation never patches code so there should be no I cache flushes.
24 UNREACHABLE(); 24 UNREACHABLE();
25 #endif 25 #endif
26 26
27 #if !defined(USING_SIMULATOR) && !TARGET_OS_IOS 27 #if !defined(USING_SIMULATOR) && !HOST_OS_IOS
28 // Nothing to do. Flushing no instructions. 28 // Nothing to do. Flushing no instructions.
29 if (size == 0) { 29 if (size == 0) {
30 return; 30 return;
31 } 31 }
32 32
33 // ARM recommends using the gcc intrinsic __clear_cache on Linux and Android. 33 // ARM recommends using the gcc intrinsic __clear_cache on Linux and Android.
34 // blogs.arm.com/software-enablement/141-caches-and-self-modifying-code/ 34 // blogs.arm.com/software-enablement/141-caches-and-self-modifying-code/
35 #if defined(TARGET_OS_ANDROID) || defined(TARGET_OS_FUCHSIA) || \ 35 #if defined(HOST_OS_ANDROID) || defined(HOST_OS_FUCHSIA) || \
36 defined(TARGET_OS_LINUX) 36 defined(HOST_OS_LINUX)
37 extern void __clear_cache(char*, char*); 37 extern void __clear_cache(char*, char*);
38 char* beg = reinterpret_cast<char*>(start); 38 char* beg = reinterpret_cast<char*>(start);
39 char* end = reinterpret_cast<char*>(start + size); 39 char* end = reinterpret_cast<char*>(start + size);
40 ::__clear_cache(beg, end); 40 ::__clear_cache(beg, end);
41 #else 41 #else
42 #error FlushICache only tested/supported on Android, Fuchsia, and Linux 42 #error FlushICache only tested/supported on Android, Fuchsia, and Linux
43 #endif 43 #endif
44 44
45 #endif 45 #endif
46 } 46 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 ASSERT(hardware_ != NULL); 101 ASSERT(hardware_ != NULL);
102 free(const_cast<char*>(hardware_)); 102 free(const_cast<char*>(hardware_));
103 hardware_ = NULL; 103 hardware_ = NULL;
104 CpuInfo::Cleanup(); 104 CpuInfo::Cleanup();
105 } 105 }
106 #endif // !defined(USING_SIMULATOR) 106 #endif // !defined(USING_SIMULATOR)
107 107
108 } // namespace dart 108 } // namespace dart
109 109
110 #endif // defined TARGET_ARCH_ARM64 110 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/cpu_arm.cc ('k') | runtime/vm/cpuid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698