llvm/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c

// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include "../cpu_model/aarch64.h"

struct FEATURES {
  unsigned long long features;
};

extern struct FEATURES __aarch64_cpu_features;

CONSTRUCTOR_ATTRIBUTE static void get_aarch64_cpu_features(void) {
  if (__atomic_load_n(&__aarch64_cpu_features.features, __ATOMIC_RELAXED))
    return;

  __init_cpu_features();
}