@@ -282,24 +282,25 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
282
282
}
283
283
284
284
__ push_call_clobbered_registers ();
285
+ address target = NULL ;
285
286
if (is_strong) {
286
287
if (is_narrow) {
287
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong_narrow) );
288
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong_narrow);
288
289
} else {
289
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong) );
290
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong);
290
291
}
291
292
} else if (is_weak) {
292
293
if (is_narrow) {
293
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak_narrow) );
294
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak_narrow);
294
295
} else {
295
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak) );
296
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak);
296
297
}
297
298
} else {
298
299
assert (is_phantom, " only remaining strength" );
299
300
assert (!is_narrow, " phantom access cannot be narrow" );
300
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak) );
301
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak);
301
302
}
302
- __ jalr (ra );
303
+ __ call (target );
303
304
__ mv (t0, x10);
304
305
__ pop_call_clobbered_registers ();
305
306
__ mv (x10, t0);
@@ -679,29 +680,30 @@ void ShenandoahBarrierSetAssembler::generate_c1_load_reference_barrier_runtime_s
679
680
bool is_weak = ShenandoahBarrierSet::is_weak_access (decorators);
680
681
bool is_phantom = ShenandoahBarrierSet::is_phantom_access (decorators);
681
682
bool is_native = ShenandoahBarrierSet::is_native_access (decorators);
683
+ address target = NULL ;
682
684
if (is_strong) {
683
685
if (is_native) {
684
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong) );
686
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong);
685
687
} else {
686
688
if (UseCompressedOops) {
687
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong_narrow) );
689
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong_narrow);
688
690
} else {
689
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong) );
691
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_strong);
690
692
}
691
693
}
692
694
} else if (is_weak) {
693
695
assert (!is_native, " weak must not be called off-heap" );
694
696
if (UseCompressedOops) {
695
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak_narrow) );
697
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak_narrow);
696
698
} else {
697
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak) );
699
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_weak);
698
700
}
699
701
} else {
700
702
assert (is_phantom, " only remaining strength" );
701
703
assert (is_native, " phantom must only be called off-heap" );
702
- __ mv (ra, CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_phantom) );
704
+ target = CAST_FROM_FN_PTR (address, ShenandoahRuntime::load_reference_barrier_phantom);
703
705
}
704
- __ jalr (ra );
706
+ __ call (target );
705
707
__ mv (t0, x10);
706
708
__ pop_call_clobbered_registers ();
707
709
__ mv (x10, t0);
1 commit comments
openjdk-notifier[bot] commentedon Sep 29, 2022
Review
Issues