Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp
32285 views
/*1* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.2* Copyright 2007 Red Hat, Inc.3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4*5* This code is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425#ifndef CPU_ZERO_VM_NATIVEINST_ZERO_HPP26#define CPU_ZERO_VM_NATIVEINST_ZERO_HPP2728#include "asm/assembler.hpp"29#include "memory/allocation.hpp"30#include "runtime/icache.hpp"31#include "runtime/os.hpp"32#include "utilities/top.hpp"3334// We have interfaces for the following instructions:35// - NativeInstruction36// - - NativeCall37// - - NativeMovConstReg38// - - NativeMovConstRegPatching39// - - NativeJump40// - - NativeIllegalOpCode41// - - NativeReturn42// - - NativeReturnX (return with argument)43// - - NativePushConst44// - - NativeTstRegMem4546// The base class for different kinds of native instruction abstractions.47// Provides the primitive operations to manipulate code relative to this.4849class NativeInstruction VALUE_OBJ_CLASS_SPEC {50public:51bool is_jump() {52ShouldNotCallThis();53return false;54}5556bool is_safepoint_poll() {57ShouldNotCallThis();58return false;59}60};6162inline NativeInstruction* nativeInstruction_at(address address) {63ShouldNotCallThis();64return NULL;65}6667class NativeCall : public NativeInstruction {68public:69enum zero_specific_constants {70instruction_size = 0 // not used within the interpreter71};7273address instruction_address() const {74ShouldNotCallThis();75return NULL;76}7778address next_instruction_address() const {79ShouldNotCallThis();80return NULL;81}8283address return_address() const {84ShouldNotCallThis();85return NULL;86}8788address destination() const {89ShouldNotCallThis();90return NULL;91}9293void set_destination_mt_safe(address dest) {94ShouldNotCallThis();95}9697void verify_alignment() {98ShouldNotCallThis();99}100101void verify() {102ShouldNotCallThis();103}104105static bool is_call_before(address return_address) {106ShouldNotCallThis();107return false;108}109};110111inline NativeCall* nativeCall_before(address return_address) {112ShouldNotCallThis();113return NULL;114}115116inline NativeCall* nativeCall_at(address address) {117ShouldNotCallThis();118return NULL;119}120121class NativeMovConstReg : public NativeInstruction {122public:123address next_instruction_address() const {124ShouldNotCallThis();125return NULL;126}127128intptr_t data() const {129ShouldNotCallThis();130return 0;131}132133void set_data(intptr_t x) {134ShouldNotCallThis();135}136};137138inline NativeMovConstReg* nativeMovConstReg_at(address address) {139ShouldNotCallThis();140return NULL;141}142143class NativeMovRegMem : public NativeInstruction {144public:145int offset() const {146ShouldNotCallThis();147return 0;148}149150void set_offset(intptr_t x) {151ShouldNotCallThis();152}153154void add_offset_in_bytes(int add_offset) {155ShouldNotCallThis();156}157};158159inline NativeMovRegMem* nativeMovRegMem_at(address address) {160ShouldNotCallThis();161return NULL;162}163164class NativeJump : public NativeInstruction {165public:166enum zero_specific_constants {167instruction_size = 0 // not used within the interpreter168};169170address jump_destination() const {171ShouldNotCallThis();172return NULL;173}174175void set_jump_destination(address dest) {176ShouldNotCallThis();177}178179static void check_verified_entry_alignment(address entry,180address verified_entry) {181}182183static void patch_verified_entry(address entry,184address verified_entry,185address dest);186};187188inline NativeJump* nativeJump_at(address address) {189ShouldNotCallThis();190return NULL;191}192193class NativeGeneralJump : public NativeInstruction {194public:195address jump_destination() const {196ShouldNotCallThis();197return NULL;198}199200static void insert_unconditional(address code_pos, address entry) {201ShouldNotCallThis();202}203204static void replace_mt_safe(address instr_addr, address code_buffer) {205ShouldNotCallThis();206}207};208209inline NativeGeneralJump* nativeGeneralJump_at(address address) {210ShouldNotCallThis();211return NULL;212}213214#endif // CPU_ZERO_VM_NATIVEINST_ZERO_HPP215216217