OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // CPU specific code for s390 independent of OS goes here. | |
6 #include "src/v8.h" | |
7 | |
8 #if V8_TARGET_ARCH_S390 | |
9 | |
10 #include "src/assembler.h" | |
11 #include "src/macro-assembler.h" | |
12 #include "src/simulator.h" // for cache flushing. | |
13 | |
14 namespace v8 { | |
15 namespace internal { | |
16 | |
17 void CpuFeatures::FlushICache(void* buffer, size_t size) { | |
18 // Nothing to do flushing no instructions. | |
19 if (size == 0) { | |
20 return; | |
21 } | |
22 | |
23 #if defined(USE_SIMULATOR) | |
24 // Not generating S390 instructions for C-code. This means that we are | |
25 // building an S390 emulator based target. We should notify the simulator | |
26 // that the Icache was flushed. | |
27 // None of this code ends up in the snapshot so there are no issues | |
28 // around whether or not to generate the code when building snapshots. | |
29 Simulator::FlushICache(Isolate::Current()->simulator_i_cache(), buffer, size); | |
jochen (gone - plz use gerrit)
2016/02/25 12:17:28
please don't use Isolate::Current()
| |
30 #endif // USE_SIMULATOR | |
31 } | |
32 | |
33 } // namespace internal | |
34 } // namespace v8 | |
35 | |
36 #endif // V8_TARGET_ARCH_S390 | |
OLD | NEW |