1 /* |
1 /* |
2 * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
|
24 |
|
25 #ifndef SHARE_VM_RUNTIME_ICACHE_HPP |
|
26 #define SHARE_VM_RUNTIME_ICACHE_HPP |
|
27 |
|
28 #include "memory/allocation.hpp" |
|
29 #include "runtime/stubCodeGenerator.hpp" |
24 |
30 |
25 // Interface for updating the instruction cache. Whenever the VM modifies |
31 // Interface for updating the instruction cache. Whenever the VM modifies |
26 // code, part of the processor instruction cache potentially has to be flushed. |
32 // code, part of the processor instruction cache potentially has to be flushed. |
27 |
33 |
28 // Default implementation is in icache.cpp, and can be hidden per-platform. |
34 // Default implementation is in icache.cpp, and can be hidden per-platform. |
60 |
66 |
61 |
67 |
62 // Must be included before the definition of ICacheStubGenerator |
68 // Must be included before the definition of ICacheStubGenerator |
63 // because ICacheStubGenerator uses ICache definitions. |
69 // because ICacheStubGenerator uses ICache definitions. |
64 |
70 |
65 #include "incls/_icache_pd.hpp.incl" |
71 #ifdef TARGET_ARCH_x86 |
|
72 # include "icache_x86.hpp" |
|
73 #endif |
|
74 #ifdef TARGET_ARCH_sparc |
|
75 # include "icache_sparc.hpp" |
|
76 #endif |
|
77 #ifdef TARGET_ARCH_zero |
|
78 # include "icache_zero.hpp" |
|
79 #endif |
|
80 |
66 |
81 |
67 |
82 |
68 class ICacheStubGenerator : public StubCodeGenerator { |
83 class ICacheStubGenerator : public StubCodeGenerator { |
69 public: |
84 public: |
70 ICacheStubGenerator(CodeBuffer *c) : StubCodeGenerator(c) {} |
85 ICacheStubGenerator(CodeBuffer *c) : StubCodeGenerator(c) {} |