authorgravatar for paul.verigo@gmail.comPavel Verigo <paul.verigo@gmail.com> 2026-04-08 04:26:02+02:00
committergravatar for paul.verigo@gmail.comPavel Verigo <paul.verigo@gmail.com> 2026-04-09 00:14:09+02:00
log07e3e50fd28d98edaf893b9d58d97e7d2b895d38
treef3535a0366700a95e676d988f2d540456081d060
parentf2a842db5caa7a91faade2636106327cc6707ad3

stage2-wasm: enabling bigint blocked tests + final fixes


10 files changed, 36 insertions(+), 43 deletions(-)

src/codegen/wasm/CodeGen.zig+35-29
...@@ -3,6 +3,7 @@ const builtin = @import("builtin");...@@ -3,6 +3,7 @@ const builtin = @import("builtin");
3const Allocator = std.mem.Allocator;3const Allocator = std.mem.Allocator;
4const assert = std.debug.assert;4const assert = std.debug.assert;
5const testing = std.testing;5const testing = std.testing;
6const math = std.math;
6const mem = std.mem;7const mem = std.mem;
7const log = std.log.scoped(.codegen);8const log = std.log.scoped(.codegen);
89
...@@ -3258,32 +3259,35 @@ fn intByteSwap(cg: *CodeGen, ty: IntType, operand: WValue) InnerError!WValue {...@@ -3258,32 +3259,35 @@ fn intByteSwap(cg: *CodeGen, ty: IntType, operand: WValue) InnerError!WValue {
3258 return cg.intShr(ty, intrin_ret, .{ .imm32 = 64 - ty.bits });3259 return cg.intShr(ty, intrin_ret, .{ .imm32 = 64 - ty.bits });
3259 },3260 },
3260 65...128 => {3261 65...128 => {
3261 const tmp = try cg.allocStack(Type.u128);3262 const result = try cg.allocStack(Type.u128);
32623263
3263 const low = try cg.load(operand, Type.u64, 0);3264 try cg.emitWValue(result);
3264 const high = try cg.load(operand, Type.u64, 8);
32653265
3266 const low = try cg.load(operand, Type.u64, 0);
3266 const swap_low = try cg.callIntrinsic(3267 const swap_low = try cg.callIntrinsic(
3267 .__bswapdi2,3268 .__bswapdi2,
3268 &.{.u64_type},3269 &.{.u64_type},
3269 Type.u64,3270 Type.u64,
3270 &.{low},3271 &.{low},
3271 );3272 );
3273 try cg.store(.stack, swap_low, Type.u64, result.offset() + 8);
3274
3275 try cg.emitWValue(result);
3276
3277 const high = try cg.load(operand, Type.u64, 8);
3272 const swap_high = try cg.callIntrinsic(3278 const swap_high = try cg.callIntrinsic(
3273 .__bswapdi2,3279 .__bswapdi2,
3274 &.{.u64_type},3280 &.{.u64_type},
3275 Type.u64,3281 Type.u64,
3276 &.{high},3282 &.{high},
3277 );3283 );
32783284 try cg.store(.stack, swap_high, Type.u64, result.offset());
3279 try cg.store(tmp, swap_low, Type.u64, tmp.offset() + 8);
3280 try cg.store(tmp, swap_high, Type.u64, tmp.offset());
32813285
3282 if (ty.bits < 128) {3286 if (ty.bits < 128) {
3283 const shift_ty: IntType = .{ .is_signed = ty.is_signed, .bits = 128 };3287 const shift_ty: IntType = .{ .is_signed = ty.is_signed, .bits = 128 };
3284 return cg.intShr(shift_ty, tmp, .{ .imm32 = 128 - ty.bits });3288 return cg.intShr(shift_ty, result, .{ .imm32 = 128 - ty.bits });
3285 } else {3289 } else {
3286 return tmp;3290 return result;
3287 }3291 }
3288 },3292 },
3289 else => {3293 else => {
...@@ -3360,14 +3364,14 @@ fn intWrap(cg: *CodeGen, ty: IntType, operand: WValue) InnerError!WValue {...@@ -3360,14 +3364,14 @@ fn intWrap(cg: *CodeGen, ty: IntType, operand: WValue) InnerError!WValue {
33603364
3361 const result = try cg.allocInt(ty);3365 const result = try cg.allocInt(ty);
33623366
3363 const copy_len = (ty.bits / 64) * 8;3367 const used_len = (math.divCeil(u16, ty.bits, 64) catch unreachable) * 8;
3364 try cg.memcpy(result, operand, .{ .imm32 = copy_len });
33653368
3366 if (ty.bits % 64 != 0) {3369 if (ty.bits % 64 != 0) {
3370 try cg.memcpy(result, operand, .{ .imm32 = used_len - 8 });
3367 const pad = 64 - ty.bits % 64;3371 const pad = 64 - ty.bits % 64;
33683372
3369 try cg.emitWValue(result);3373 try cg.emitWValue(result);
3370 _ = try cg.load(operand, Type.u64, copy_len);3374 _ = try cg.load(operand, Type.u64, used_len - 8);
3371 if (ty.is_signed) {3375 if (ty.is_signed) {
3372 try cg.addImm64(pad);3376 try cg.addImm64(pad);
3373 try cg.addTag(.i64_shl);3377 try cg.addTag(.i64_shl);
...@@ -3377,20 +3381,22 @@ fn intWrap(cg: *CodeGen, ty: IntType, operand: WValue) InnerError!WValue {...@@ -3377,20 +3381,22 @@ fn intWrap(cg: *CodeGen, ty: IntType, operand: WValue) InnerError!WValue {
3377 try cg.addImm64(~@as(u64, 0) >> @intCast(pad));3381 try cg.addImm64(~@as(u64, 0) >> @intCast(pad));
3378 try cg.addTag(.i64_and);3382 try cg.addTag(.i64_and);
3379 }3383 }
3380 try cg.store(.stack, .stack, Type.u64, result.offset() + copy_len);3384 try cg.store(.stack, .stack, Type.u64, result.offset() + used_len - 8);
3385 } else {
3386 try cg.memcpy(result, operand, .{ .imm32 = used_len });
3381 }3387 }
33823388
3383 const full_len = @divExact(bits, 8);3389 const full_len = @divExact(bits, 8);
3384 if (copy_len + 16 == full_len) { // last limb needs sign extended3390 if (used_len + 8 == full_len) { // last limb needs sign extended
3385 try cg.emitWValue(result);3391 try cg.emitWValue(result);
3386 if (ty.is_signed) {3392 if (ty.is_signed) {
3387 _ = try cg.load(result, Type.u64, copy_len);3393 _ = try cg.load(result, Type.u64, used_len - 8);
3388 try cg.addImm64(63);3394 try cg.addImm64(63);
3389 try cg.addTag(.i64_shr_s);3395 try cg.addTag(.i64_shr_s);
3390 } else {3396 } else {
3391 try cg.addImm64(0);3397 try cg.addImm64(0);
3392 }3398 }
3393 try cg.store(.stack, .stack, Type.u64, result.offset() + copy_len + 8);3399 try cg.store(.stack, .stack, Type.u64, result.offset() + used_len);
3394 }3400 }
33953401
3396 return result;3402 return result;
...@@ -3424,17 +3430,17 @@ fn intMaxValue(cg: *CodeGen, int_ty: IntType) InnerError!WValue {...@@ -3424,17 +3430,17 @@ fn intMaxValue(cg: *CodeGen, int_ty: IntType) InnerError!WValue {
3424 } else {3430 } else {
3425 const result = try cg.allocInt(int_ty);3431 const result = try cg.allocInt(int_ty);
3426 const full_len = @divExact(cg.intBackingBits(int_ty.bits), 8);3432 const full_len = @divExact(cg.intBackingBits(int_ty.bits), 8);
3427 const normal_len = (int_ty.bits / 64) * 8;3433 const used_len = (math.divCeil(u16, int_ty.bits, 64) catch unreachable) * 8;
34283434
3429 try cg.memset(Type.u8, result, .{ .imm32 = normal_len }, .{ .imm32 = 0xFF });3435 try cg.memset(Type.u8, result, .{ .imm32 = used_len - 8 }, .{ .imm32 = 0xFF });
34303436
3431 if (int_ty.is_signed) {3437 if (int_ty.is_signed) {
3432 try cg.store(result, .{ .imm64 = (~@as(u64, 0) >> @intCast((normal_len + 8) * 8 - int_ty.bits)) >> 1 }, Type.u64, normal_len);3438 try cg.store(result, .{ .imm64 = (~@as(u64, 0) >> @intCast(used_len * 8 - int_ty.bits)) >> 1 }, Type.u64, used_len - 8);
3433 } else {3439 } else {
3434 try cg.store(result, .{ .imm64 = ~@as(u64, 0) >> @intCast((normal_len + 8) * 8 - int_ty.bits) }, Type.u64, normal_len);3440 try cg.store(result, .{ .imm64 = ~@as(u64, 0) >> @intCast(used_len * 8 - int_ty.bits) }, Type.u64, used_len - 8);
3435 }3441 }
34363442
3437 if (normal_len + 16 == full_len) {3443 if (used_len + 8 == full_len) {
3438 try cg.store(result, .{ .imm64 = 0 }, Type.u64, full_len - 8);3444 try cg.store(result, .{ .imm64 = 0 }, Type.u64, full_len - 8);
3439 }3445 }
34403446
...@@ -3458,12 +3464,12 @@ fn intMinValue(cg: *CodeGen, int_ty: IntType) InnerError!WValue {...@@ -3458,12 +3464,12 @@ fn intMinValue(cg: *CodeGen, int_ty: IntType) InnerError!WValue {
3458 } else {3464 } else {
3459 const result = try cg.allocInt(int_ty);3465 const result = try cg.allocInt(int_ty);
3460 const full_len = @divExact(cg.intBackingBits(int_ty.bits), 8);3466 const full_len = @divExact(cg.intBackingBits(int_ty.bits), 8);
3461 const normal_len = (int_ty.bits / 64) * 8;3467 const used_len = (math.divCeil(u16, int_ty.bits, 64) catch unreachable) * 8;
34623468
3463 try cg.memset(Type.u8, result, .{ .imm32 = normal_len }, .{ .imm32 = 0 });3469 try cg.memset(Type.u8, result, .{ .imm32 = used_len - 8 }, .{ .imm32 = 0 });
3464 try cg.store(result, .{ .imm64 = ~@as(u64, 0) << @intCast(int_ty.bits - normal_len * 8 - 1) }, Type.u64, normal_len);3470 try cg.store(result, .{ .imm64 = ~@as(u64, 0) << @intCast(int_ty.bits - (used_len - 8) * 8 - 1) }, Type.u64, used_len - 8);
34653471
3466 if (normal_len + 16 == full_len) {3472 if (used_len + 8 == full_len) {
3467 try cg.store(result, .{ .imm64 = ~@as(u64, 0) }, Type.u64, full_len - 8);3473 try cg.store(result, .{ .imm64 = ~@as(u64, 0) }, Type.u64, full_len - 8);
3468 }3474 }
34693475
...@@ -4505,7 +4511,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal...@@ -4505,7 +4511,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal
4505 },4511 },
4506 else => {4512 else => {
4507 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateihf else .__floatuneihf;4513 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateihf else .__floatuneihf;
4508 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f16, &.{ operand, .{ .imm32 = src_ty.bits }});4514 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f16, &.{ operand, .{ .imm32 = src_ty.bits } });
4509 },4515 },
4510 },4516 },
4511 .f32 => switch (src_ty.bits) {4517 .f32 => switch (src_ty.bits) {
...@@ -4526,7 +4532,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal...@@ -4526,7 +4532,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal
4526 },4532 },
4527 else => {4533 else => {
4528 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateisf else .__floatuneisf;4534 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateisf else .__floatuneisf;
4529 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f32, &.{ operand, .{ .imm32 = src_ty.bits }});4535 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f32, &.{ operand, .{ .imm32 = src_ty.bits } });
4530 },4536 },
4531 },4537 },
4532 .f64 => switch (src_ty.bits) {4538 .f64 => switch (src_ty.bits) {
...@@ -4547,7 +4553,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal...@@ -4547,7 +4553,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal
4547 },4553 },
4548 else => {4554 else => {
4549 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateidf else .__floatuneidf;4555 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateidf else .__floatuneidf;
4550 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f64, &.{ operand, .{ .imm32 = src_ty.bits }});4556 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f64, &.{ operand, .{ .imm32 = src_ty.bits } });
4551 },4557 },
4552 },4558 },
4553 .f80 => switch (src_ty.bits) {4559 .f80 => switch (src_ty.bits) {
...@@ -4566,7 +4572,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal...@@ -4566,7 +4572,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal
4566 },4572 },
4567 else => {4573 else => {
4568 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateixf else .__floatuneixf;4574 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateixf else .__floatuneixf;
4569 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f80, &.{ operand, .{ .imm32 = src_ty.bits }});4575 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f80, &.{ operand, .{ .imm32 = src_ty.bits } });
4570 },4576 },
4571 },4577 },
4572 .f128 => switch (src_ty.bits) {4578 .f128 => switch (src_ty.bits) {
...@@ -4585,7 +4591,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal...@@ -4585,7 +4591,7 @@ fn floatFromInt(cg: *CodeGen, dest_ty: FloatType, src_ty: IntType, operand: WVal
4585 },4591 },
4586 else => {4592 else => {
4587 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateitf else .__floatuneitf;4593 const intrinsic: Mir.Intrinsic = if (src_ty.is_signed) .__floateitf else .__floatuneitf;
4588 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f128, &.{ operand, .{ .imm32 = src_ty.bits }});4594 return cg.callIntrinsic(intrinsic, &.{ .usize_type, .usize_type }, Type.f128, &.{ operand, .{ .imm32 = src_ty.bits } });
4589 },4595 },
4590 },4596 },
4591 }4597 }
test/behavior/bit_shifting.zig-1
...@@ -151,7 +151,6 @@ test "Saturating Shift Left" {...@@ -151,7 +151,6 @@ test "Saturating Shift Left" {
151 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest;151 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest;
152 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;152 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
153 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;153 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
154 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
155154
156 const S = struct {155 const S = struct {
157 fn shlSat(x: anytype, y: std.math.Log2Int(@TypeOf(x))) @TypeOf(x) {156 fn shlSat(x: anytype, y: std.math.Log2Int(@TypeOf(x))) @TypeOf(x) {
test/behavior/bitcast.zig-4
...@@ -35,7 +35,6 @@ test "@bitCast iX -> uX (8, 16, 128)" {...@@ -35,7 +35,6 @@ test "@bitCast iX -> uX (8, 16, 128)" {
3535
36test "@bitCast iX -> uX exotic integers" {36test "@bitCast iX -> uX exotic integers" {
37 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;37 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
38 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
39 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;38 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
40 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO39 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
41 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;40 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
...@@ -80,7 +79,6 @@ fn conv_uN(comptime N: usize, x: std.meta.Int(.unsigned, N)) std.meta.Int(.signe...@@ -80,7 +79,6 @@ fn conv_uN(comptime N: usize, x: std.meta.Int(.unsigned, N)) std.meta.Int(.signe
8079
81test "bitcast uX to bytes" {80test "bitcast uX to bytes" {
82 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;81 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
83 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
84 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;82 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
85 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO83 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
86 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;84 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
...@@ -296,7 +294,6 @@ test "triple level result location with bitcast sandwich passed as tuple element...@@ -296,7 +294,6 @@ test "triple level result location with bitcast sandwich passed as tuple element
296294
297test "@bitCast packed struct of floats" {295test "@bitCast packed struct of floats" {
298 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;296 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
299 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
300 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;297 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
301 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;298 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
302 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO299 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
...@@ -334,7 +331,6 @@ test "@bitCast packed struct of floats" {...@@ -334,7 +331,6 @@ test "@bitCast packed struct of floats" {
334331
335test "comptime @bitCast packed struct to int and back" {332test "comptime @bitCast packed struct to int and back" {
336 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;333 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
337 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
338 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;334 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
339 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;335 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
340 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO336 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
test/behavior/byteswap.zig-1
...@@ -42,7 +42,6 @@ test "@byteSwap exotic integers" {...@@ -42,7 +42,6 @@ test "@byteSwap exotic integers" {
42 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;42 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
43 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest;43 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest;
44 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;44 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
45 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
4645
47 const ByteSwapIntTest = struct {46 const ByteSwapIntTest = struct {
48 fn run() !void {47 fn run() !void {
test/behavior/eval.zig-1
...@@ -511,7 +511,6 @@ var foo_contents = Foo{ .name = "a" };...@@ -511,7 +511,6 @@ var foo_contents = Foo{ .name = "a" };
511const foo_ref = &foo_contents;511const foo_ref = &foo_contents;
512512
513test "runtime 128 bit integer division" {513test "runtime 128 bit integer division" {
514 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
515 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO514 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
516 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO515 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
517 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;516 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
test/behavior/math.zig+1
...@@ -1768,6 +1768,7 @@ fn testMod(comptime T: type, numerator: T, denominator: T, expected: T) !void {...@@ -1768,6 +1768,7 @@ fn testMod(comptime T: type, numerator: T, denominator: T, expected: T) !void {
17681768
1769test "@mod > 128 bits" {1769test "@mod > 128 bits" {
1770 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;1770 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
1771 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
17711772
1772 try testMod(u140, 0, maxInt(u140), 0);1773 try testMod(u140, 0, maxInt(u140), 0);
1773 try testMod(u140, maxInt(u140), maxInt(u140), 0);1774 try testMod(u140, maxInt(u140), maxInt(u140), 0);
test/behavior/packed-struct.zig-2
...@@ -582,7 +582,6 @@ test "packed struct fields modification" {...@@ -582,7 +582,6 @@ test "packed struct fields modification" {
582582
583test "nested packed struct field access test" {583test "nested packed struct field access test" {
584 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO584 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
585 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO packed structs larger than 64 bits
586 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO585 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
587 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO586 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
588 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;587 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
...@@ -736,7 +735,6 @@ test "nested packed struct at non-zero offset 2" {...@@ -736,7 +735,6 @@ test "nested packed struct at non-zero offset 2" {
736 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;735 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
737 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO736 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
738 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;737 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
739 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO packed structs larger than 64 bits
740 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;738 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
741 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;739 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
742740
test/behavior/struct.zig-1
...@@ -540,7 +540,6 @@ test "zero-bit field in packed struct" {...@@ -540,7 +540,6 @@ test "zero-bit field in packed struct" {
540test "packed struct with non-ABI-aligned field" {540test "packed struct with non-ABI-aligned field" {
541 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;541 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
542 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO542 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
543 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
544 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO543 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
545 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO544 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
546 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;545 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
test/behavior/switch.zig-2
...@@ -1457,8 +1457,6 @@ test "switch on nested packed containers" {...@@ -1457,8 +1457,6 @@ test "switch on nested packed containers" {
1457}1457}
14581458
1459test "switch on large types" {1459test "switch on large types" {
1460 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
1461
1462 const S = struct {1460 const S = struct {
1463 fn doTheTest(a: u128, b: i500) !void {1461 fn doTheTest(a: u128, b: i500) !void {
1464 switch (a) {1462 switch (a) {
test/behavior/switch_loop.zig-2
...@@ -566,8 +566,6 @@ test "switch loop with packed unions with OPV" {...@@ -566,8 +566,6 @@ test "switch loop with packed unions with OPV" {
566}566}
567567
568test "switch loop on large types" {568test "switch loop on large types" {
569 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
570
571 const S = struct {569 const S = struct {
572 fn doTheTest(a: u128, b: i500) !void {570 fn doTheTest(a: u128, b: i500) !void {
573 label: switch (a) {571 label: switch (a) {