summaryrefslogtreecommitdiff
path: root/neozip/arch/arm/arm_natives.h
diff options
context:
space:
mode:
Diffstat (limited to 'neozip/arch/arm/arm_natives.h')
-rw-r--r--neozip/arch/arm/arm_natives.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/neozip/arch/arm/arm_natives.h b/neozip/arch/arm/arm_natives.h
new file mode 100644
index 0000000000..311e33e958
--- /dev/null
+++ b/neozip/arch/arm/arm_natives.h
@@ -0,0 +1,31 @@
+/* arm_natives.h -- ARM compile-time feature detection macros.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#ifndef ARM_NATIVES_H_
+#define ARM_NATIVES_H_
+
+#if defined(__ARM_FEATURE_SIMD32)
+# ifdef ARM_SIMD
+# define ARM_SIMD_NATIVE
+# endif
+#endif
+/* NEON is guaranteed on ARM64 (like SSE2 on x86-64) */
+#if defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(ARCH_64BIT)
+# ifdef ARM_NEON
+# define ARM_NEON_NATIVE
+# endif
+#endif
+/* CRC32 is optional in ARMv8.0, mandatory in ARMv8.1+ */
+#if defined(__ARM_FEATURE_CRC32) || (defined(__ARM_ARCH) && __ARM_ARCH >= 801)
+# ifdef ARM_CRC32
+# define ARM_CRC32_NATIVE
+# endif
+#endif
+#if defined(__ARM_FEATURE_CRC32) && defined(__ARM_FEATURE_CRYPTO) && defined(__ARM_FEATURE_SHA3)
+# ifdef ARM_PMULL_EOR3
+# define ARM_PMULL_EOR3_NATIVE
+# endif
+#endif
+
+#endif /* ARM_NATIVES_H_ */