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

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

Issue 797233002: Make FlushICache NOP for Nvidia Denver CPU's. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed review comments and corrected few formatting errors Created 6 years 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 | « src/arm/assembler-arm.cc ('k') | src/arm64/assembler-arm64.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // CPU specific code for arm independent of OS goes here. 5 // CPU specific code for arm independent of OS goes here.
6 #ifdef __arm__ 6 #ifdef __arm__
7 #ifdef __QNXNTO__ 7 #ifdef __QNXNTO__
8 #include <sys/mman.h> // for cache flushing. 8 #include <sys/mman.h> // for cache flushing.
9 #undef MAP_TYPE 9 #undef MAP_TYPE
10 #else 10 #else
11 #include <sys/syscall.h> // for cache flushing. 11 #include <sys/syscall.h> // for cache flushing.
12 #endif 12 #endif
13 #endif 13 #endif
14 14
15 #include "src/v8.h" 15 #include "src/v8.h"
16 16
17 #if V8_TARGET_ARCH_ARM 17 #if V8_TARGET_ARCH_ARM
18 18
19 #include "src/assembler.h" 19 #include "src/assembler.h"
20 #include "src/macro-assembler.h" 20 #include "src/macro-assembler.h"
21 #include "src/simulator.h" // for cache flushing. 21 #include "src/simulator.h" // for cache flushing.
22 22
23 namespace v8 { 23 namespace v8 {
24 namespace internal { 24 namespace internal {
25 25
26 26
27 void CpuFeatures::FlushICache(void* start, size_t size) { 27 void CpuFeatures::FlushICache(void* start, size_t size) {
28 if (size == 0) return; 28 if (size == 0) return;
29 29
30 if (CpuFeatures::IsSupported(COHERENT_CACHE)) return;
31
30 #if defined(USE_SIMULATOR) 32 #if defined(USE_SIMULATOR)
31 // Not generating ARM instructions for C-code. This means that we are 33 // Not generating ARM instructions for C-code. This means that we are
32 // building an ARM emulator based target. We should notify the simulator 34 // building an ARM emulator based target. We should notify the simulator
33 // that the Icache was flushed. 35 // that the Icache was flushed.
34 // None of this code ends up in the snapshot so there are no issues 36 // None of this code ends up in the snapshot so there are no issues
35 // around whether or not to generate the code when building snapshots. 37 // around whether or not to generate the code when building snapshots.
36 Simulator::FlushICache(Isolate::Current()->simulator_i_cache(), start, size); 38 Simulator::FlushICache(Isolate::Current()->simulator_i_cache(), start, size);
37 39
38 #elif V8_OS_QNX 40 #elif V8_OS_QNX
39 msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE); 41 msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE);
(...skipping 18 matching lines...) Expand all
58 " pop {r7}\n" 60 " pop {r7}\n"
59 : 61 :
60 : "r" (beg), "r" (end), "r" (flg), [scno] "i" (__ARM_NR_cacheflush) 62 : "r" (beg), "r" (end), "r" (flg), [scno] "i" (__ARM_NR_cacheflush)
61 : "memory"); 63 : "memory");
62 #endif 64 #endif
63 } 65 }
64 66
65 } } // namespace v8::internal 67 } } // namespace v8::internal
66 68
67 #endif // V8_TARGET_ARCH_ARM 69 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698