authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-17 02:54:33+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-17 04:29:45+02:00
log85c6d40cbdadfdb57feba90af128f380c3d07836
treec0360fc4f5e70d8c2f5fd08cc874e3b63cf0578e
parentb75d35631ca813ac0ce1653ec281a85abd419ba0
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: merge some Nintendo console prongs in cTypeBitSize()


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

lib/std/Target.zig+2-17
......@@ -3468,21 +3468,12 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
34683468 .longlong, .ulonglong, .double, .longdouble => 64,
34693469 },
34703470
3471
3472 .@"3ds" => switch (c_type) {
3471 .gba, .@"3ds", .wiiu => switch (c_type) {
34733472 .char => 8,
34743473 .short, .ushort => 16,
34753474 .int, .uint, .float, .long, .ulong => 32,
34763475 .longlong, .ulonglong, .double, .longdouble => 64,
34773476 },
3478
3479 .wiiu => switch (c_type) {
3480 .char => 8,
3481 .short, .ushort => 16,
3482 .int, .uint, .float, .long, .ulong => 32,
3483 .longlong, .ulonglong, .double, .longdouble => 64,
3484 },
3485
34863477 .@"switch" => switch (c_type) {
34873478 .char => 8,
34883479 .short, .ushort => 16,
......@@ -3491,13 +3482,6 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
34913482 .longdouble => 128,
34923483 },
34933484
3494 .gba => switch (c_type) {
3495 .char => return 8,
3496 .short, .ushort => return 16,
3497 .int, .uint, .long, .ulong, .float => return 32,
3498 .longlong, .ulonglong, .double, .longdouble => return 64,
3499 },
3500
35013485 .psx => switch (c_type) {
35023486 .char => 8,
35033487 .short, .ushort => 16,
......@@ -3519,6 +3503,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
35193503 .long, .ulong => 64,
35203504 .longlong, .ulonglong, .double, .longdouble => 64,
35213505 },
3506
35223507 .tios => switch (c_type) {
35233508 .char => 8,
35243509 .short, .ushort => 16,