Skip to content

Commit 905c2c3

Browse files
rth7680pm215
authored andcommitted
target/arm: Rename isar_feature_aa64_atomics
This is FEAT_LSE -- rename the predicate to match. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20250830045006.380393-1-richard.henderson@linaro.org Message-id: 20250815122653.701782-6-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
1 parent 092ac24 commit 905c2c3

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

bsd-user/aarch64/target_arch_elf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static uint32_t get_elf_hwcap(void)
114114
GET_FEATURE_ID(aa64_sm3, ARM_HWCAP_A64_SM3);
115115
GET_FEATURE_ID(aa64_sm4, ARM_HWCAP_A64_SM4);
116116
GET_FEATURE_ID(aa64_fp16, ARM_HWCAP_A64_FPHP | ARM_HWCAP_A64_ASIMDHP);
117-
GET_FEATURE_ID(aa64_atomics, ARM_HWCAP_A64_ATOMICS);
117+
GET_FEATURE_ID(aa64_lse, ARM_HWCAP_A64_ATOMICS);
118118
GET_FEATURE_ID(aa64_rdm, ARM_HWCAP_A64_ASIMDRDM);
119119
GET_FEATURE_ID(aa64_dp, ARM_HWCAP_A64_ASIMDDP);
120120
GET_FEATURE_ID(aa64_fcma, ARM_HWCAP_A64_FCMA);

linux-user/aarch64/elfload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ abi_ulong get_elf_hwcap(CPUState *cs)
154154
GET_FEATURE_ID(aa64_sm3, ARM_HWCAP_A64_SM3);
155155
GET_FEATURE_ID(aa64_sm4, ARM_HWCAP_A64_SM4);
156156
GET_FEATURE_ID(aa64_fp16, ARM_HWCAP_A64_FPHP | ARM_HWCAP_A64_ASIMDHP);
157-
GET_FEATURE_ID(aa64_atomics, ARM_HWCAP_A64_ATOMICS);
157+
GET_FEATURE_ID(aa64_lse, ARM_HWCAP_A64_ATOMICS);
158158
GET_FEATURE_ID(aa64_lse2, ARM_HWCAP_A64_USCAT);
159159
GET_FEATURE_ID(aa64_rdm, ARM_HWCAP_A64_ASIMDRDM);
160160
GET_FEATURE_ID(aa64_dp, ARM_HWCAP_A64_ASIMDDP);

target/arm/cpu-features.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static inline bool isar_feature_aa64_crc32(const ARMISARegisters *id)
406406
return FIELD_EX64_IDREG(id, ID_AA64ISAR0, CRC32) != 0;
407407
}
408408

409-
static inline bool isar_feature_aa64_atomics(const ARMISARegisters *id)
409+
static inline bool isar_feature_aa64_lse(const ARMISARegisters *id)
410410
{
411411
return FIELD_EX64_IDREG(id, ID_AA64ISAR0, ATOMIC) >= 2;
412412
}

target/arm/tcg/translate-a64.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3237,7 +3237,7 @@ static bool trans_LDXP(DisasContext *s, arg_stxr *a)
32373237

32383238
static bool trans_CASP(DisasContext *s, arg_CASP *a)
32393239
{
3240-
if (!dc_isar_feature(aa64_atomics, s)) {
3240+
if (!dc_isar_feature(aa64_lse, s)) {
32413241
return false;
32423242
}
32433243
if (((a->rt | a->rs) & 1) != 0) {
@@ -3250,7 +3250,7 @@ static bool trans_CASP(DisasContext *s, arg_CASP *a)
32503250

32513251
static bool trans_CAS(DisasContext *s, arg_CAS *a)
32523252
{
3253-
if (!dc_isar_feature(aa64_atomics, s)) {
3253+
if (!dc_isar_feature(aa64_lse, s)) {
32543254
return false;
32553255
}
32563256
gen_compare_and_swap(s, a->rs, a->rt, a->rn, a->sz);
@@ -3743,23 +3743,23 @@ static bool do_atomic_ld(DisasContext *s, arg_atomic *a, AtomicThreeOpFn *fn,
37433743
return true;
37443744
}
37453745

3746-
TRANS_FEAT(LDADD, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_fetch_add_i64, 0, false)
3747-
TRANS_FEAT(LDCLR, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_fetch_and_i64, 0, true)
3748-
TRANS_FEAT(LDEOR, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_fetch_xor_i64, 0, false)
3749-
TRANS_FEAT(LDSET, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_fetch_or_i64, 0, false)
3750-
TRANS_FEAT(LDSMAX, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_fetch_smax_i64, MO_SIGN, false)
3751-
TRANS_FEAT(LDSMIN, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_fetch_smin_i64, MO_SIGN, false)
3752-
TRANS_FEAT(LDUMAX, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_fetch_umax_i64, 0, false)
3753-
TRANS_FEAT(LDUMIN, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_fetch_umin_i64, 0, false)
3754-
TRANS_FEAT(SWP, aa64_atomics, do_atomic_ld, a, tcg_gen_atomic_xchg_i64, 0, false)
3746+
TRANS_FEAT(LDADD, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_fetch_add_i64, 0, false)
3747+
TRANS_FEAT(LDCLR, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_fetch_and_i64, 0, true)
3748+
TRANS_FEAT(LDEOR, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_fetch_xor_i64, 0, false)
3749+
TRANS_FEAT(LDSET, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_fetch_or_i64, 0, false)
3750+
TRANS_FEAT(LDSMAX, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_fetch_smax_i64, MO_SIGN, false)
3751+
TRANS_FEAT(LDSMIN, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_fetch_smin_i64, MO_SIGN, false)
3752+
TRANS_FEAT(LDUMAX, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_fetch_umax_i64, 0, false)
3753+
TRANS_FEAT(LDUMIN, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_fetch_umin_i64, 0, false)
3754+
TRANS_FEAT(SWP, aa64_lse, do_atomic_ld, a, tcg_gen_atomic_xchg_i64, 0, false)
37553755

37563756
static bool trans_LDAPR(DisasContext *s, arg_LDAPR *a)
37573757
{
37583758
bool iss_sf = ldst_iss_sf(a->sz, false, false);
37593759
TCGv_i64 clean_addr;
37603760
MemOp mop;
37613761

3762-
if (!dc_isar_feature(aa64_atomics, s) ||
3762+
if (!dc_isar_feature(aa64_lse, s) ||
37633763
!dc_isar_feature(aa64_rcpc_8_3, s)) {
37643764
return false;
37653765
}

0 commit comments

Comments
 (0)