summaryrefslogtreecommitdiff
path: root/neozip/cpu_features.c
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 19:56:09 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 19:56:09 +0300
commit7fb132859fda54aa96bc9dd46d302b343eeb5a02 (patch)
treeb43ae77d7451fb470a260c03349a1caf2846c5e5 /neozip/cpu_features.c
parentb1e34e861b5d732afe828d58aad2c638135061fd (diff)
parentc2712b8a345191f6ed79558c089777df94590087 (diff)
downloadProject-Tick-7fb132859fda54aa96bc9dd46d302b343eeb5a02.tar.gz
Project-Tick-7fb132859fda54aa96bc9dd46d302b343eeb5a02.zip
Add 'neozip/' from commit 'c2712b8a345191f6ed79558c089777df94590087'
git-subtree-dir: neozip git-subtree-mainline: b1e34e861b5d732afe828d58aad2c638135061fd git-subtree-split: c2712b8a345191f6ed79558c089777df94590087
Diffstat (limited to 'neozip/cpu_features.c')
-rw-r--r--neozip/cpu_features.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/neozip/cpu_features.c b/neozip/cpu_features.c
new file mode 100644
index 0000000000..fde6519290
--- /dev/null
+++ b/neozip/cpu_features.c
@@ -0,0 +1,25 @@
+/* cpu_features.c -- CPU architecture feature check
+ * Copyright (C) 2017 Hans Kristian Rosbach
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "zbuild.h"
+#include "cpu_features.h"
+#include <string.h>
+
+Z_INTERNAL void cpu_check_features(struct cpu_features *features) {
+ memset(features, 0, sizeof(struct cpu_features));
+#if defined(X86_FEATURES)
+ x86_check_features(&features->x86);
+#elif defined(ARM_FEATURES)
+ arm_check_features(&features->arm);
+#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
+ power_check_features(&features->power);
+#elif defined(S390_FEATURES)
+ s390_check_features(&features->s390);
+#elif defined(RISCV_FEATURES)
+ riscv_check_features(&features->riscv);
+#elif defined(LOONGARCH_FEATURES)
+ loongarch_check_features(&features->loongarch);
+#endif
+}