Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions compiler-rt/lib/builtins/cpu_model/aarch64/fmv/android.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ void CONSTRUCTOR_ATTRIBUTE __init_cpu_features(void) {
if (__isExynos9810())
return;

unsigned long hwcap = getauxval(AT_HWCAP);
unsigned long hwcap2 = getauxval(AT_HWCAP2);
unsigned long hwcap2 = getauxval(AT_HWCAP3);
unsigned long hwcap2 = getauxval(AT_HWCAP4);
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are all hwcap2, should be hwcap3/4


__ifunc_arg_t arg;
arg._size = sizeof(__ifunc_arg_t);
arg._hwcap = getauxval(AT_HWCAP);
arg._hwcap2 = getauxval(AT_HWCAP2);
arg._hwcap3 = getauxval(AT_HWCAP3);
arg._hwcap4 = getauxval(AT_HWCAP4);
arg._hwcap = hwcap;
arg._hwcap2 = hwcap2;
arg._hwcap3 = hwcap3;
arg._hwcap4 = hwcap4;
__init_cpu_features_constructor(hwcap | _IFUNC_ARG_HWCAP, &arg);
}
13 changes: 9 additions & 4 deletions compiler-rt/lib/builtins/cpu_model/aarch64/fmv/getauxval.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ void CONSTRUCTOR_ATTRIBUTE __init_cpu_features(void) {
if (__atomic_load_n(&__aarch64_cpu_features.features, __ATOMIC_RELAXED))
return;

unsigned long hwcap = getauxval(AT_HWCAP);
unsigned long hwcap2 = getauxval(AT_HWCAP2);
unsigned long hwcap2 = getauxval(AT_HWCAP3);
Copy link
Collaborator

Choose a reason for hiding this comment

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

same

unsigned long hwcap2 = getauxval(AT_HWCAP4);

__ifunc_arg_t arg;
arg._size = sizeof(__ifunc_arg_t);
arg._hwcap = getauxval(AT_HWCAP);
arg._hwcap2 = getauxval(AT_HWCAP2);
arg._hwcap3 = getauxval(AT_HWCAP3);
arg._hwcap4 = getauxval(AT_HWCAP4);
arg._hwcap = hwcap;
arg._hwcap2 = hwcap2;
arg._hwcap3 = hwcap3;
arg._hwcap4 = hwcap4;
__init_cpu_features_constructor(hwcap | _IFUNC_ARG_HWCAP, &arg);
}