1 /*
2 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
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 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 // We have interfaces for the following instructions:
27 // - NativeInstruction
28 // - - NativeCall
29 // - - NativeMovConstReg
30 // - - NativeMovConstRegPatching
31 // - - NativeJump
32 // - - NativeIllegalOpCode
33 // - - NativeReturn
34 // - - NativeReturnX (return with argument)
35 // - - NativePushConst
36 // - - NativeTstRegMem
37
38 // The base class for different kinds of native instruction abstractions.
39 // Provides the primitive operations to manipulate code relative to this.
40
41 class NativeInstruction VALUE_OBJ_CLASS_SPEC {
42 public:
43 bool is_jump() {
44 ShouldNotCallThis();
45 }
166 }
167
168 class NativeGeneralJump : public NativeInstruction {
169 public:
170 address jump_destination() const {
171 ShouldNotCallThis();
172 }
173
174 static void insert_unconditional(address code_pos, address entry) {
175 ShouldNotCallThis();
176 }
177
178 static void replace_mt_safe(address instr_addr, address code_buffer) {
179 ShouldNotCallThis();
180 }
181 };
182
183 inline NativeGeneralJump* nativeGeneralJump_at(address address) {
184 ShouldNotCallThis();
185 }
|
1 /*
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
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 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
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
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();
54 }
175 }
176
177 class NativeGeneralJump : public NativeInstruction {
178 public:
179 address jump_destination() const {
180 ShouldNotCallThis();
181 }
182
183 static void insert_unconditional(address code_pos, address entry) {
184 ShouldNotCallThis();
185 }
186
187 static void replace_mt_safe(address instr_addr, address code_buffer) {
188 ShouldNotCallThis();
189 }
190 };
191
192 inline NativeGeneralJump* nativeGeneralJump_at(address address) {
193 ShouldNotCallThis();
194 }
195
196 #endif // CPU_ZERO_VM_NATIVEINST_ZERO_HPP
|