Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorator
bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
bool on_reference = on_weak || on_phantom;
ModRefBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
CardTableBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
if (on_oop && on_reference) {
// LR is live. It must be saved around calls.
__ enter(/*strip_ret_addr*/true); // barrier may call runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
#define CPU_AARCH64_GC_G1_G1BARRIERSETASSEMBLER_AARCH64_HPP

#include "asm/macroAssembler.hpp"
#include "gc/shared/modRefBarrierSetAssembler.hpp"
#include "gc/shared/cardTableBarrierSetAssembler.hpp"
#include "utilities/macros.hpp"

class LIR_Assembler;
class StubAssembler;
class G1PreBarrierStub;
class G1PreBarrierStubC2;

class G1BarrierSetAssembler: public ModRefBarrierSetAssembler {
class G1BarrierSetAssembler: public CardTableBarrierSetAssembler {
protected:
void gen_write_ref_array_pre_barrier(MacroAssembler* masm, DecoratorSet decorators,
Register addr, Register count, RegSet saved_regs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,31 @@

#define __ masm->

void CardTableBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register src, Register dst, Register count, RegSet saved_regs) {

if (is_oop) {
gen_write_ref_array_pre_barrier(masm, decorators, dst, count, saved_regs);
}
}

void CardTableBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register start, Register count, Register tmp,
RegSet saved_regs) {
if (is_oop) {
gen_write_ref_array_post_barrier(masm, decorators, start, count, tmp, saved_regs);
}
}

void CardTableBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
if (is_reference_type(type)) {
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
} else {
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
}
}

void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register obj, Address dst) {

BarrierSet* bs = BarrierSet::barrier_set();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,27 @@
#define CPU_AARCH64_GC_SHARED_CARDTABLEBARRIERSETASSEMBLER_AARCH64_HPP

#include "asm/macroAssembler.hpp"
#include "gc/shared/modRefBarrierSetAssembler.hpp"
#include "gc/shared/barrierSetAssembler.hpp"

class CardTableBarrierSetAssembler: public ModRefBarrierSetAssembler {
class CardTableBarrierSetAssembler: public BarrierSetAssembler {
protected:
void store_check(MacroAssembler* masm, Register obj, Address dst);
virtual void gen_write_ref_array_pre_barrier(MacroAssembler* masm, DecoratorSet decorators,
Register addr, Register count, RegSet saved_regs) {}

virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
Register start, Register count, Register tmp, RegSet saved_regs);
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);

virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register src, Register dst, Register count, RegSet saved_regs);

virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register start, Register count, Register tmp, RegSet saved_regs);
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);

void store_check(MacroAssembler* masm, Register obj, Address dst);
};

#endif // CPU_AARCH64_GC_SHARED_CARDTABLEBARRIERSETASSEMBLER_AARCH64_HPP

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorator
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
bool on_reference = on_weak || on_phantom;

ModRefBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2, tmp3);
CardTableBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2, tmp3);
if (on_oop && on_reference) {
// Generate the G1 pre-barrier code to log the value of
// the referent field in an SATB buffer.
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
#define CPU_ARM_GC_G1_G1BARRIERSETASSEMBLER_ARM_HPP

#include "asm/macroAssembler.hpp"
#include "gc/shared/modRefBarrierSetAssembler.hpp"
#include "gc/shared/cardTableBarrierSetAssembler.hpp"
#include "utilities/macros.hpp"

class LIR_Assembler;
class StubAssembler;
class G1PreBarrierStub;
class G1PreBarrierStubC2;

class G1BarrierSetAssembler: public ModRefBarrierSetAssembler {
class G1BarrierSetAssembler: public CardTableBarrierSetAssembler {
protected:
void gen_write_ref_array_pre_barrier(MacroAssembler* masm, DecoratorSet decorators,
Register addr, Register count, int callee_saved_regs);
Expand Down
24 changes: 24 additions & 0 deletions src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@

#define BIND(label) bind(label); BLOCK_COMMENT(#label ":")

void CardTableBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register addr, Register count, int callee_saved_regs) {

if (is_oop) {
gen_write_ref_array_pre_barrier(masm, decorators, addr, count, callee_saved_regs);
}
}

void CardTableBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register addr, Register count, Register tmp) {
if (is_oop) {
gen_write_ref_array_post_barrier(masm, decorators, addr, count, tmp);
}
}

void CardTableBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address obj, Register new_val, Register tmp1, Register tmp2, Register tmp3, bool is_null) {
if (type == T_OBJECT || type == T_ARRAY) {
oop_store_at(masm, decorators, type, obj, new_val, tmp1, tmp2, tmp3, is_null);
} else {
BarrierSetAssembler::store_at(masm, decorators, type, obj, new_val, tmp1, tmp2, tmp3, is_null);
}
}

void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
Register addr, Register count, Register tmp) {
BLOCK_COMMENT("CardTablePostBarrier");
Expand Down
17 changes: 15 additions & 2 deletions src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#define CPU_ARM_GC_SHARED_CARDTABLEBARRIERSETASSEMBLER_ARM_HPP

#include "asm/macroAssembler.hpp"
#include "gc/shared/modRefBarrierSetAssembler.hpp"
#include "gc/shared/barrierSetAssembler.hpp"

class CardTableBarrierSetAssembler: public ModRefBarrierSetAssembler {
class CardTableBarrierSetAssembler: public BarrierSetAssembler {
private:
void store_check(MacroAssembler* masm, Register obj, Address dst);
void store_check_part1(MacroAssembler* masm, Register card_table_base);
Expand All @@ -37,10 +37,23 @@ class CardTableBarrierSetAssembler: public ModRefBarrierSetAssembler {
void set_card(MacroAssembler* masm, Register card_table_base, Address card_table_addr, Register tmp);

protected:
virtual void gen_write_ref_array_pre_barrier(MacroAssembler* masm, DecoratorSet decorators,
Register addr, Register count, int callee_saved_regs) {}

virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
Register addr, Register count, Register tmp);

virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address obj, Register new_val, Register tmp1, Register tmp2, Register tmp3, bool is_null);

public:
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register addr, Register count, int callee_saved_regs);
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register addr, Register count, Register tmp);
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address obj, Register val, Register tmp1, Register tmp2, Register tmp3, bool is_null);

};

#endif // CPU_ARM_GC_SHARED_CARDTABLEBARRIERSETASSEMBLER_ARM_HPP
52 changes: 0 additions & 52 deletions src/hotspot/cpu/arm/gc/shared/modRefBarrierSetAssembler_arm.cpp

This file was deleted.

Loading