Path: blob/master/src/hotspot/share/c1/c1_MacroAssembler.hpp
40930 views
/*1* Copyright (c) 2000, 2019, 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_C1_C1_MACROASSEMBLER_HPP25#define SHARE_C1_C1_MACROASSEMBLER_HPP2627#include "asm/macroAssembler.hpp"28#include "utilities/macros.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 verified_entry();45void verify_stack_oop(int offset) PRODUCT_RETURN;46void verify_not_null_oop(Register r) PRODUCT_RETURN;4748#include CPU_HEADER(c1_MacroAssembler)4950};51525354// A StubAssembler is a MacroAssembler w/ extra functionality for runtime55// stubs. Currently it 'knows' some stub info. Eventually, the information56// may be set automatically or can be asserted when using specialised57// StubAssembler functions.5859class StubAssembler: public C1_MacroAssembler {60private:61const char* _name;62bool _must_gc_arguments;63int _frame_size;64int _num_rt_args;65int _stub_id;6667public:68// creation69StubAssembler(CodeBuffer* code, const char * name, int stub_id);70void set_info(const char* name, bool must_gc_arguments);7172void set_frame_size(int size);73void set_num_rt_args(int args);7475void save_live_registers();76void restore_live_registers_without_return();7778// accessors79const char* name() const { return _name; }80bool must_gc_arguments() const { return _must_gc_arguments; }81int frame_size() const { return _frame_size; }82int num_rt_args() const { return _num_rt_args; }83int stub_id() const { return _stub_id; }8485// runtime calls (return offset of call to be used by GC map)86int call_RT(Register oop_result1, Register metadata_result, address entry, int args_size = 0);87int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1);88int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2);89int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3);9091void prologue(const char* name, bool must_gc_arguments);92void epilogue();93};9495#endif // SHARE_C1_C1_MACROASSEMBLER_HPP969798