author | duke |
Wed, 05 Jul 2017 20:05:23 +0200 | |
changeset 27222 | 422e90d83a4e |
parent 22234 | da823d78ad65 |
child 37466 | 287c4ebd11b0 |
permissions | -rw-r--r-- |
4013 | 1 |
/* |
22234
da823d78ad65
8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
mikael
parents:
19336
diff
changeset
|
2 |
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
4013 | 3 |
* Copyright 2007 Red Hat, Inc. |
4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
5 |
* |
|
6 |
* This code is free software; you can redistribute it and/or modify it |
|
7 |
* under the terms of the GNU General Public License version 2 only, as |
|
8 |
* published by the Free Software Foundation. |
|
9 |
* |
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
* accompanied this code). |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License version |
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4013
diff
changeset
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4013
diff
changeset
|
21 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4013
diff
changeset
|
22 |
* questions. |
4013 | 23 |
* |
24 |
*/ |
|
25 |
||
7397 | 26 |
#ifndef CPU_ZERO_VM_NATIVEINST_ZERO_HPP |
27 |
#define CPU_ZERO_VM_NATIVEINST_ZERO_HPP |
|
28 |
||
29 |
#include "asm/assembler.hpp" |
|
30 |
#include "memory/allocation.hpp" |
|
31 |
#include "runtime/icache.hpp" |
|
32 |
#include "runtime/os.hpp" |
|
33 |
#include "utilities/top.hpp" |
|
34 |
||
4013 | 35 |
// We have interfaces for the following instructions: |
36 |
// - NativeInstruction |
|
37 |
// - - NativeCall |
|
38 |
// - - NativeMovConstReg |
|
39 |
// - - NativeMovConstRegPatching |
|
40 |
// - - NativeJump |
|
41 |
// - - NativeIllegalOpCode |
|
42 |
// - - NativeReturn |
|
43 |
// - - NativeReturnX (return with argument) |
|
44 |
// - - NativePushConst |
|
45 |
// - - NativeTstRegMem |
|
46 |
||
47 |
// The base class for different kinds of native instruction abstractions. |
|
48 |
// Provides the primitive operations to manipulate code relative to this. |
|
49 |
||
50 |
class NativeInstruction VALUE_OBJ_CLASS_SPEC { |
|
51 |
public: |
|
52 |
bool is_jump() { |
|
53 |
ShouldNotCallThis(); |
|
19336 | 54 |
return false; |
4013 | 55 |
} |
56 |
||
57 |
bool is_safepoint_poll() { |
|
58 |
ShouldNotCallThis(); |
|
19336 | 59 |
return false; |
4013 | 60 |
} |
61 |
}; |
|
62 |
||
63 |
inline NativeInstruction* nativeInstruction_at(address address) { |
|
64 |
ShouldNotCallThis(); |
|
19336 | 65 |
return NULL; |
4013 | 66 |
} |
67 |
||
68 |
class NativeCall : public NativeInstruction { |
|
69 |
public: |
|
70 |
enum zero_specific_constants { |
|
71 |
instruction_size = 0 // not used within the interpreter |
|
72 |
}; |
|
73 |
||
74 |
address instruction_address() const { |
|
75 |
ShouldNotCallThis(); |
|
19336 | 76 |
return NULL; |
4013 | 77 |
} |
78 |
||
79 |
address next_instruction_address() const { |
|
80 |
ShouldNotCallThis(); |
|
19336 | 81 |
return NULL; |
4013 | 82 |
} |
83 |
||
84 |
address return_address() const { |
|
85 |
ShouldNotCallThis(); |
|
19336 | 86 |
return NULL; |
4013 | 87 |
} |
88 |
||
89 |
address destination() const { |
|
90 |
ShouldNotCallThis(); |
|
19336 | 91 |
return NULL; |
4013 | 92 |
} |
93 |
||
94 |
void set_destination_mt_safe(address dest) { |
|
95 |
ShouldNotCallThis(); |
|
96 |
} |
|
97 |
||
98 |
void verify_alignment() { |
|
99 |
ShouldNotCallThis(); |
|
100 |
} |
|
101 |
||
102 |
void verify() { |
|
103 |
ShouldNotCallThis(); |
|
104 |
} |
|
105 |
||
106 |
static bool is_call_before(address return_address) { |
|
107 |
ShouldNotCallThis(); |
|
19336 | 108 |
return false; |
4013 | 109 |
} |
110 |
}; |
|
111 |
||
112 |
inline NativeCall* nativeCall_before(address return_address) { |
|
113 |
ShouldNotCallThis(); |
|
19336 | 114 |
return NULL; |
4013 | 115 |
} |
116 |
||
117 |
inline NativeCall* nativeCall_at(address address) { |
|
118 |
ShouldNotCallThis(); |
|
19336 | 119 |
return NULL; |
4013 | 120 |
} |
121 |
||
122 |
class NativeMovConstReg : public NativeInstruction { |
|
123 |
public: |
|
124 |
address next_instruction_address() const { |
|
125 |
ShouldNotCallThis(); |
|
19336 | 126 |
return NULL; |
4013 | 127 |
} |
128 |
||
129 |
intptr_t data() const { |
|
130 |
ShouldNotCallThis(); |
|
19336 | 131 |
return 0; |
4013 | 132 |
} |
133 |
||
134 |
void set_data(intptr_t x) { |
|
135 |
ShouldNotCallThis(); |
|
136 |
} |
|
137 |
}; |
|
138 |
||
139 |
inline NativeMovConstReg* nativeMovConstReg_at(address address) { |
|
140 |
ShouldNotCallThis(); |
|
19336 | 141 |
return NULL; |
4013 | 142 |
} |
143 |
||
144 |
class NativeMovRegMem : public NativeInstruction { |
|
145 |
public: |
|
146 |
int offset() const { |
|
147 |
ShouldNotCallThis(); |
|
19336 | 148 |
return 0; |
4013 | 149 |
} |
150 |
||
151 |
void set_offset(intptr_t x) { |
|
152 |
ShouldNotCallThis(); |
|
153 |
} |
|
154 |
||
155 |
void add_offset_in_bytes(int add_offset) { |
|
156 |
ShouldNotCallThis(); |
|
157 |
} |
|
158 |
}; |
|
159 |
||
160 |
inline NativeMovRegMem* nativeMovRegMem_at(address address) { |
|
161 |
ShouldNotCallThis(); |
|
19336 | 162 |
return NULL; |
4013 | 163 |
} |
164 |
||
165 |
class NativeJump : public NativeInstruction { |
|
166 |
public: |
|
167 |
enum zero_specific_constants { |
|
168 |
instruction_size = 0 // not used within the interpreter |
|
169 |
}; |
|
170 |
||
171 |
address jump_destination() const { |
|
172 |
ShouldNotCallThis(); |
|
19336 | 173 |
return NULL; |
4013 | 174 |
} |
175 |
||
176 |
void set_jump_destination(address dest) { |
|
177 |
ShouldNotCallThis(); |
|
178 |
} |
|
179 |
||
180 |
static void check_verified_entry_alignment(address entry, |
|
181 |
address verified_entry) { |
|
182 |
} |
|
183 |
||
184 |
static void patch_verified_entry(address entry, |
|
185 |
address verified_entry, |
|
186 |
address dest); |
|
187 |
}; |
|
188 |
||
189 |
inline NativeJump* nativeJump_at(address address) { |
|
190 |
ShouldNotCallThis(); |
|
19336 | 191 |
return NULL; |
4013 | 192 |
} |
193 |
||
194 |
class NativeGeneralJump : public NativeInstruction { |
|
195 |
public: |
|
196 |
address jump_destination() const { |
|
197 |
ShouldNotCallThis(); |
|
19336 | 198 |
return NULL; |
4013 | 199 |
} |
200 |
||
201 |
static void insert_unconditional(address code_pos, address entry) { |
|
202 |
ShouldNotCallThis(); |
|
203 |
} |
|
204 |
||
205 |
static void replace_mt_safe(address instr_addr, address code_buffer) { |
|
206 |
ShouldNotCallThis(); |
|
207 |
} |
|
208 |
}; |
|
209 |
||
210 |
inline NativeGeneralJump* nativeGeneralJump_at(address address) { |
|
211 |
ShouldNotCallThis(); |
|
19336 | 212 |
return NULL; |
4013 | 213 |
} |
7397 | 214 |
|
215 |
#endif // CPU_ZERO_VM_NATIVEINST_ZERO_HPP |