sme-abi-vg.c 606 B

123456789101112131415161718192021
  1. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  2. // See https://llvm.org/LICENSE.txt for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #include "../cpu_model/aarch64.h"
  5. struct FEATURES {
  6. unsigned long long features;
  7. };
  8. extern struct FEATURES __aarch64_cpu_features;
  9. #if __GNUC__ >= 9
  10. #pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
  11. #endif
  12. __attribute__((constructor(90))) static void get_aarch64_cpu_features(void) {
  13. if (__atomic_load_n(&__aarch64_cpu_features.features, __ATOMIC_RELAXED))
  14. return;
  15. __init_cpu_features();
  16. }