Skip to content

Commit

Permalink
8284990: AArch64: Remove STXR_PREFETCH from CPU features
Browse files Browse the repository at this point in the history
Reviewed-by: aph, ngasson, njian
  • Loading branch information
e1iu authored and nick-arm committed Jul 27, 2022
1 parent 2a1d9cf commit 2bd90c2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
18 changes: 6 additions & 12 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1892,8 +1892,7 @@ void MacroAssembler::atomic_incw(Register counter_addr, Register tmp, Register t
return;
}
Label retry_load;
if (VM_Version::supports_stxr_prefetch())
prfm(Address(counter_addr), PSTL1STRM);
prfm(Address(counter_addr), PSTL1STRM);
bind(retry_load);
// flush and load exclusive from the memory location
ldxrw(tmp, counter_addr);
Expand Down Expand Up @@ -2627,8 +2626,7 @@ void MacroAssembler::cmpxchgptr(Register oldv, Register newv, Register addr, Reg
membar(AnyAny);
} else {
Label retry_load, nope;
if (VM_Version::supports_stxr_prefetch())
prfm(Address(addr), PSTL1STRM);
prfm(Address(addr), PSTL1STRM);
bind(retry_load);
// flush and load exclusive from the memory location
// and fail if it is not what we expect
Expand Down Expand Up @@ -2670,8 +2668,7 @@ void MacroAssembler::cmpxchgw(Register oldv, Register newv, Register addr, Regis
membar(AnyAny);
} else {
Label retry_load, nope;
if (VM_Version::supports_stxr_prefetch())
prfm(Address(addr), PSTL1STRM);
prfm(Address(addr), PSTL1STRM);
bind(retry_load);
// flush and load exclusive from the memory location
// and fail if it is not what we expect
Expand Down Expand Up @@ -2712,8 +2709,7 @@ void MacroAssembler::cmpxchg(Register addr, Register expected,
compare_eq(result, expected, size);
} else {
Label retry_load, done;
if (VM_Version::supports_stxr_prefetch())
prfm(Address(addr), PSTL1STRM);
prfm(Address(addr), PSTL1STRM);
bind(retry_load);
load_exclusive(result, addr, size, acquire);
compare_eq(result, expected, size);
Expand Down Expand Up @@ -2771,8 +2767,7 @@ void MacroAssembler::atomic_##NAME(Register prev, RegisterOrConstant incr, Regis
result = different(prev, incr, addr) ? prev : rscratch2; \
\
Label retry_load; \
if (VM_Version::supports_stxr_prefetch()) \
prfm(Address(addr), PSTL1STRM); \
prfm(Address(addr), PSTL1STRM); \
bind(retry_load); \
LDXR(result, addr); \
OP(rscratch1, result, incr); \
Expand Down Expand Up @@ -2802,8 +2797,7 @@ void MacroAssembler::atomic_##OP(Register prev, Register newv, Register addr) {
result = different(prev, newv, addr) ? prev : rscratch2; \
\
Label retry_load; \
if (VM_Version::supports_stxr_prefetch()) \
prfm(Address(addr), PSTL1STRM); \
prfm(Address(addr), PSTL1STRM); \
bind(retry_load); \
LDXR(result, addr); \
STXR(rscratch1, newv, addr); \
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ void VM_Version::initialize() {
}
}

if (_cpu == CPU_ARM && (_model == 0xd07 || _model2 == 0xd07)) _features |= CPU_STXR_PREFETCH;

char buf[512];
sprintf(buf, "0x%02x:0x%x:0x%03x:%d", _cpu, _variant, _model, _revision);
if (_model2) sprintf(buf+strlen(buf), "(0x%03x)", _model2);
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class VM_Version : public Abstract_VM_Version {
/* flags above must follow Linux HWCAP */ \
decl(SVEBITPERM, svebitperm, 27) \
decl(SVE2, sve2, 28) \
decl(STXR_PREFETCH, stxr_prefetch, 29) \
decl(A53MAC, a53mac, 31)

enum Feature_Flag {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ public enum CPUFeature implements CPUFeatureName {
PACA,
SVEBITPERM,
SVE2,
STXR_PREFETCH,
A53MAC,
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -68,7 +68,6 @@ class AArch64HotSpotVMConfig extends HotSpotVMConfigAccess {
final long aarch64SHA2 = getConstant("VM_Version::CPU_SHA2", Long.class);
final long aarch64CRC32 = getConstant("VM_Version::CPU_CRC32", Long.class);
final long aarch64LSE = getConstant("VM_Version::CPU_LSE", Long.class);
final long aarch64STXR_PREFETCH = getConstant("VM_Version::CPU_STXR_PREFETCH", Long.class);
final long aarch64A53MAC = getConstant("VM_Version::CPU_A53MAC", Long.class);
// Checkstyle: resume
}

1 comment on commit 2bd90c2

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.