| ... | @@ -50,6 +50,8 @@ pub const Os = struct { | ... | @@ -50,6 +50,8 @@ pub const Os = struct { |
| 50 | windows, | 50 | windows, |
| 51 | uefi, | 51 | uefi, |
| 52 | | 52 | |
| | 53 | @"3ds", |
| | 54 | |
| 53 | ps3, | 55 | ps3, |
| 54 | ps4, | 56 | ps4, |
| 55 | ps5, | 57 | ps5, |
| ... | @@ -194,6 +196,8 @@ pub const Os = struct { | ... | @@ -194,6 +196,8 @@ pub const Os = struct { |
| 194 | | 196 | |
| 195 | .uefi, | 197 | .uefi, |
| 196 | | 198 | |
| | 199 | .@"3ds", |
| | 200 | |
| 197 | .wasi, | 201 | .wasi, |
| 198 | | 202 | |
| 199 | .amdhsa, | 203 | .amdhsa, |
| ... | @@ -603,7 +607,12 @@ pub const Os = struct { | ... | @@ -603,7 +607,12 @@ pub const Os = struct { |
| 603 | .max = .{ .major = 2, .minor = 11, .patch = 0 }, | 607 | .max = .{ .major = 2, .minor = 11, .patch = 0 }, |
| 604 | }, | 608 | }, |
| 605 | }, | 609 | }, |
| 606 | | 610 | .@"3ds" => .{ |
| | 611 | .semver = .{ |
| | 612 | .min = .{ .major = 2, .minor = 27, .patch = 0 }, // 1.0.0-0 |
| | 613 | .max = .{ .major = 2, .minor = 58, .patch = 0 }, // 11.17.0-50 |
| | 614 | }, |
| | 615 | }, |
| 607 | .wasi => .{ | 616 | .wasi => .{ |
| 608 | .semver = .{ | 617 | .semver = .{ |
| 609 | .min = .{ .major = 0, .minor = 1, .patch = 0 }, | 618 | .min = .{ .major = 0, .minor = 1, .patch = 0 }, |
| ... | @@ -861,6 +870,7 @@ pub const Abi = enum { | ... | @@ -861,6 +870,7 @@ pub const Abi = enum { |
| 861 | .tvos, .visionos, .watchos => if (arch == .x86_64) .simulator else .none, | 870 | .tvos, .visionos, .watchos => if (arch == .x86_64) .simulator else .none, |
| 862 | .windows => .gnu, | 871 | .windows => .gnu, |
| 863 | .uefi => .msvc, | 872 | .uefi => .msvc, |
| | 873 | .@"3ds" => .eabihf, |
| 864 | .wasi, .emscripten => .musl, | 874 | .wasi, .emscripten => .musl, |
| 865 | | 875 | |
| 866 | .contiki, | 876 | .contiki, |
| ... | @@ -1828,7 +1838,10 @@ pub const Cpu = struct { | ... | @@ -1828,7 +1838,10 @@ pub const Cpu = struct { |
| 1828 | pub fn baseline(arch: Arch, os: Os) *const Model { | 1838 | pub fn baseline(arch: Arch, os: Os) *const Model { |
| 1829 | return switch (arch) { | 1839 | return switch (arch) { |
| 1830 | .amdgcn => &amdgcn.cpu.gfx906, | 1840 | .amdgcn => &amdgcn.cpu.gfx906, |
| 1831 | .arm, .armeb, .thumb, .thumbeb => &arm.cpu.baseline, | 1841 | .arm, .armeb, .thumb, .thumbeb => switch (os.tag) { |
| | 1842 | .@"3ds" => &arm.cpu.mpcore, |
| | 1843 | else => &arm.cpu.baseline, |
| | 1844 | }, |
| 1832 | .aarch64 => switch (os.tag) { | 1845 | .aarch64 => switch (os.tag) { |
| 1833 | .driverkit, .macos => &aarch64.cpu.apple_m1, | 1846 | .driverkit, .macos => &aarch64.cpu.apple_m1, |
| 1834 | .ios, .tvos => &aarch64.cpu.apple_a7, | 1847 | .ios, .tvos => &aarch64.cpu.apple_a7, |
| ... | @@ -2055,6 +2068,7 @@ pub fn requiresLibC(target: *const Target) bool { | ... | @@ -2055,6 +2068,7 @@ pub fn requiresLibC(target: *const Target) bool { |
| 2055 | .vulkan, | 2068 | .vulkan, |
| 2056 | .plan9, | 2069 | .plan9, |
| 2057 | .other, | 2070 | .other, |
| | 2071 | .@"3ds", |
| 2058 | => false, | 2072 | => false, |
| 2059 | }; | 2073 | }; |
| 2060 | } | 2074 | } |
| ... | @@ -2153,6 +2167,8 @@ pub const DynamicLinker = struct { | ... | @@ -2153,6 +2167,8 @@ pub const DynamicLinker = struct { |
| 2153 | .uefi, | 2167 | .uefi, |
| 2154 | .windows, | 2168 | .windows, |
| 2155 | | 2169 | |
| | 2170 | .@"3ds", |
| | 2171 | |
| 2156 | .emscripten, | 2172 | .emscripten, |
| 2157 | .wasi, | 2173 | .wasi, |
| 2158 | | 2174 | |
| ... | @@ -2537,6 +2553,8 @@ pub const DynamicLinker = struct { | ... | @@ -2537,6 +2553,8 @@ pub const DynamicLinker = struct { |
| 2537 | .uefi, | 2553 | .uefi, |
| 2538 | .windows, | 2554 | .windows, |
| 2539 | | 2555 | |
| | 2556 | .@"3ds", |
| | 2557 | |
| 2540 | .emscripten, | 2558 | .emscripten, |
| 2541 | .wasi, | 2559 | .wasi, |
| 2542 | | 2560 | |
| ... | @@ -3044,6 +3062,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 { | ... | @@ -3044,6 +3062,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 { |
| 3044 | .longdouble => return 128, | 3062 | .longdouble => return 128, |
| 3045 | }, | 3063 | }, |
| 3046 | | 3064 | |
| | 3065 | .@"3ds" => switch (c_type) { |
| | 3066 | .char => return 8, |
| | 3067 | .short, .ushort => return 16, |
| | 3068 | .int, .uint, .float, .long, .ulong => return 32, |
| | 3069 | .longlong, .ulonglong, .double, .longdouble => return 64, |
| | 3070 | }, |
| | 3071 | |
| 3047 | .ps4, .ps5 => switch (c_type) { | 3072 | .ps4, .ps5 => switch (c_type) { |
| 3048 | .char => return 8, | 3073 | .char => return 8, |
| 3049 | .short, .ushort => return 16, | 3074 | .short, .ushort => return 16, |