aarch64_feature_flags flags_on;
/* If this feature is turned off, these bits also need to be turned off. */
aarch64_feature_flags flags_off;
- /* Indicates whether this feature is taken into account during native cpu
- detection. */
- bool native_detect_p;
};
/* ISA extensions in AArch64. */
{
#define AARCH64_OPT_EXTENSION(NAME, IDENT, C, D, E, FEATURE_STRING) \
{NAME, AARCH64_FL_##IDENT, feature_deps::IDENT ().explicit_on, \
- feature_deps::get_flags_off (feature_deps::root_off_##IDENT), \
- FEATURE_STRING[0]},
+ feature_deps::get_flags_off (feature_deps::root_off_##IDENT)},
#include "config/aarch64/aarch64-option-extensions.def"
- {NULL, 0, 0, 0, false}
+ {NULL, 0, 0, 0}
};
struct processor_name_to_arch
/* If either crypto flag needs removing here, then both do. */
flags = flags_crypto;
- if (opt.native_detect_p
- && (flags & current_flags & ~isa_flags))
+ if (flags & current_flags & ~isa_flags)
{
current_flags &= ~opt.flags_off;
outstr += "+no";
unsigned int n_variants = 0;
bool processed_exts = false;
aarch64_feature_flags extension_flags = 0;
+ aarch64_feature_flags unchecked_extension_flags = 0;
aarch64_feature_flags default_flags = 0;
std::string buf;
size_t sep_pos = -1;
/* If the feature contains no HWCAPS string then ignore it for the
auto detection. */
if (val.empty ())
- continue;
+ {
+ unchecked_extension_flags |= aarch64_extensions[i].flag;
+ continue;
+ }
bool enabled = true;
if (n_cores == 0
|| n_cores > 2
|| (n_cores == 1 && n_variants != 1)
- || imp == INVALID_IMP)
+ || imp == INVALID_IMP
+ || !processed_exts)
goto not_found;
/* Simple case, one core type or just looking for the arch. */
if (tune)
return res;
+ /* Add any features that should be be present, but can't be verified using
+ the /proc/cpuinfo "Features" list. */
+ extension_flags |= unchecked_extension_flags & default_flags;
+
{
std::string extension
= aarch64_get_extension_string_for_isa_flags (extension_flags,