Skip to content

Commit 5ab8713

Browse files
committedMay 2, 2024
8331360: RISCV: u32 _partial_subtype_ctr loaded/stored as 64
Reviewed-by: fyang, mli, tonyp
1 parent 19e46ee commit 5ab8713

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed
 

‎src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -3344,11 +3344,7 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
33443344
mv(x10, super_klass);
33453345

33463346
#ifndef PRODUCT
3347-
mv(t1, (address)&SharedRuntime::_partial_subtype_ctr);
3348-
Address pst_counter_addr(t1);
3349-
ld(t0, pst_counter_addr);
3350-
add(t0, t0, 1);
3351-
sd(t0, pst_counter_addr);
3347+
incrementw(ExternalAddress((address)&SharedRuntime::_partial_subtype_ctr));
33523348
#endif // PRODUCT
33533349

33543350
// We will consult the secondary-super array.

‎src/hotspot/cpu/riscv/stubGenerator_riscv.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ class StubGenerator: public StubCodeGenerator {
7777
#define inc_counter_np(counter) ((void)0)
7878
#else
7979
void inc_counter_np_(uint& counter) {
80-
__ la(t1, ExternalAddress((address)&counter));
81-
__ lwu(t0, Address(t1, 0));
82-
__ addiw(t0, t0, 1);
83-
__ sw(t0, Address(t1, 0));
80+
__ incrementw(ExternalAddress((address)&counter));
8481
}
8582
#define inc_counter_np(counter) \
8683
BLOCK_COMMENT("inc_counter " #counter); \

0 commit comments

Comments
 (0)
Please sign in to comment.