Path: blob/master/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp
41153 views
/*1* Copyright (c) 2018, 2021, Red Hat, Inc. 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 CPU_AARCH64_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_AARCH64_HPP25#define CPU_AARCH64_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_AARCH64_HPP2627#include "asm/macroAssembler.hpp"28#include "gc/shared/barrierSetAssembler.hpp"29#include "gc/shenandoah/shenandoahBarrierSet.hpp"30#ifdef COMPILER131class LIR_Assembler;32class ShenandoahPreBarrierStub;33class ShenandoahLoadReferenceBarrierStub;34class StubAssembler;35#endif36class StubCodeGenerator;3738class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {39private:4041void satb_write_barrier_pre(MacroAssembler* masm,42Register obj,43Register pre_val,44Register thread,45Register tmp,46bool tosca_live,47bool expand_call);48void shenandoah_write_barrier_pre(MacroAssembler* masm,49Register obj,50Register pre_val,51Register thread,52Register tmp,53bool tosca_live,54bool expand_call);5556void resolve_forward_pointer(MacroAssembler* masm, Register dst, Register tmp = noreg);57void resolve_forward_pointer_not_null(MacroAssembler* masm, Register dst, Register tmp = noreg);58void load_reference_barrier(MacroAssembler* masm, Register dst, Address load_addr, DecoratorSet decorators);5960public:6162void iu_barrier(MacroAssembler* masm, Register dst, Register tmp);6364#ifdef COMPILER165void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);66void gen_load_reference_barrier_stub(LIR_Assembler* ce, ShenandoahLoadReferenceBarrierStub* stub);67void generate_c1_pre_barrier_runtime_stub(StubAssembler* sasm);68void generate_c1_load_reference_barrier_runtime_stub(StubAssembler* sasm, DecoratorSet decorators);69#endif7071virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,72Register src, Register dst, Register count, RegSet saved_regs);73virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,74Register dst, Address src, Register tmp1, Register tmp_thread);75virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,76Address dst, Register val, Register tmp1, Register tmp2);77virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,78Register obj, Register tmp, Label& slowpath);79void cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val,80bool acquire, bool release, bool is_cae, Register result);81};8283#endif // CPU_AARCH64_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_AARCH64_HPP848586