mirror of
https://github.com/intel/isa-l.git
synced 2024-12-13 09:52:56 +01:00
Include hwcap.h only in C compilation
Change-Id: I08a75896ebd49634f31a80ed37acf2a1267fe156 Signed-off-by: Taiju Yamada <tyamada@bi.a.u-tokyo.ac.jp>
This commit is contained in:
parent
c2bec3ea65
commit
ad39d7ccfd
@ -31,13 +31,6 @@
|
||||
#ifndef __aarch64__
|
||||
#error "This file is for aarch64 only"
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
#define SYSCTL_PMULL_KEY "hw.optional.arm.FEAT_PMULL" // from macOS 12 FEAT_* sysctl infos are available
|
||||
#define SYSCTL_CRC32_KEY "hw.optional.armv8_crc32"
|
||||
#define SYSCTL_SVE_KEY "hw.optional.arm.FEAT_SVE" // this one is just a guess and need to check macOS update
|
||||
#else
|
||||
#include <asm/hwcap.h>
|
||||
#endif
|
||||
#include "aarch64_label.h"
|
||||
#ifdef __ASSEMBLY__
|
||||
/**
|
||||
@ -221,7 +214,11 @@
|
||||
#include <stdint.h>
|
||||
#if defined(__linux__)
|
||||
#include <sys/auxv.h>
|
||||
#include <asm/hwcap.h>
|
||||
#elif defined(__APPLE__)
|
||||
#define SYSCTL_PMULL_KEY "hw.optional.arm.FEAT_PMULL" // from macOS 12 FEAT_* sysctl infos are available
|
||||
#define SYSCTL_CRC32_KEY "hw.optional.armv8_crc32"
|
||||
#define SYSCTL_SVE_KEY "hw.optional.arm.FEAT_SVE" // this one is just a guess and need to check macOS update
|
||||
#include <sys/sysctl.h>
|
||||
#include <stddef.h>
|
||||
static inline int sysctlEnabled(const char* name){
|
||||
|
Loading…
Reference in New Issue
Block a user