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 04:29:45+02:00
log5e124ec7236a3318dac7d557a7acf31ad8471b75
treef4f899ae5debcc7804ccc869cd2dce0e6b7b8110
parent0d66ff5d32ecbdee5e5bb54e0a96bf137b7a94a4
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
...@@ -3484,7 +3484,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {...@@ -3484,7 +3484,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
3484 .longdouble => 128,3484 .longdouble => 128,
3485 },3485 },
34863486
3487 .psx, .ps3 => switch (c_type) {3487 .psx, .ps3, .psp, .vita => switch (c_type) {
3488 .char => 8,3488 .char => 8,
3489 .short, .ushort => 16,3489 .short, .ushort => 16,
3490 .int, .uint, .long, .ulong, .float => 32,3490 .int, .uint, .long, .ulong, .float => 32,
...@@ -3494,17 +3494,9 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {...@@ -3494,17 +3494,9 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
3494 .char => 8,3494 .char => 8,
3495 .short, .ushort => 16,3495 .short, .ushort => 16,
3496 .int, .uint, .float => 32,3496 .int, .uint, .float => 32,
3497 .long, .ulong => 64,3497 .long, .ulong, .longlong, .ulonglong, .double => 64,
3498 .longlong, .ulonglong, .double => 64,
3499 .longdouble => 80,3498 .longdouble => 80,
3500 },3499 },
3501 .psp, .vita => switch (c_type) {
3502 .char => 8,
3503 .short, .ushort => 16,
3504 .int, .uint, .float => 32,
3505 .long, .ulong => 64,
3506 .longlong, .ulonglong, .double, .longdouble => 64,
3507 },
35083500
3509 .tios => switch (c_type) {3501 .tios => switch (c_type) {
3510 .char => 8,3502 .char => 8,