diff options
| author | GasInfinity <me@gasinfinity.dev> | 2025-08-20 22:53:36 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-08-22 04:14:53 +0200 |
| commit | cc71936eb9ddb94b163b296e5a8e8c3f2f7c87d4 (patch) | |
| tree | b066aa40763dd0bb8bde5cc2660b60cbff19bce9 /lib/std | |
| parent | 55daefdb108ea0bf0406dcc3e0569f7b72c639b3 (diff) | |
| download | zig-cc71936eb9ddb94b163b296e5a8e8c3f2f7c87d4.tar.gz zig-cc71936eb9ddb94b163b296e5a8e8c3f2f7c87d4.zip | |
feat(std.Target): add 3ds os
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/Target.zig | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 2aa3e0a70c..3ec14336c8 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -50,6 +50,8 @@ pub const Os = struct { windows, uefi, + @"3ds", + ps3, ps4, ps5, @@ -194,6 +196,8 @@ pub const Os = struct { .uefi, + .@"3ds", + .wasi, .amdhsa, @@ -603,7 +607,12 @@ pub const Os = struct { .max = .{ .major = 2, .minor = 11, .patch = 0 }, }, }, - + .@"3ds" => .{ + .semver = .{ + .min = .{ .major = 2, .minor = 27, .patch = 0 }, // 1.0.0-0 + .max = .{ .major = 2, .minor = 58, .patch = 0 }, // 11.17.0-50 + }, + }, .wasi => .{ .semver = .{ .min = .{ .major = 0, .minor = 1, .patch = 0 }, @@ -861,6 +870,7 @@ pub const Abi = enum { .tvos, .visionos, .watchos => if (arch == .x86_64) .simulator else .none, .windows => .gnu, .uefi => .msvc, + .@"3ds" => .eabihf, .wasi, .emscripten => .musl, .contiki, @@ -1828,7 +1838,10 @@ pub const Cpu = struct { pub fn baseline(arch: Arch, os: Os) *const Model { return switch (arch) { .amdgcn => &amdgcn.cpu.gfx906, - .arm, .armeb, .thumb, .thumbeb => &arm.cpu.baseline, + .arm, .armeb, .thumb, .thumbeb => switch (os.tag) { + .@"3ds" => &arm.cpu.mpcore, + else => &arm.cpu.baseline, + }, .aarch64 => switch (os.tag) { .driverkit, .macos => &aarch64.cpu.apple_m1, .ios, .tvos => &aarch64.cpu.apple_a7, @@ -2055,6 +2068,7 @@ pub fn requiresLibC(target: *const Target) bool { .vulkan, .plan9, .other, + .@"3ds", => false, }; } @@ -2153,6 +2167,8 @@ pub const DynamicLinker = struct { .uefi, .windows, + .@"3ds", + .emscripten, .wasi, @@ -2537,6 +2553,8 @@ pub const DynamicLinker = struct { .uefi, .windows, + .@"3ds", + .emscripten, .wasi, @@ -3044,6 +3062,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 { .longdouble => return 128, }, + .@"3ds" => switch (c_type) { + .char => return 8, + .short, .ushort => return 16, + .int, .uint, .float, .long, .ulong => return 32, + .longlong, .ulonglong, .double, .longdouble => return 64, + }, + .ps4, .ps5 => switch (c_type) { .char => return 8, .short, .ushort => return 16, |
