Skip to content

Commit f215899

Browse files
committed
8331393: AArch64: u32 _partial_subtype_ctr loaded/stored as 64
Reviewed-by: aph, fyang
1 parent b96b38c commit f215899

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,11 +1560,7 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
15601560
}
15611561

15621562
#ifndef PRODUCT
1563-
mov(rscratch2, (address)&SharedRuntime::_partial_subtype_ctr);
1564-
Address pst_counter_addr(rscratch2);
1565-
ldr(rscratch1, pst_counter_addr);
1566-
add(rscratch1, rscratch1, 1);
1567-
str(rscratch1, pst_counter_addr);
1563+
incrementw(ExternalAddress((address)&SharedRuntime::_partial_subtype_ctr));
15681564
#endif //PRODUCT
15691565

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

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,7 @@ class StubGenerator: public StubCodeGenerator {
8686
#define inc_counter_np(counter) ((void)0)
8787
#else
8888
void inc_counter_np_(uint& counter) {
89-
__ lea(rscratch2, ExternalAddress((address)&counter));
90-
__ ldrw(rscratch1, Address(rscratch2));
91-
__ addw(rscratch1, rscratch1, 1);
92-
__ strw(rscratch1, Address(rscratch2));
89+
__ incrementw(ExternalAddress((address)&counter));
9390
}
9491
#define inc_counter_np(counter) \
9592
BLOCK_COMMENT("inc_counter " #counter); \

0 commit comments

Comments
 (0)