Skip to content

Commit ea443d5

Browse files
authored
[FMV][AArch64] Remove last of MRS bits and rename file (#161585)
474f5d2 removed the last bits reading from system registers so remove the last bits utilizing MRS and rename the file to hwcap as the code is now only decoding the hwcap flags.
1 parent 2b2bc63 commit ea443d5

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

compiler-rt/lib/builtins/cpu_model/aarch64.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ struct {
6969
#if defined(__APPLE__)
7070
#include "aarch64/fmv/apple.inc"
7171
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
72-
#include "aarch64/fmv/mrs.inc"
72+
#include "aarch64/fmv/hwcap.inc"
7373
#include "aarch64/fmv/elf_aux_info.inc"
7474
#elif defined(__Fuchsia__)
7575
#include "aarch64/fmv/fuchsia.inc"
7676
#elif defined(__ANDROID__)
77-
#include "aarch64/fmv/mrs.inc"
77+
#include "aarch64/fmv/hwcap.inc"
7878
#include "aarch64/fmv/android.inc"
7979
#elif defined(__linux__) && __has_include(<sys/auxv.h>)
80-
#include "aarch64/fmv/mrs.inc"
80+
#include "aarch64/fmv/hwcap.inc"
8181
#include "aarch64/fmv/getauxval.inc"
8282
#elif defined(_WIN32)
8383
#include "aarch64/fmv/windows.inc"

compiler-rt/lib/builtins/cpu_model/aarch64/fmv/mrs.inc renamed to compiler-rt/lib/builtins/cpu_model/aarch64/fmv/hwcap.inc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ static void __init_cpu_features_constructor(unsigned long hwcap,
77
const __ifunc_arg_t *arg) {
88
unsigned long long feat = 0;
99
#define setCPUFeature(F) feat |= 1ULL << F
10-
#define getCPUFeature(id, ftr) __asm__("mrs %0, " #id : "=r"(ftr))
11-
#define extractBits(val, start, number) \
12-
(val & ((1ULL << number) - 1ULL) << start) >> start
1310
unsigned long hwcap2 = 0;
1411
if (hwcap & _IFUNC_ARG_HWCAP)
1512
hwcap2 = arg->_hwcap2;

0 commit comments

Comments
 (0)