Path: blob/master/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.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_X86_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_X86_HPP25#define CPU_X86_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_X86_HPP2627#include "asm/macroAssembler.hpp"28#include "gc/shared/barrierSetAssembler.hpp"29#include "gc/shenandoah/shenandoahBarrierSet.hpp"3031#ifdef COMPILER132class LIR_Assembler;33class ShenandoahPreBarrierStub;34class ShenandoahLoadReferenceBarrierStub;35class StubAssembler;36#endif37class StubCodeGenerator;3839class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {40private:4142void satb_write_barrier_pre(MacroAssembler* masm,43Register obj,44Register pre_val,45Register thread,46Register tmp,47bool tosca_live,48bool expand_call);4950void shenandoah_write_barrier_pre(MacroAssembler* masm,51Register obj,52Register pre_val,53Register thread,54Register tmp,55bool tosca_live,56bool expand_call);5758void iu_barrier_impl(MacroAssembler* masm, Register dst, Register tmp);5960public:61void iu_barrier(MacroAssembler* masm, Register dst, Register tmp);62#ifdef COMPILER163void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);64void gen_load_reference_barrier_stub(LIR_Assembler* ce, ShenandoahLoadReferenceBarrierStub* stub);65void generate_c1_pre_barrier_runtime_stub(StubAssembler* sasm);66void generate_c1_load_reference_barrier_runtime_stub(StubAssembler* sasm, DecoratorSet decorators);67#endif6869void load_reference_barrier(MacroAssembler* masm, Register dst, Address src, DecoratorSet decorators);7071void cmpxchg_oop(MacroAssembler* masm,72Register res, Address addr, Register oldval, Register newval,73bool exchange, Register tmp1, Register tmp2);74virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,75Register src, Register dst, Register count);76virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,77Register dst, Address src, Register tmp1, Register tmp_thread);78virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,79Address dst, Register val, Register tmp1, Register tmp2);80virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,81Register obj, Register tmp, Label& slowpath);82};8384#endif // CPU_X86_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_X86_HPP858687