34
35 class LIR_Assembler;
36 class ShenandoahPreBarrierStub;
37 class ShenandoahLoadReferenceBarrierStub;
38 class StubAssembler;
39
40 #endif
41
42 class StubCodeGenerator;
43
44 class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {
45 private:
46
47 /* ==== Actual barrier implementations ==== */
48 void satb_write_barrier_impl(MacroAssembler* masm, DecoratorSet decorators,
49 Register base, RegisterOrConstant ind_or_offs,
50 Register pre_val,
51 Register tmp1, Register tmp2,
52 MacroAssembler::PreservationLevel preservation_level);
53
54 void load_reference_barrier_impl(MacroAssembler* masm, DecoratorSet decorators,
55 Register base, RegisterOrConstant ind_or_offs,
56 Register dst,
57 Register tmp1, Register tmp2,
58 MacroAssembler::PreservationLevel preservation_level);
59
60 /* ==== Helper methods for barrier implementations ==== */
61 void resolve_forward_pointer_not_null(MacroAssembler* masm, Register dst, Register tmp);
62
63 public:
64 virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; }
65
66 /* ==== C1 stubs ==== */
67 #ifdef COMPILER1
68
69 void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
70
71 void gen_load_reference_barrier_stub(LIR_Assembler* ce, ShenandoahLoadReferenceBarrierStub* stub);
72
73 void generate_c1_pre_barrier_runtime_stub(StubAssembler* sasm);
74
75 void generate_c1_load_reference_barrier_runtime_stub(StubAssembler* sasm, DecoratorSet decorators);
76
77 #endif
78
79 /* ==== Available barriers (facades of the actual implementations) ==== */
80 void satb_write_barrier(MacroAssembler* masm,
81 Register base, RegisterOrConstant ind_or_offs,
82 Register tmp1, Register tmp2, Register tmp3,
83 MacroAssembler::PreservationLevel preservation_level);
84
85 void load_reference_barrier(MacroAssembler* masm, DecoratorSet decorators,
86 Register base, RegisterOrConstant ind_or_offs,
87 Register dst,
88 Register tmp1, Register tmp2,
89 MacroAssembler::PreservationLevel preservation_level);
90
91 /* ==== Helper methods used by C1 and C2 ==== */
92 void cmpxchg_oop(MacroAssembler* masm, Register base_addr, Register expected, Register new_val,
93 Register tmp1, Register tmp2,
94 bool is_cae, Register result);
95
96 /* ==== Access api ==== */
97 virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
98 Register src, Register dst, Register count, Register preserve1, Register preserve2);
99
100 virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
101 Register base, RegisterOrConstant ind_or_offs, Register val,
102 Register tmp1, Register tmp2, Register tmp3,
103 MacroAssembler::PreservationLevel preservation_level);
104
105 virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
106 Register base, RegisterOrConstant ind_or_offs, Register dst,
107 Register tmp1, Register tmp2,
108 MacroAssembler::PreservationLevel preservation_level, Label* L_handle_null = nullptr);
109
110 virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register dst, Register jni_env,
111 Register obj, Register tmp, Label& slowpath);
112 };
113
114 #endif // CPU_PPC_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_PPC_HPP
|
34
35 class LIR_Assembler;
36 class ShenandoahPreBarrierStub;
37 class ShenandoahLoadReferenceBarrierStub;
38 class StubAssembler;
39
40 #endif
41
42 class StubCodeGenerator;
43
44 class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {
45 private:
46
47 /* ==== Actual barrier implementations ==== */
48 void satb_write_barrier_impl(MacroAssembler* masm, DecoratorSet decorators,
49 Register base, RegisterOrConstant ind_or_offs,
50 Register pre_val,
51 Register tmp1, Register tmp2,
52 MacroAssembler::PreservationLevel preservation_level);
53
54 void store_check(MacroAssembler* masm,
55 Register base, RegisterOrConstant ind_or_offs,
56 Register tmp);
57
58 void load_reference_barrier_impl(MacroAssembler* masm, DecoratorSet decorators,
59 Register base, RegisterOrConstant ind_or_offs,
60 Register dst,
61 Register tmp1, Register tmp2,
62 MacroAssembler::PreservationLevel preservation_level);
63
64 /* ==== Helper methods for barrier implementations ==== */
65 void resolve_forward_pointer_not_null(MacroAssembler* masm, Register dst, Register tmp);
66
67 void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
68 Register addr, Register count,
69 Register preserve);
70
71 public:
72 virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; }
73
74 /* ==== C1 stubs ==== */
75 #ifdef COMPILER1
76
77 void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
78
79 void gen_load_reference_barrier_stub(LIR_Assembler* ce, ShenandoahLoadReferenceBarrierStub* stub);
80
81 void generate_c1_pre_barrier_runtime_stub(StubAssembler* sasm);
82
83 void generate_c1_load_reference_barrier_runtime_stub(StubAssembler* sasm, DecoratorSet decorators);
84
85 #endif
86
87 /* ==== Available barriers (facades of the actual implementations) ==== */
88 void satb_write_barrier(MacroAssembler* masm,
89 Register base, RegisterOrConstant ind_or_offs,
90 Register tmp1, Register tmp2, Register tmp3,
91 MacroAssembler::PreservationLevel preservation_level);
92
93 void load_reference_barrier(MacroAssembler* masm, DecoratorSet decorators,
94 Register base, RegisterOrConstant ind_or_offs,
95 Register dst,
96 Register tmp1, Register tmp2,
97 MacroAssembler::PreservationLevel preservation_level);
98
99 /* ==== Helper methods used by C1 and C2 ==== */
100 void cmpxchg_oop(MacroAssembler* masm, Register base_addr, Register expected, Register new_val,
101 Register tmp1, Register tmp2,
102 bool is_cae, Register result);
103
104 /* ==== Access api ==== */
105 virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
106 Register src, Register dst, Register count,
107 Register preserve1, Register preserve2);
108 virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
109 Register dst, Register count,
110 Register preserve);
111
112 virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
113 Register base, RegisterOrConstant ind_or_offs, Register val,
114 Register tmp1, Register tmp2, Register tmp3,
115 MacroAssembler::PreservationLevel preservation_level);
116
117 virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
118 Register base, RegisterOrConstant ind_or_offs, Register dst,
119 Register tmp1, Register tmp2,
120 MacroAssembler::PreservationLevel preservation_level, Label* L_handle_null = nullptr);
121
122 virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register dst, Register jni_env,
123 Register obj, Register tmp, Label& slowpath);
124 };
125
126 #endif // CPU_PPC_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_PPC_HPP
|