aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/pkg/highway/src/detect/s390x.zig
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-07 18:29:21 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-07 18:29:21 +0300
commitdcfe11a7588fcd42471159453810abc9b7720a57 (patch)
treec32a77266028e73ca2382b96c96f8438a5fcd621 /vendor/libghostty-vt/pkg/highway/src/detect/s390x.zig
parent2dfed860103c4e4505ac7f25def9fe37da1e1e6a (diff)
build: update libghostty-vt vendor
vendor ghostty 063ac3e and remove the musl libc++ link workaround. expose the new selection formatter and hyperlink uri apis for follow-up rendering work. add manual artifact validation for static linux builds.
Diffstat (limited to 'vendor/libghostty-vt/pkg/highway/src/detect/s390x.zig')
-rw-r--r--vendor/libghostty-vt/pkg/highway/src/detect/s390x.zig29
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/pkg/highway/src/detect/s390x.zig b/vendor/libghostty-vt/pkg/highway/src/detect/s390x.zig
new file mode 100644
index 00000000..90d2ae3d
--- /dev/null
+++ b/vendor/libghostty-vt/pkg/highway/src/detect/s390x.zig
@@ -0,0 +1,29 @@
+const builtin = @import("builtin");
+const HwyTargets = @import("../targets.zig").Targets;
+const linux = @import("linux.zig");
+
+pub fn detect() i64 {
+ var t: HwyTargets = .{};
+
+ if (comptime builtin.os.tag != .linux) return @bitCast(t);
+
+ const AT_HWCAP: usize = 16;
+ const hwcap = linux.getauxval(AT_HWCAP);
+
+ // From Linux arch/s390/include/asm/elf.h
+ const HWCAP_VX: usize = 1 << 11;
+ const HWCAP_VXE: usize = 1 << 13; // z14
+ const HWCAP_VXE2: usize = 1 << 15; // z15
+
+ if (hwcap & HWCAP_VX != 0) {
+ if (hwcap & HWCAP_VXE != 0) {
+ t.z14 = true;
+
+ if (hwcap & HWCAP_VXE2 != 0) {
+ t.z15 = true;
+ }
+ }
+ }
+
+ return @bitCast(t);
+}