nativeInst_zero.hpp revision 1472
0N/A/*
2362N/A * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
0N/A * Copyright 2007 Red Hat, Inc.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
2362N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
2362N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
2362N/A *
0N/A */
0N/A
0N/A// We have interfaces for the following instructions:
0N/A// - NativeInstruction
0N/A// - - NativeCall
0N/A// - - NativeMovConstReg
0N/A// - - NativeMovConstRegPatching
0N/A// - - NativeJump
0N/A// - - NativeIllegalOpCode
0N/A// - - NativeReturn
0N/A// - - NativeReturnX (return with argument)
0N/A// - - NativePushConst
0N/A// - - NativeTstRegMem
0N/A
0N/A// The base class for different kinds of native instruction abstractions.
0N/A// Provides the primitive operations to manipulate code relative to this.
0N/A
0N/Aclass NativeInstruction VALUE_OBJ_CLASS_SPEC {
0N/A public:
0N/A bool is_jump() {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A bool is_safepoint_poll() {
0N/A ShouldNotCallThis();
0N/A }
0N/A};
0N/A
0N/Ainline NativeInstruction* nativeInstruction_at(address address) {
0N/A ShouldNotCallThis();
0N/A}
1201N/A
1201N/Aclass NativeCall : public NativeInstruction {
1201N/A public:
0N/A enum zero_specific_constants {
0N/A instruction_size = 0 // not used within the interpreter
0N/A };
0N/A
0N/A address instruction_address() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A address next_instruction_address() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A address return_address() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A address destination() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
463N/A void set_destination_mt_safe(address dest) {
0N/A ShouldNotCallThis();
463N/A }
463N/A
463N/A void verify_alignment() {
0N/A ShouldNotCallThis();
0N/A }
0N/A
463N/A void verify() {
463N/A ShouldNotCallThis();
0N/A }
463N/A
463N/A static bool is_call_before(address return_address) {
463N/A ShouldNotCallThis();
0N/A }
0N/A};
0N/A
0N/Ainline NativeCall* nativeCall_before(address return_address) {
0N/A ShouldNotCallThis();
0N/A}
0N/A
0N/Ainline NativeCall* nativeCall_at(address address) {
1311N/A ShouldNotCallThis();
0N/A}
0N/A
0N/Aclass NativeMovConstReg : public NativeInstruction {
0N/A public:
0N/A address next_instruction_address() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A intptr_t data() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A void set_data(intptr_t x) {
0N/A ShouldNotCallThis();
0N/A }
0N/A};
0N/A
0N/Ainline NativeMovConstReg* nativeMovConstReg_at(address address) {
0N/A ShouldNotCallThis();
0N/A}
0N/A
0N/Aclass NativeMovRegMem : public NativeInstruction {
0N/A public:
0N/A int offset() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A void set_offset(intptr_t x) {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A void add_offset_in_bytes(int add_offset) {
0N/A ShouldNotCallThis();
0N/A }
0N/A};
0N/A
0N/Ainline NativeMovRegMem* nativeMovRegMem_at(address address) {
0N/A ShouldNotCallThis();
0N/A}
0N/A
0N/Aclass NativeJump : public NativeInstruction {
0N/A public:
0N/A enum zero_specific_constants {
0N/A instruction_size = 0 // not used within the interpreter
0N/A };
0N/A
0N/A address jump_destination() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A void set_jump_destination(address dest) {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A static void check_verified_entry_alignment(address entry,
0N/A address verified_entry) {
0N/A }
0N/A
0N/A static void patch_verified_entry(address entry,
0N/A address verified_entry,
0N/A address dest);
0N/A};
0N/A
0N/Ainline NativeJump* nativeJump_at(address address) {
0N/A ShouldNotCallThis();
0N/A}
0N/A
0N/Aclass NativeGeneralJump : public NativeInstruction {
0N/A public:
0N/A address jump_destination() const {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A static void insert_unconditional(address code_pos, address entry) {
0N/A ShouldNotCallThis();
0N/A }
0N/A
0N/A static void replace_mt_safe(address instr_addr, address code_buffer) {
0N/A ShouldNotCallThis();
0N/A }
0N/A};
0N/A
0N/Ainline NativeGeneralJump* nativeGeneralJump_at(address address) {
0N/A ShouldNotCallThis();
0N/A}
0N/A