summaryrefslogtreecommitdiff
path: root/neozip/arch/s390/s390_features.c
diff options
context:
space:
mode:
Diffstat (limited to 'neozip/arch/s390/s390_features.c')
-rw-r--r--neozip/arch/s390/s390_features.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/neozip/arch/s390/s390_features.c b/neozip/arch/s390/s390_features.c
new file mode 100644
index 0000000000..dabb578a07
--- /dev/null
+++ b/neozip/arch/s390/s390_features.c
@@ -0,0 +1,18 @@
+#ifdef S390_FEATURES
+
+#include "zbuild.h"
+#include "s390_features.h"
+
+#ifdef HAVE_SYS_AUXV_H
+# include <sys/auxv.h>
+#endif
+
+#ifndef HWCAP_S390_VXRS
+#define HWCAP_S390_VXRS (1 << 11)
+#endif
+
+void Z_INTERNAL s390_check_features(struct s390_cpu_features *features) {
+ features->has_vx = getauxval(AT_HWCAP) & HWCAP_S390_VXRS;
+}
+
+#endif