authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-17 03:07:02+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-17 05:24:47+02:00
log00780901379b8b51082a98249baede0b8357f4a4
treebffa62fc0f202b901fa41f00980f980834a75ea3
parent427ab15c7330ba941407358dfc4bd2ef9de68cdc
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: fix cTypeBitSize(.{long,ulong}) for psp and vita

contributes to https://codeberg.org/ziglang/zig/issues/31341

1 files changed, 2 insertions(+), 10 deletions(-)

lib/std/Target.zig+2-10
...@@ -3497,7 +3497,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {...@@ -3497,7 +3497,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
3497 .longdouble => 128,3497 .longdouble => 128,
3498 },3498 },
34993499
3500 .psx, .ps3 => switch (c_type) {3500 .psx, .ps3, .psp, .vita => switch (c_type) {
3501 .char => 8,3501 .char => 8,
3502 .short, .ushort => 16,3502 .short, .ushort => 16,
3503 .int, .uint, .long, .ulong, .float => 32,3503 .int, .uint, .long, .ulong, .float => 32,
...@@ -3507,17 +3507,9 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {...@@ -3507,17 +3507,9 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
3507 .char => 8,3507 .char => 8,
3508 .short, .ushort => 16,3508 .short, .ushort => 16,
3509 .int, .uint, .float => 32,3509 .int, .uint, .float => 32,
3510 .long, .ulong => 64,3510 .long, .ulong, .longlong, .ulonglong, .double => 64,
3511 .longlong, .ulonglong, .double => 64,
3512 .longdouble => 80,3511 .longdouble => 80,
3513 },3512 },
3514 .psp, .vita => switch (c_type) {
3515 .char => 8,
3516 .short, .ushort => 16,
3517 .int, .uint, .float => 32,
3518 .long, .ulong => 64,
3519 .longlong, .ulonglong, .double, .longdouble => 64,
3520 },
35213513
3522 .tios => switch (c_type) {3514 .tios => switch (c_type) {
3523 .char => 8,3515 .char => 8,