Skip to content

Commit e709cb0

Browse files
author
Thomas Schatzl
committed
8283186: Explicitly pass a third temp register to MacroAssembler::store_heap_oop
Reviewed-by: eosterlund
1 parent 83a1c90 commit e709cb0

16 files changed

+56
-56
lines changed

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,14 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
342342
}
343343

344344
void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
345-
Address dst, Register val, Register tmp1, Register tmp2) {
345+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
346346
bool in_heap = (decorators & IN_HEAP) != 0;
347347
bool as_normal = (decorators & AS_NORMAL) != 0;
348348
assert((decorators & IS_DEST_UNINITIALIZED) == 0, "unsupported");
349349

350350
bool needs_pre_barrier = as_normal;
351351
bool needs_post_barrier = val != noreg && in_heap;
352352

353-
Register tmp3 = LP64_ONLY(r8) NOT_LP64(rsi);
354353
Register rthread = LP64_ONLY(r15_thread) NOT_LP64(rcx);
355354
// flatten object address if needed
356355
// We do it regardless of precise because we need the registers
@@ -379,7 +378,7 @@ void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet deco
379378
false /* expand_call */);
380379
}
381380
if (val == noreg) {
382-
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg);
381+
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg, noreg);
383382
} else {
384383
Register new_val = val;
385384
if (needs_post_barrier) {
@@ -389,7 +388,7 @@ void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet deco
389388
__ movptr(new_val, val);
390389
}
391390
}
392-
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg);
391+
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg, noreg);
393392
if (needs_post_barrier) {
394393
g1_write_barrier_post(masm /*masm*/,
395394
tmp1 /* store_adr */,

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class G1BarrierSetAssembler: public ModRefBarrierSetAssembler {
5454
Register tmp2);
5555

5656
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
57-
Address dst, Register val, Register tmp1, Register tmp2);
57+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
5858

5959
public:
6060
void gen_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub);

src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators,
103103
}
104104

105105
void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
106-
Address dst, Register val, Register tmp1, Register tmp2) {
106+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
107107
bool in_heap = (decorators & IN_HEAP) != 0;
108108
bool in_native = (decorators & IN_NATIVE) != 0;
109109
bool is_not_null = (decorators & IS_NOT_NULL) != 0;

src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class BarrierSetAssembler: public CHeapObj<mtGC> {
4747
virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
4848
Register dst, Address src, Register tmp1, Register tmp_thread);
4949
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
50-
Address dst, Register val, Register tmp1, Register tmp2);
50+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
5151

5252
// Support for jniFastGetField to try resolving a jobject/jweak in native
5353
virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,

src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register ob
128128
}
129129

130130
void CardTableBarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
131-
Address dst, Register val, Register tmp1, Register tmp2) {
131+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
132132
bool in_heap = (decorators & IN_HEAP) != 0;
133133

134134
bool is_array = (decorators & IS_ARRAY) != 0;
@@ -137,7 +137,7 @@ void CardTableBarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorS
137137

138138
bool needs_post_barrier = val != noreg && in_heap;
139139

140-
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, noreg, noreg);
140+
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, noreg, noreg, noreg);
141141
if (needs_post_barrier) {
142142
// flatten object address if needed
143143
if (!precise || (dst.index() == noreg && dst.disp() == 0)) {

src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CardTableBarrierSetAssembler: public ModRefBarrierSetAssembler {
3535
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators, Register addr, Register count, Register tmp);
3636

3737
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
38-
Address dst, Register val, Register tmp1, Register tmp2);
38+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
3939
};
4040

4141
#endif // CPU_X86_GC_SHARED_CARDTABLEBARRIERSETASSEMBLER_X86_HPP

src/hotspot/cpu/x86/gc/shared/modRefBarrierSetAssembler_x86.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Decorat
8484
}
8585

8686
void ModRefBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
87-
Address dst, Register val, Register tmp1, Register tmp2) {
87+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
8888
if (is_reference_type(type)) {
89-
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2);
89+
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
9090
} else {
91-
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
91+
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
9292
}
9393
}

src/hotspot/cpu/x86/gc/shared/modRefBarrierSetAssembler_x86.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ class ModRefBarrierSetAssembler: public BarrierSetAssembler {
3939
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
4040
Register addr, Register count, Register tmp) {}
4141
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
42-
Address dst, Register val, Register tmp1, Register tmp2) = 0;
42+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) = 0;
4343
public:
4444
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
4545
Register src, Register dst, Register count);
4646
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
4747
Register src, Register dst, Register count);
4848

4949
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
50-
Address dst, Register val, Register tmp1, Register tmp2);
50+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
5151
};
5252

5353
#endif // CPU_X86_GC_SHARED_MODREFBARRIERSETASSEMBLER_X86_HPP

src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,15 +591,14 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
591591
}
592592

593593
void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
594-
Address dst, Register val, Register tmp1, Register tmp2) {
594+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
595595

596596
bool on_oop = is_reference_type(type);
597597
bool in_heap = (decorators & IN_HEAP) != 0;
598598
bool as_normal = (decorators & AS_NORMAL) != 0;
599599
if (on_oop && in_heap) {
600600
bool needs_pre_barrier = as_normal;
601601

602-
Register tmp3 = LP64_ONLY(r8) NOT_LP64(rsi);
603602
Register rthread = LP64_ONLY(r15_thread) NOT_LP64(rcx);
604603
// flatten object address if needed
605604
// We do it regardless of precise because we need the registers
@@ -629,14 +628,14 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet
629628
false /* expand_call */);
630629
}
631630
if (val == noreg) {
632-
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg);
631+
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg, noreg);
633632
} else {
634633
iu_barrier(masm, val, tmp3);
635-
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg);
634+
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg, noreg);
636635
}
637636
NOT_LP64(imasm->restore_bcp());
638637
} else {
639-
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
638+
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
640639
}
641640
}
642641

src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {
7777
virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
7878
Register dst, Address src, Register tmp1, Register tmp_thread);
7979
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
80-
Address dst, Register val, Register tmp1, Register tmp2);
80+
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
8181
virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
8282
Register obj, Register tmp, Label& slowpath);
8383
};

0 commit comments

Comments
 (0)