Fix IS_ARMV8 in GNUmakefile

Fix guard for HasPMULL()
pull/482/head
Jeffrey Walton 2017-08-30 10:00:46 -04:00
parent 1aecb3d4ad
commit b2693c4327
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 5 additions and 1 deletions

View File

@ -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_PPC := $(shell uname -m | $(GREP) -i -c "ppc|power")
IS_ARM32 := $(shell uname -m | $(GREP) -i -c '\<arm\>') IS_ARM32 := $(shell uname -m | $(GREP) -i -c '\<arm\>')
IS_ARM64 := $(shell uname -m | $(GREP) -i -c 'aarch64') 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_NEON ?= $(shell uname -m | $(GREP) -i -c -E 'armv7|armv8|aarch32|aarch64')
IS_SPARC := $(shell uname -m | $(GREP) -i -c "sparc") IS_SPARC := $(shell uname -m | $(GREP) -i -c "sparc")
IS_SPARC64 := $(shell uname -m | $(GREP) -i -c "sparc64") IS_SPARC64 := $(shell uname -m | $(GREP) -i -c "sparc64")

4
cpu.h
View File

@ -300,9 +300,13 @@ inline bool HasNEON()
//! \note This function is only available on ARM-32, Aarch32 and Aarch64 platforms //! \note This function is only available on ARM-32, Aarch32 and Aarch64 platforms
inline bool HasPMULL() inline bool HasPMULL()
{ {
#if defined(__aarch32__) || defined(__aarch64__)
if (!g_ArmDetectionDone) if (!g_ArmDetectionDone)
DetectArmFeatures(); DetectArmFeatures();
return g_hasPMULL; return g_hasPMULL;
#else
return false;
#endif
} }
//! \brief Determine if an ARM processor has CRC32 available //! \brief Determine if an ARM processor has CRC32 available