From b2693c4327c89f0d5c43d7050833ff95d6d7015c Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 30 Aug 2017 10:00:46 -0400 Subject: [PATCH] Fix IS_ARMV8 in GNUmakefile Fix guard for HasPMULL() --- GNUmakefile | 2 +- cpu.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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