author | lana |
Sat, 22 Apr 2017 00:22:47 +0000 | |
changeset 44716 | 60901aefa352 |
parent 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 |
||
4013 | 34 |
// We have interfaces for the following instructions: |
35 |
// - NativeInstruction |
|
36 |
// - - NativeCall |
|
37 |
// - - NativeMovConstReg |
|
38 |
// - - NativeMovConstRegPatching |
|
39 |
// - - NativeJump |
|
40 |
// - - NativeIllegalOpCode |
|
41 |
// - - NativeReturn |
|
42 |
// - - NativeReturnX (return with argument) |
|
43 |
// - - NativePushConst |
|
44 |
// - - NativeTstRegMem |
|
45 |
||
46 |
// The base class for different kinds of native instruction abstractions. |
|
47 |
// Provides the primitive operations to manipulate code relative to this. |
|
48 |
||
49 |
class NativeInstruction VALUE_OBJ_CLASS_SPEC { |
|
50 |
public: |
|
51 |
bool is_jump() { |
|
52 |
ShouldNotCallThis(); |
|
19336 | 53 |
return false; |
4013 | 54 |
} |
55 |
||
56 |
bool is_safepoint_poll() { |
|
57 |
ShouldNotCallThis(); |
|
19336 | 58 |
return false; |
4013 | 59 |
} |
60 |
}; |
|
61 |
||
62 |
inline NativeInstruction* nativeInstruction_at(address address) { |
|
63 |
ShouldNotCallThis(); |
|
19336 | 64 |
return NULL; |
4013 | 65 |
} |
66 |
||
67 |
class NativeCall : public NativeInstruction { |
|
68 |
public: |
|
69 |
enum zero_specific_constants { |
|
70 |
instruction_size = 0 // not used within the interpreter |
|
71 |
}; |
|
72 |
||
73 |
address instruction_address() const { |
|
74 |
ShouldNotCallThis(); |
|
19336 | 75 |
return NULL; |
4013 | 76 |
} |
77 |
||
78 |
address next_instruction_address() const { |
|
79 |
ShouldNotCallThis(); |
|
19336 | 80 |
return NULL; |
4013 | 81 |
} |
82 |
||
83 |
address return_address() const { |
|
84 |
ShouldNotCallThis(); |
|
19336 | 85 |
return NULL; |
4013 | 86 |
} |
87 |
||
88 |
address destination() const { |
|
89 |
ShouldNotCallThis(); |
|
19336 | 90 |
return NULL; |
4013 | 91 |
} |
92 |
||
93 |
void set_destination_mt_safe(address dest) { |
|
94 |
ShouldNotCallThis(); |
|
95 |
} |
|
96 |
||
97 |
void verify_alignment() { |
|
98 |
ShouldNotCallThis(); |
|
99 |
} |
|
100 |
||
101 |
void verify() { |
|
102 |
ShouldNotCallThis(); |
|
103 |
} |
|
104 |
||
105 |
static bool is_call_before(address return_address) { |
|
106 |
ShouldNotCallThis(); |
|
19336 | 107 |
return false; |
4013 | 108 |
} |
109 |
}; |
|
110 |
||
111 |
inline NativeCall* nativeCall_before(address return_address) { |
|
112 |
ShouldNotCallThis(); |
|
19336 | 113 |
return NULL; |
4013 | 114 |
} |
115 |
||
116 |
inline NativeCall* nativeCall_at(address address) { |
|
117 |
ShouldNotCallThis(); |
|
19336 | 118 |
return NULL; |
4013 | 119 |
} |
120 |
||
121 |
class NativeMovConstReg : public NativeInstruction { |
|
122 |
public: |
|
123 |
address next_instruction_address() const { |
|
124 |
ShouldNotCallThis(); |
|
19336 | 125 |
return NULL; |
4013 | 126 |
} |
127 |
||
128 |
intptr_t data() const { |
|
129 |
ShouldNotCallThis(); |
|
19336 | 130 |
return 0; |
4013 | 131 |
} |
132 |
||
133 |
void set_data(intptr_t x) { |
|
134 |
ShouldNotCallThis(); |
|
135 |
} |
|
136 |
}; |
|
137 |
||
138 |
inline NativeMovConstReg* nativeMovConstReg_at(address address) { |
|
139 |
ShouldNotCallThis(); |
|
19336 | 140 |
return NULL; |
4013 | 141 |
} |
142 |
||
143 |
class NativeMovRegMem : public NativeInstruction { |
|
144 |
public: |
|
145 |
int offset() const { |
|
146 |
ShouldNotCallThis(); |
|
19336 | 147 |
return 0; |
4013 | 148 |
} |
149 |
||
150 |
void set_offset(intptr_t x) { |
|
151 |
ShouldNotCallThis(); |
|
152 |
} |
|
153 |
||
154 |
void add_offset_in_bytes(int add_offset) { |
|
155 |
ShouldNotCallThis(); |
|
156 |
} |
|
157 |
}; |
|
158 |
||
159 |
inline NativeMovRegMem* nativeMovRegMem_at(address address) { |
|
160 |
ShouldNotCallThis(); |
|
19336 | 161 |
return NULL; |
4013 | 162 |
} |
163 |
||
164 |
class NativeJump : public NativeInstruction { |
|
165 |
public: |
|
166 |
enum zero_specific_constants { |
|
167 |
instruction_size = 0 // not used within the interpreter |
|
168 |
}; |
|
169 |
||
170 |
address jump_destination() const { |
|
171 |
ShouldNotCallThis(); |
|
19336 | 172 |
return NULL; |
4013 | 173 |
} |
174 |
||
175 |
void set_jump_destination(address dest) { |
|
176 |
ShouldNotCallThis(); |
|
177 |
} |
|
178 |
||
179 |
static void check_verified_entry_alignment(address entry, |
|
180 |
address verified_entry) { |
|
181 |
} |
|
182 |
||
183 |
static void patch_verified_entry(address entry, |
|
184 |
address verified_entry, |
|
185 |
address dest); |
|
186 |
}; |
|
187 |
||
188 |
inline NativeJump* nativeJump_at(address address) { |
|
189 |
ShouldNotCallThis(); |
|
19336 | 190 |
return NULL; |
4013 | 191 |
} |
192 |
||
193 |
class NativeGeneralJump : public NativeInstruction { |
|
194 |
public: |
|
195 |
address jump_destination() const { |
|
196 |
ShouldNotCallThis(); |
|
19336 | 197 |
return NULL; |
4013 | 198 |
} |
199 |
||
200 |
static void insert_unconditional(address code_pos, address entry) { |
|
201 |
ShouldNotCallThis(); |
|
202 |
} |
|
203 |
||
204 |
static void replace_mt_safe(address instr_addr, address code_buffer) { |
|
205 |
ShouldNotCallThis(); |
|
206 |
} |
|
207 |
}; |
|
208 |
||
209 |
inline NativeGeneralJump* nativeGeneralJump_at(address address) { |
|
210 |
ShouldNotCallThis(); |
|
19336 | 211 |
return NULL; |
4013 | 212 |
} |
7397 | 213 |
|
214 |
#endif // CPU_ZERO_VM_NATIVEINST_ZERO_HPP |