authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-19 06:58:23+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-20 10:02:46+02:00
log1a801d2bd454af79c1c7cbb339a3f82afe58c156
tree5618af4d2795a1109d0156f657385d95e2d1616f
parentb7d2a8253bc90194bd92b0d2db4e197faf5fafae
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: fix cTypeBitSize() for ez80-freestanding

It was incorrectly using the generic prong. Just throw tios in the same OS prong as freestanding and ashetos.

1 files changed, 8 insertions(+), 8 deletions(-)

lib/std/Target.zig+8-8
...@@ -3253,6 +3253,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {...@@ -3253,6 +3253,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
3253 .freestanding,3253 .freestanding,
3254 .other,3254 .other,
3255 .ashetos,3255 .ashetos,
3256 .tios,
3256 => switch (target.cpu.arch) {3257 => switch (target.cpu.arch) {
3257 .msp430,3258 .msp430,
3258 .x86_16,3259 .x86_16,
...@@ -3275,6 +3276,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {...@@ -3275,6 +3276,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
3275 .long, .ulong, .float => 32,3276 .long, .ulong, .float => 32,
3276 .double, .longdouble, .longlong, .ulonglong => 64,3277 .double, .longdouble, .longlong, .ulonglong => 64,
3277 },3278 },
3279 .ez80 => switch (c_type) {
3280 .char => 8,
3281 .short, .ushort => 16,
3282 .int, .uint => 24,
3283 .long, .ulong, .float, .double => 32,
3284 .longlong, .ulonglong, .longdouble => 64,
3285 },
3278 else => switch (c_type) {3286 else => switch (c_type) {
3279 .char => 8,3287 .char => 8,
3280 .short, .ushort => 16,3288 .short, .ushort => 16,
...@@ -3497,14 +3505,6 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {...@@ -3497,14 +3505,6 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
3497 .longdouble => 80,3505 .longdouble => 80,
3498 },3506 },
34993507
3500 .tios => switch (c_type) {
3501 .char => 8,
3502 .short, .ushort => 16,
3503 .int, .uint => 24,
3504 .long, .ulong, .float, .double => 32,
3505 .longlong, .ulonglong, .longdouble => 64,
3506 },
3507
3508 .opengl => null,3508 .opengl => null,
35093509
3510 .contiki,3510 .contiki,