diff --git a/GNUmakefile b/GNUmakefile index 3ece2acd..a2281ed1 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -35,7 +35,7 @@ IS_X64 := $(shell uname -m | $(GREP) -i -c -E "(_64|d64)") IS_PPC := $(shell uname -m | $(GREP) -i -c "ppc|power") IS_ARM32 := $(shell uname -m | $(GREP) -i -c '\') IS_ARM64 := $(shell uname -m | $(GREP) -i -c 'aarch64') -IS_ARMV8 ?= $(shell uname -m | $(GREP) -i -c 'aarch32|aarch64') +IS_ARMV8 ?= $(shell uname -m | $(GREP) -i -c -E 'aarch32|aarch64') IS_NEON ?= $(shell uname -m | $(GREP) -i -c -E 'armv7|armv8|aarch32|aarch64') IS_SPARC := $(shell uname -m | $(GREP) -i -c "sparc") IS_SPARC64 := $(shell uname -m | $(GREP) -i -c "sparc64") diff --git a/cpu.h b/cpu.h index 9757e197..1d53ad73 100644 --- a/cpu.h +++ b/cpu.h @@ -300,9 +300,13 @@ inline bool HasNEON() //! \note This function is only available on ARM-32, Aarch32 and Aarch64 platforms inline bool HasPMULL() { +#if defined(__aarch32__) || defined(__aarch64__) if (!g_ArmDetectionDone) DetectArmFeatures(); return g_hasPMULL; +#else + return false; +#endif } //! \brief Determine if an ARM processor has CRC32 available