Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp
32285 views
/*1* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_C1_C1_MACROASSEMBLER_HPP25#define SHARE_VM_C1_C1_MACROASSEMBLER_HPP2627#include "asm/macroAssembler.hpp"28#include "asm/macroAssembler.inline.hpp"2930class CodeEmitInfo;3132class C1_MacroAssembler: public MacroAssembler {33public:34// creation35C1_MacroAssembler(CodeBuffer* code) : MacroAssembler(code) { pd_init(); }3637//----------------------------------------------------38void explicit_null_check(Register base);3940void inline_cache_check(Register receiver, Register iCache);41void build_frame(int frame_size_in_bytes, int bang_size_in_bytes);42void remove_frame(int frame_size_in_bytes);4344void unverified_entry(Register receiver, Register ic_klass);45void verified_entry();46void verify_stack_oop(int offset) PRODUCT_RETURN;47void verify_not_null_oop(Register r) PRODUCT_RETURN;4849#ifdef TARGET_ARCH_x8650# include "c1_MacroAssembler_x86.hpp"51#endif52#ifdef TARGET_ARCH_aarch3253# include "c1_MacroAssembler_aarch32.hpp"54#endif55#ifdef TARGET_ARCH_aarch6456# include "c1_MacroAssembler_aarch64.hpp"57#endif58#ifdef TARGET_ARCH_sparc59# include "c1_MacroAssembler_sparc.hpp"60#endif61#ifdef TARGET_ARCH_arm62# include "c1_MacroAssembler_arm.hpp"63#endif64#ifdef TARGET_ARCH_ppc65# include "c1_MacroAssembler_ppc.hpp"66#endif6768};69707172// A StubAssembler is a MacroAssembler w/ extra functionality for runtime73// stubs. Currently it 'knows' some stub info. Eventually, the information74// may be set automatically or can be asserted when using specialised75// StubAssembler functions.7677class StubAssembler: public C1_MacroAssembler {78private:79const char* _name;80bool _must_gc_arguments;81int _frame_size;82int _num_rt_args;83int _stub_id;8485public:86// creation87StubAssembler(CodeBuffer* code, const char * name, int stub_id);88void set_info(const char* name, bool must_gc_arguments);8990void set_frame_size(int size);91void set_num_rt_args(int args);9293// accessors94const char* name() const { return _name; }95bool must_gc_arguments() const { return _must_gc_arguments; }96int frame_size() const { return _frame_size; }97int num_rt_args() const { return _num_rt_args; }98int stub_id() const { return _stub_id; }99100// runtime calls (return offset of call to be used by GC map)101int call_RT(Register oop_result1, Register metadata_result, address entry, int args_size = 0);102int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1);103int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2);104int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3);105};106107#endif // SHARE_VM_C1_C1_MACROASSEMBLER_HPP108109110