authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-22 12:16:35-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-22 12:16:35-07:00
log6f0198cadbe29294f2bf3153a27beebd64377566
tree99e6a8657282d9ffe09944a52c78b7e5b6949071
parent9f0359d78f9facc38418e32b0e8c1bf6f99f0d26

Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"

This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.

150 files changed, 180 insertions(+), 1691 deletions(-)

lib/compiler_rt/addf3_test.zig-8
......@@ -4,7 +4,6 @@
44// https://github.com/llvm/llvm-project/blob/02d85149a05cb1f6dc49f0ba7a2ceca53718ae17/compiler-rt/test/builtins/Unit/subtf3_test.c
55
66const std = @import("std");
7const builtin = @import("builtin");
87const math = std.math;
98const qnan128: f128 = @bitCast(@as(u128, 0x7fff800000000000) << 64);
109
......@@ -35,8 +34,6 @@ fn test__addtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) !void {
3534}
3635
3736test "addtf3" {
38 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
39
4037 try test__addtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);
4138
4239 // NaN + any = NaN
......@@ -76,9 +73,6 @@ fn test__subtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) !void {
7673}
7774
7875test "subtf3" {
79 if (builtin.zig_backend == .stage2_x86_64 and
80 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
81
8276 // qNaN - any = qNaN
8377 try test__subtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);
8478
......@@ -109,8 +103,6 @@ fn test__addxf3(a: f80, b: f80, expected: u80) !void {
109103}
110104
111105test "addxf3" {
112 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
113
114106 // NaN + any = NaN
115107 try test__addxf3(qnan80, 0x1.23456789abcdefp+5, @as(u80, @bitCast(qnan80)));
116108 try test__addxf3(@as(f80, @bitCast(@as(u80, 0x7fff_8000_8000_3000_0000))), 0x1.23456789abcdefp+5, @as(u80, @bitCast(qnan80)));
lib/compiler_rt/addoti4_test.zig-2
......@@ -23,8 +23,6 @@ fn simple_addoti4(a: i128, b: i128, overflow: *c_int) i128 {
2323}
2424
2525test "addoti4" {
26 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
27
2826 const min: i128 = math.minInt(i128);
2927 const max: i128 = math.maxInt(i128);
3028 var i: i128 = 1;
lib/compiler_rt/comparef.zig-2
......@@ -98,8 +98,6 @@ pub inline fn cmp_f80(comptime RT: type, a: f80, b: f80) RT {
9898}
9999
100100test "cmp_f80" {
101 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
102
103101 inline for (.{ LE, GE }) |RT| {
104102 try std.testing.expect(cmp_f80(RT, 1.0, 1.0) == RT.Equal);
105103 try std.testing.expect(cmp_f80(RT, 0.0, -0.0) == RT.Equal);
lib/compiler_rt/cos.zig+2-2
......@@ -1,4 +1,6 @@
11const std = @import("std");
2const builtin = @import("builtin");
3const arch = builtin.cpu.arch;
24const math = std.math;
35const expect = std.testing.expect;
46const common = @import("common.zig");
......@@ -134,8 +136,6 @@ pub fn cosl(x: c_longdouble) callconv(.C) c_longdouble {
134136}
135137
136138test "cos32" {
137 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
138
139139 const epsilon = 0.00001;
140140
141141 try expect(math.approxEqAbs(f32, cosf(0.0), 1.0, epsilon));
lib/compiler_rt/divtf3_test.zig-4
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const math = std.math;
43const testing = std.testing;
54
......@@ -31,9 +30,6 @@ fn test__divtf3(a: f128, b: f128, expectedHi: u64, expectedLo: u64) !void {
3130}
3231
3332test "divtf3" {
34 if (builtin.zig_backend == .stage2_x86_64 and
35 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
36
3733 // NaN / any = NaN
3834 try test__divtf3(math.nan(f128), 0x1.23456789abcdefp+5, 0x7fff800000000000, 0);
3935 // inf / any(except inf and nan) = inf
lib/compiler_rt/divxf3_test.zig-2
......@@ -39,8 +39,6 @@ fn test__divxf3(a: f80, b: f80) !void {
3939}
4040
4141test "divxf3" {
42 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
43
4442 // NaN / any = NaN
4543 try expect__divxf3_result(math.nan(f80), 0x1.23456789abcdefp+5, 0x7fffC000000000000000);
4644 // inf / any(except inf and nan) = inf
lib/compiler_rt/float_from_int_test.zig-22
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const testing = std.testing;
43const math = std.math;
54
......@@ -126,9 +125,6 @@ fn test__floatuntisf(a: u128, expected: f32) !void {
126125}
127126
128127test "floattisf" {
129 if (builtin.zig_backend == .stage2_x86_64 and
130 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
131
132128 try test__floattisf(0, 0.0);
133129
134130 try test__floattisf(1, 1.0);
......@@ -175,9 +171,6 @@ test "floattisf" {
175171}
176172
177173test "floatuntisf" {
178 if (builtin.zig_backend == .stage2_x86_64 and
179 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
180
181174 try test__floatuntisf(0, 0.0);
182175
183176 try test__floatuntisf(1, 1.0);
......@@ -374,9 +367,6 @@ fn test__floatuntidf(a: u128, expected: f64) !void {
374367}
375368
376369test "floattidf" {
377 if (builtin.zig_backend == .stage2_x86_64 and
378 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
379
380370 try test__floattidf(0, 0.0);
381371
382372 try test__floattidf(1, 1.0);
......@@ -447,9 +437,6 @@ test "floattidf" {
447437}
448438
449439test "floatuntidf" {
450 if (builtin.zig_backend == .stage2_x86_64 and
451 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
452
453440 try test__floatuntidf(0, 0.0);
454441
455442 try test__floatuntidf(1, 1.0);
......@@ -595,9 +582,6 @@ test "floatditf" {
595582}
596583
597584test "floatunditf" {
598 if (builtin.zig_backend == .stage2_x86_64 and
599 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
600
601585 try test__floatunditf(0xffffffffffffffff, 0x403effffffffffff, 0xfffe000000000000);
602586 try test__floatunditf(0xfffffffffffffffe, 0x403effffffffffff, 0xfffc000000000000);
603587 try test__floatunditf(0x8000000000000000, 0x403e000000000000, 0x0);
......@@ -619,9 +603,6 @@ fn test__floatuntitf(a: u128, expected: f128) !void {
619603}
620604
621605test "floattitf" {
622 if (builtin.zig_backend == .stage2_x86_64 and
623 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
624
625606 try test__floattitf(0, 0.0);
626607
627608 try test__floattitf(1, 1.0);
......@@ -704,9 +685,6 @@ test "floattitf" {
704685}
705686
706687test "floatuntitf" {
707 if (builtin.zig_backend == .stage2_x86_64 and
708 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
709
710688 try test__floatuntitf(0, 0.0);
711689
712690 try test__floatuntitf(1, 1.0);
lib/compiler_rt/fma.zig-3
......@@ -343,9 +343,6 @@ test "64" {
343343}
344344
345345test "128" {
346 if (builtin.zig_backend == .stage2_x86_64 and
347 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
348
349346 const epsilon = 0.000001;
350347
351348 try expect(math.approxEqAbs(f128, fmaq(0.0, 5.0, 9.124), 9.124, epsilon));
lib/compiler_rt/fmodx_test.zig-4
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const fmod = @import("fmod.zig");
43const testing = std.testing;
54
......@@ -23,9 +22,6 @@ fn test_fmodx_infs() !void {
2322}
2423
2524test "fmodx" {
26 if (builtin.zig_backend == .stage2_x86_64 and
27 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
28
2925 try test_fmodx(6.4, 4.0, 2.4);
3026 try test_fmodx(6.4, -4.0, 2.4);
3127 try test_fmodx(-6.4, 4.0, -2.4);
lib/compiler_rt/int.zig-2
......@@ -42,8 +42,6 @@ pub fn __divmodti4(a: i128, b: i128, rem: *i128) callconv(.C) i128 {
4242}
4343
4444test "test_divmodti4" {
45 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
46
4745 const cases = [_][4]i128{
4846 [_]i128{ 0, 1, 0, 0 },
4947 [_]i128{ 0, -1, 0, 0 },
lib/compiler_rt/int_from_float_test.zig-37
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const testing = std.testing;
43const math = std.math;
54
......@@ -41,8 +40,6 @@ fn test__fixunssfsi(a: f32, expected: u32) !void {
4140}
4241
4342test "fixsfsi" {
44 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
45
4643 try test__fixsfsi(-math.floatMax(f32), math.minInt(i32));
4744
4845 try test__fixsfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32));
......@@ -106,8 +103,6 @@ test "fixsfsi" {
106103}
107104
108105test "fixunssfsi" {
109 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
110
111106 try test__fixunssfsi(0.0, 0);
112107
113108 try test__fixunssfsi(0.5, 0);
......@@ -147,8 +142,6 @@ fn test__fixunssfdi(a: f32, expected: u64) !void {
147142}
148143
149144test "fixsfdi" {
150 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
151
152145 try test__fixsfdi(-math.floatMax(f32), math.minInt(i64));
153146
154147 try test__fixsfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64));
......@@ -204,8 +197,6 @@ test "fixsfdi" {
204197}
205198
206199test "fixunssfdi" {
207 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
208
209200 try test__fixunssfdi(0.0, 0);
210201
211202 try test__fixunssfdi(0.5, 0);
......@@ -244,8 +235,6 @@ fn test__fixunssfti(a: f32, expected: u128) !void {
244235}
245236
246237test "fixsfti" {
247 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
248
249238 try test__fixsfti(-math.floatMax(f32), math.minInt(i128));
250239
251240 try test__fixsfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128));
......@@ -317,8 +306,6 @@ test "fixsfti" {
317306}
318307
319308test "fixunssfti" {
320 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
321
322309 try test__fixunssfti(0.0, 0);
323310
324311 try test__fixunssfti(0.5, 0);
......@@ -365,8 +352,6 @@ fn test__fixunsdfsi(a: f64, expected: u32) !void {
365352}
366353
367354test "fixdfsi" {
368 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
369
370355 try test__fixdfsi(-math.floatMax(f64), math.minInt(i32));
371356
372357 try test__fixdfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32));
......@@ -428,8 +413,6 @@ test "fixdfsi" {
428413}
429414
430415test "fixunsdfsi" {
431 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
432
433416 try test__fixunsdfsi(0.0, 0);
434417
435418 try test__fixunsdfsi(0.5, 0);
......@@ -472,8 +455,6 @@ fn test__fixunsdfdi(a: f64, expected: u64) !void {
472455}
473456
474457test "fixdfdi" {
475 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
476
477458 try test__fixdfdi(-math.floatMax(f64), math.minInt(i64));
478459
479460 try test__fixdfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64));
......@@ -527,8 +508,6 @@ test "fixdfdi" {
527508}
528509
529510test "fixunsdfdi" {
530 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
531
532511 try test__fixunsdfdi(0.0, 0);
533512 try test__fixunsdfdi(0.5, 0);
534513 try test__fixunsdfdi(0.99, 0);
......@@ -571,8 +550,6 @@ fn test__fixunsdfti(a: f64, expected: u128) !void {
571550}
572551
573552test "fixdfti" {
574 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
575
576553 try test__fixdfti(-math.floatMax(f64), math.minInt(i128));
577554
578555 try test__fixdfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128));
......@@ -626,8 +603,6 @@ test "fixdfti" {
626603}
627604
628605test "fixunsdfti" {
629 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
630
631606 try test__fixunsdfti(0.0, 0);
632607
633608 try test__fixunsdfti(0.5, 0);
......@@ -677,8 +652,6 @@ fn test__fixunstfsi(a: f128, expected: u32) !void {
677652}
678653
679654test "fixtfsi" {
680 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
681
682655 try test__fixtfsi(-math.floatMax(f128), math.minInt(i32));
683656
684657 try test__fixtfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32));
......@@ -742,8 +715,6 @@ test "fixtfsi" {
742715}
743716
744717test "fixunstfsi" {
745 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
746
747718 try test__fixunstfsi(math.inf(f128), 0xffffffff);
748719 try test__fixunstfsi(0, 0x0);
749720 try test__fixunstfsi(0x1.23456789abcdefp+5, 0x24);
......@@ -767,8 +738,6 @@ fn test__fixunstfdi(a: f128, expected: u64) !void {
767738}
768739
769740test "fixtfdi" {
770 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
771
772741 try test__fixtfdi(-math.floatMax(f128), math.minInt(i64));
773742
774743 try test__fixtfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64));
......@@ -832,8 +801,6 @@ test "fixtfdi" {
832801}
833802
834803test "fixunstfdi" {
835 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
836
837804 try test__fixunstfdi(0.0, 0);
838805
839806 try test__fixunstfdi(0.5, 0);
......@@ -886,8 +853,6 @@ fn test__fixunstfti(a: f128, expected: u128) !void {
886853}
887854
888855test "fixtfti" {
889 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
890
891856 try test__fixtfti(-math.floatMax(f128), math.minInt(i128));
892857
893858 try test__fixtfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128));
......@@ -969,8 +934,6 @@ fn test__fixunshfti(a: f16, expected: u128) !void {
969934}
970935
971936test "fixunshfti for f16" {
972 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
973
974937 try test__fixunshfti(math.inf(f16), math.maxInt(u128));
975938 try test__fixunshfti(math.floatMax(f16), 65504);
976939}
lib/compiler_rt/mulf3_test.zig-4
......@@ -3,7 +3,6 @@
33// https://github.com/llvm/llvm-project/blob/2ffb1b0413efa9a24eb3c49e710e36f92e2cb50b/compiler-rt/test/builtins/Unit/multf3_test.c
44
55const std = @import("std");
6const builtin = @import("builtin");
76const math = std.math;
87const qnan128: f128 = @bitCast(@as(u128, 0x7fff800000000000) << 64);
98const inf128: f128 = @bitCast(@as(u128, 0x7fff000000000000) << 64);
......@@ -49,9 +48,6 @@ fn makeNaN128(rand: u64) f128 {
4948 return @bitCast(int_result);
5049}
5150test "multf3" {
52 if (builtin.zig_backend == .stage2_x86_64 and
53 !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest;
54
5551 // qNaN * any = qNaN
5652 try test__multf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0);
5753
lib/compiler_rt/negti2_test.zig+1-3
......@@ -6,9 +6,7 @@ fn test__negti2(a: i128, expected: i128) !void {
66 try testing.expectEqual(expected, result);
77}
88
9test "negti2" {
10 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
11
9test "negdi2" {
1210 // TODO ensuring that math.minInt(i128); returns error
1311
1412 try test__negti2(-3, 3);
lib/compiler_rt/powiXf2_test.zig+2-11
......@@ -3,10 +3,8 @@
33// powihf2 adapted from powisf2 tests
44
55const powiXf2 = @import("powiXf2.zig");
6const std = @import("std");
7const builtin = @import("builtin");
8const testing = std.testing;
9const math = std.math;
6const testing = @import("std").testing;
7const math = @import("std").math;
108
119fn test__powihf2(a: f16, b: i32, expected: f16) !void {
1210 var result = powiXf2.__powihf2(a, b);
......@@ -34,9 +32,6 @@ fn test__powixf2(a: f80, b: i32, expected: f80) !void {
3432}
3533
3634test "powihf2" {
37 if (builtin.zig_backend == .stage2_x86_64 and
38 !comptime std.Target.x86.featureSetHas(builtin.cpu.features, .f16c)) return error.SkipZigTest;
39
4035 const inf_f16 = math.inf(f16);
4136 try test__powisf2(0, 0, 1);
4237 try test__powihf2(1, 0, 1);
......@@ -356,8 +351,6 @@ test "powidf2" {
356351}
357352
358353test "powitf2" {
359 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
360
361354 const inf_f128 = math.inf(f128);
362355 try test__powitf2(0, 0, 1);
363356 try test__powitf2(1, 0, 1);
......@@ -463,8 +456,6 @@ test "powitf2" {
463456}
464457
465458test "powixf2" {
466 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
467
468459 const inf_f80 = math.inf(f80);
469460 try test__powixf2(0, 0, 1);
470461 try test__powixf2(1, 0, 1);
lib/compiler_rt/sin.zig-2
......@@ -140,8 +140,6 @@ pub fn sinl(x: c_longdouble) callconv(.C) c_longdouble {
140140}
141141
142142test "sin32" {
143 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
144
145143 const epsilon = 0.00001;
146144
147145 try expect(math.approxEqAbs(f32, sinf(0.0), 0.0, epsilon));
lib/compiler_rt/suboti4_test.zig-2
......@@ -27,8 +27,6 @@ pub fn simple_suboti4(a: i128, b: i128, overflow: *c_int) i128 {
2727}
2828
2929test "suboti3" {
30 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
31
3230 const min: i128 = math.minInt(i128);
3331 const max: i128 = math.maxInt(i128);
3432 var i: i128 = 1;
lib/compiler_rt/tan.zig-4
......@@ -131,8 +131,6 @@ test "tan" {
131131}
132132
133133test "tan32" {
134 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
135
136134 const epsilon = 0.00001;
137135
138136 try expect(math.approxEqAbs(f32, tanf(0.0), 0.0, epsilon));
......@@ -144,8 +142,6 @@ test "tan32" {
144142}
145143
146144test "tan64" {
147 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
148
149145 const epsilon = 0.000001;
150146
151147 try expect(math.approxEqAbs(f64, tan(0.0), 0.0, epsilon));
lib/compiler_rt/udivmodei4.zig+1-4
......@@ -129,10 +129,7 @@ pub fn __umodei4(r_p: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize)
129129}
130130
131131test "__udivei4/__umodei4" {
132 switch (builtin.zig_backend) {
133 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
134 else => {},
135 }
132 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
136133
137134 const RndGen = std.rand.DefaultPrng;
138135 var rnd = RndGen.init(42);
lib/std/Build/Cache.zig-10
......@@ -1007,8 +1007,6 @@ test "cache file and then recall it" {
10071007 return error.SkipZigTest;
10081008 }
10091009
1010 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1011
10121010 var tmp = testing.tmpDir(.{});
10131011 defer tmp.cleanup();
10141012
......@@ -1074,9 +1072,6 @@ test "check that changing a file makes cache fail" {
10741072 // https://github.com/ziglang/zig/issues/5437
10751073 return error.SkipZigTest;
10761074 }
1077
1078 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1079
10801075 var tmp = testing.tmpDir(.{});
10811076 defer tmp.cleanup();
10821077
......@@ -1151,8 +1146,6 @@ test "no file inputs" {
11511146 return error.SkipZigTest;
11521147 }
11531148
1154 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1155
11561149 var tmp = testing.tmpDir(.{});
11571150 defer tmp.cleanup();
11581151
......@@ -1200,9 +1193,6 @@ test "Manifest with files added after initial hash work" {
12001193 // https://github.com/ziglang/zig/issues/5437
12011194 return error.SkipZigTest;
12021195 }
1203
1204 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1205
12061196 var tmp = testing.tmpDir(.{});
12071197 defer tmp.cleanup();
12081198
lib/std/Build/Step/Options.zig-2
......@@ -296,8 +296,6 @@ const Arg = struct {
296296test Options {
297297 if (builtin.os.tag == .wasi) return error.SkipZigTest;
298298
299 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
300
301299 var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
302300 defer arena.deinit();
303301
lib/std/Thread/Condition.zig-6
......@@ -369,8 +369,6 @@ test "Condition - signal" {
369369 return error.SkipZigTest;
370370 }
371371
372 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
373
374372 const num_threads = 4;
375373
376374 const SignalTest = struct {
......@@ -500,8 +498,6 @@ test "Condition - broadcasting" {
500498 return error.SkipZigTest;
501499 }
502500
503 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
504
505501 const num_threads = 10;
506502
507503 const BroadcastTest = struct {
......@@ -569,8 +565,6 @@ test "Condition - broadcasting - wake all threads" {
569565 return error.SkipZigTest;
570566 }
571567
572 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
573
574568 var num_runs: usize = 1;
575569 const num_threads = 10;
576570
lib/std/Thread/Mutex.zig-2
......@@ -289,8 +289,6 @@ test "Mutex - many contended" {
289289 return error.SkipZigTest;
290290 }
291291
292 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
293
294292 const num_threads = 4;
295293 const num_increments = 1000;
296294
lib/std/Thread/RwLock.zig-2
......@@ -297,8 +297,6 @@ test "RwLock - concurrent access" {
297297 if (builtin.single_threaded)
298298 return;
299299
300 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
301
302300 const num_writers: usize = 2;
303301 const num_readers: usize = 4;
304302 const num_writes: usize = 10000;
lib/std/Uri.zig-2
......@@ -685,8 +685,6 @@ test "Special test" {
685685}
686686
687687test "URI escaping" {
688 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
689
690688 const input = "\\ö/ äöß ~~.adas-https://canvas:123/#ads&&sad";
691689 const expected = "%5C%C3%B6%2F%20%C3%A4%C3%B6%C3%9F%20~~.adas-https%3A%2F%2Fcanvas%3A123%2F%23ads%26%26sad";
692690
lib/std/array_hash_map.zig-15
......@@ -1,5 +1,4 @@
11const std = @import("std.zig");
2const builtin = @import("builtin");
32const debug = std.debug;
43const assert = debug.assert;
54const testing = std.testing;
......@@ -2138,8 +2137,6 @@ test "ensure capacity leak" {
21382137}
21392138
21402139test "big map" {
2141 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2142
21432140 var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator);
21442141 defer map.deinit();
21452142
......@@ -2193,8 +2190,6 @@ test "big map" {
21932190}
21942191
21952192test "clone" {
2196 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2197
21982193 var original = AutoArrayHashMap(i32, i32).init(std.testing.allocator);
21992194 defer original.deinit();
22002195
......@@ -2221,8 +2216,6 @@ test "clone" {
22212216}
22222217
22232218test "shrink" {
2224 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2225
22262219 var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator);
22272220 defer map.deinit();
22282221
......@@ -2263,8 +2256,6 @@ test "shrink" {
22632256}
22642257
22652258test "pop" {
2266 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2267
22682259 var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator);
22692260 defer map.deinit();
22702261
......@@ -2283,8 +2274,6 @@ test "pop" {
22832274}
22842275
22852276test "popOrNull" {
2286 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2287
22882277 var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator);
22892278 defer map.deinit();
22902279
......@@ -2305,8 +2294,6 @@ test "popOrNull" {
23052294}
23062295
23072296test "reIndex" {
2308 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2309
23102297 var map = ArrayHashMap(i32, i32, AutoContext(i32), true).init(std.testing.allocator);
23112298 defer map.deinit();
23122299
......@@ -2351,8 +2338,6 @@ test "auto store_hash" {
23512338}
23522339
23532340test "sort" {
2354 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2355
23562341 var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator);
23572342 defer map.deinit();
23582343
lib/std/array_list.zig-11
......@@ -1,5 +1,4 @@
11const std = @import("std.zig");
2const builtin = @import("builtin");
32const debug = std.debug;
43const assert = debug.assert;
54const testing = std.testing;
......@@ -1184,8 +1183,6 @@ test "std.ArrayList/ArrayListUnmanaged.initCapacity" {
11841183}
11851184
11861185test "std.ArrayList/ArrayListUnmanaged.clone" {
1187 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1188
11891186 const a = testing.allocator;
11901187 {
11911188 var array = ArrayList(i32).init(a);
......@@ -1227,8 +1224,6 @@ test "std.ArrayList/ArrayListUnmanaged.clone" {
12271224}
12281225
12291226test "std.ArrayList/ArrayListUnmanaged.basic" {
1230 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1231
12321227 const a = testing.allocator;
12331228 {
12341229 var list = ArrayList(i32).init(a);
......@@ -1513,8 +1508,6 @@ test "std.ArrayList/ArrayListUnmanaged.insert" {
15131508}
15141509
15151510test "std.ArrayList/ArrayListUnmanaged.insertSlice" {
1516 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1517
15181511 const a = testing.allocator;
15191512 {
15201513 var list = ArrayList(i32).init(a);
......@@ -1561,8 +1554,6 @@ test "std.ArrayList/ArrayListUnmanaged.insertSlice" {
15611554}
15621555
15631556test "std.ArrayList/ArrayListUnmanaged.replaceRange" {
1564 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1565
15661557 var arena = std.heap.ArenaAllocator.init(testing.allocator);
15671558 defer arena.deinit();
15681559 const a = arena.allocator();
......@@ -1734,8 +1725,6 @@ test "shrink still sets length when resizing is disabled" {
17341725}
17351726
17361727test "shrinkAndFree with a copy" {
1737 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1738
17391728 var failing_allocator = testing.FailingAllocator.init(testing.allocator, .{ .resize_fail_index = 0 });
17401729 const a = failing_allocator.allocator();
17411730
lib/std/atomic/Atomic.zig-4
......@@ -374,8 +374,6 @@ const atomic_rmw_orderings = [_]Ordering{
374374};
375375
376376test "Atomic.swap" {
377 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
378
379377 inline for (atomic_rmw_orderings) |ordering| {
380378 var x = Atomic(usize).init(5);
381379 try testing.expectEqual(x.swap(10, ordering), 5);
......@@ -469,8 +467,6 @@ test "Atomic.fetchSub" {
469467}
470468
471469test "Atomic.fetchMin" {
472 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
473
474470 inline for (atomicIntTypes()) |Int| {
475471 inline for (atomic_rmw_orderings) |ordering| {
476472 var x = Atomic(Int).init(5);
lib/std/atomic/queue.zig-2
......@@ -175,8 +175,6 @@ const puts_per_thread = 500;
175175const put_thread_count = 3;
176176
177177test "std.atomic.Queue" {
178 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
179
180178 var plenty_of_memory = try std.heap.page_allocator.alloc(u8, 300 * 1024);
181179 defer std.heap.page_allocator.free(plenty_of_memory);
182180
lib/std/base64.zig-7
......@@ -1,6 +1,5 @@
11const std = @import("std.zig");
22const assert = std.debug.assert;
3const builtin = @import("builtin");
43const testing = std.testing;
54const mem = std.mem;
65
......@@ -355,16 +354,12 @@ pub const Base64DecoderWithIgnore = struct {
355354};
356355
357356test "base64" {
358 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
359
360357 @setEvalBranchQuota(8000);
361358 try testBase64();
362359 try comptime testAllApis(standard, "comptime", "Y29tcHRpbWU=");
363360}
364361
365362test "base64 padding dest overflow" {
366 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
367
368363 const input = "foo";
369364
370365 var expect: [128]u8 = undefined;
......@@ -379,8 +374,6 @@ test "base64 padding dest overflow" {
379374}
380375
381376test "base64 url_safe_no_pad" {
382 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
383
384377 @setEvalBranchQuota(8000);
385378 try testBase64UrlSafeNoPad();
386379 try comptime testAllApis(url_safe_no_pad, "comptime", "Y29tcHRpbWU");
lib/std/bit_set.zig+1-14
......@@ -33,7 +33,6 @@
3333const std = @import("std.zig");
3434const assert = std.debug.assert;
3535const Allocator = std.mem.Allocator;
36const builtin = @import("builtin");
3736
3837/// Returns the optimal static bit set type for the specified number
3938/// of elements: either `IntegerBitSet` or `ArrayBitSet`,
......@@ -1637,10 +1636,7 @@ fn testStaticBitSet(comptime Set: type) !void {
16371636}
16381637
16391638test "IntegerBitSet" {
1640 switch (builtin.zig_backend) {
1641 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1642 else => {},
1643 }
1639 if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest;
16441640
16451641 try testStaticBitSet(IntegerBitSet(0));
16461642 try testStaticBitSet(IntegerBitSet(1));
......@@ -1653,11 +1649,6 @@ test "IntegerBitSet" {
16531649}
16541650
16551651test "ArrayBitSet" {
1656 switch (builtin.zig_backend) {
1657 .stage2_x86_64 => return error.SkipZigTest,
1658 else => {},
1659 }
1660
16611652 inline for (.{ 0, 1, 2, 31, 32, 33, 63, 64, 65, 254, 500, 3000 }) |size| {
16621653 try testStaticBitSet(ArrayBitSet(u8, size));
16631654 try testStaticBitSet(ArrayBitSet(u16, size));
......@@ -1668,8 +1659,6 @@ test "ArrayBitSet" {
16681659}
16691660
16701661test "DynamicBitSetUnmanaged" {
1671 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1672
16731662 const allocator = std.testing.allocator;
16741663 var a = try DynamicBitSetUnmanaged.initEmpty(allocator, 300);
16751664 try testing.expectEqual(@as(usize, 0), a.count());
......@@ -1723,8 +1712,6 @@ test "DynamicBitSetUnmanaged" {
17231712}
17241713
17251714test "DynamicBitSet" {
1726 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1727
17281715 const allocator = std.testing.allocator;
17291716 var a = try DynamicBitSet.initEmpty(allocator, 300);
17301717 try testing.expectEqual(@as(usize, 0), a.count());
lib/std/compress/deflate/compressor.zig-2
......@@ -1069,8 +1069,6 @@ var deflate_tests = [_]DeflateTest{
10691069};
10701070
10711071test "deflate" {
1072 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1073
10741072 for (deflate_tests) |dt| {
10751073 var output = ArrayList(u8).init(testing.allocator);
10761074 defer output.deinit();
lib/std/compress/deflate/compressor_test.zig-18
......@@ -154,8 +154,6 @@ fn testToFromWithLimit(input: []const u8, limit: [11]u32) !void {
154154}
155155
156156test "deflate/inflate" {
157 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
158
159157 var limits = [_]u32{0} ** 11;
160158
161159 var test0 = [_]u8{};
......@@ -180,8 +178,6 @@ test "deflate/inflate" {
180178}
181179
182180test "very long sparse chunk" {
183 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
184
185181 // A SparseReader returns a stream consisting of 0s ending with 65,536 (1<<16) 1s.
186182 // This tests missing hash references in a very large input.
187183 const SparseReader = struct {
......@@ -243,8 +239,6 @@ test "very long sparse chunk" {
243239}
244240
245241test "compressor reset" {
246 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
247
248242 for (std.enums.values(deflate.Compression)) |c| {
249243 try testWriterReset(c, null);
250244 try testWriterReset(c, "dict");
......@@ -295,8 +289,6 @@ fn testWriterReset(level: deflate.Compression, dict: ?[]const u8) !void {
295289}
296290
297291test "decompressor dictionary" {
298 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
299
300292 const dict = "hello world"; // dictionary
301293 const text = "hello again world";
302294
......@@ -337,8 +329,6 @@ test "decompressor dictionary" {
337329}
338330
339331test "compressor dictionary" {
340 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
341
342332 const dict = "hello world";
343333 const text = "hello again world";
344334
......@@ -385,8 +375,6 @@ test "compressor dictionary" {
385375// Update the hash for best_speed only if d.index < d.maxInsertIndex
386376// See https://golang.org/issue/2508
387377test "Go non-regression test for 2508" {
388 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
389
390378 var comp = try compressor(
391379 testing.allocator,
392380 io.null_writer,
......@@ -404,8 +392,6 @@ test "Go non-regression test for 2508" {
404392}
405393
406394test "deflate/inflate string" {
407 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
408
409395 const StringTest = struct {
410396 filename: []const u8,
411397 limit: [11]u32,
......@@ -453,8 +439,6 @@ test "deflate/inflate string" {
453439}
454440
455441test "inflate reset" {
456 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
457
458442 const strings = [_][]const u8{
459443 "lorem ipsum izzle fo rizzle",
460444 "the quick brown fox jumped over",
......@@ -501,8 +485,6 @@ test "inflate reset" {
501485}
502486
503487test "inflate reset dictionary" {
504 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
505
506488 const dict = "the lorem fox";
507489 const strings = [_][]const u8{
508490 "lorem ipsum izzle fo rizzle",
lib/std/compress/deflate/deflate_fast.zig-2
......@@ -649,8 +649,6 @@ test "best speed shift offsets" {
649649}
650650
651651test "best speed reset" {
652 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
653
654652 // test that encoding is consistent across a warparound of the table offset.
655653 // See https://github.com/golang/go/issues/34121
656654 const fmt = std.fmt;
lib/std/compress/deflate/deflate_fast_test.zig-5
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const expect = std.testing.expect;
43const io = std.io;
54const mem = std.mem;
......@@ -12,8 +11,6 @@ const inflate = @import("decompressor.zig");
1211const deflate_const = @import("deflate_const.zig");
1312
1413test "best speed" {
15 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
16
1714 // Tests that round-tripping through deflate and then inflate recovers the original input.
1815 // The Write sizes are near the thresholds in the compressor.encSpeed method (0, 16, 128), as well
1916 // as near `deflate_const.max_store_block_size` (65535).
......@@ -96,8 +93,6 @@ test "best speed" {
9693}
9794
9895test "best speed max match offset" {
99 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
100
10196 const abc = "abcdefgh";
10297 const xyz = "stuvwxyz";
10398 const input_margin = 16 - 1;
lib/std/compress/deflate/huffman_bit_writer.zig-6
......@@ -845,8 +845,6 @@ const testing = std.testing;
845845const ArrayList = std.ArrayList;
846846
847847test "writeBlockHuff" {
848 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
849
850848 // Tests huffman encoding against reference files to detect possible regressions.
851849 // If encoding/bit allocation changes you can regenerate these files
852850
......@@ -1571,8 +1569,6 @@ const TestType = enum {
15711569};
15721570
15731571test "writeBlock" {
1574 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1575
15761572 // tests if the writeBlock encoding has changed.
15771573
15781574 const ttype: TestType = .write_block;
......@@ -1588,8 +1584,6 @@ test "writeBlock" {
15881584}
15891585
15901586test "writeBlockDynamic" {
1591 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1592
15931587 // tests if the writeBlockDynamic encoding has changed.
15941588
15951589 const ttype: TestType = .write_dyn_block;
lib/std/compress/deflate/huffman_code.zig-2
......@@ -360,8 +360,6 @@ fn byFreq(context: void, a: LiteralNode, b: LiteralNode) bool {
360360}
361361
362362test "generate a Huffman code from an array of frequencies" {
363 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
364
365363 var freqs: [19]u16 = [_]u16{
366364 8, // 0
367365 1, // 1
lib/std/compress/gzip.zig-2
......@@ -174,8 +174,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void {
174174// https://tools.ietf.org/rfc/rfc1952.txt length=25037 bytes
175175// SHA256=164ef0897b4cbec63abf1b57f069f3599bd0fb7c72c2a4dee21bd7e03ec9af67
176176test "compressed data" {
177 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
178
179177 try testReader(
180178 @embedFile("testdata/rfc1952.txt.gz"),
181179 @embedFile("testdata/rfc1952.txt"),
lib/std/compress/lzma/test.zig-17
......@@ -1,5 +1,4 @@
11const std = @import("../../std.zig");
2const builtin = @import("builtin");
32const lzma = @import("../lzma.zig");
43
54fn testDecompress(compressed: []const u8) ![]u8 {
......@@ -23,8 +22,6 @@ fn testDecompressError(expected: anyerror, compressed: []const u8) !void {
2322}
2423
2524test "LZMA: decompress empty world" {
26 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
27
2825 try testDecompressEqual(
2926 "",
3027 &[_]u8{
......@@ -35,8 +32,6 @@ test "LZMA: decompress empty world" {
3532}
3633
3734test "LZMA: decompress hello world" {
38 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
39
4035 try testDecompressEqual(
4136 "Hello world\n",
4237 &[_]u8{
......@@ -48,8 +43,6 @@ test "LZMA: decompress hello world" {
4843}
4944
5045test "LZMA: decompress huge dict" {
51 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
52
5346 try testDecompressEqual(
5447 "Hello world\n",
5548 &[_]u8{
......@@ -61,8 +54,6 @@ test "LZMA: decompress huge dict" {
6154}
6255
6356test "LZMA: unknown size with end of payload marker" {
64 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
65
6657 try testDecompressEqual(
6758 "Hello\nWorld!\n",
6859 @embedFile("testdata/good-unknown_size-with_eopm.lzma"),
......@@ -70,8 +61,6 @@ test "LZMA: unknown size with end of payload marker" {
7061}
7162
7263test "LZMA: known size without end of payload marker" {
73 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
74
7564 try testDecompressEqual(
7665 "Hello\nWorld!\n",
7766 @embedFile("testdata/good-known_size-without_eopm.lzma"),
......@@ -79,8 +68,6 @@ test "LZMA: known size without end of payload marker" {
7968}
8069
8170test "LZMA: known size with end of payload marker" {
82 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
83
8471 try testDecompressEqual(
8572 "Hello\nWorld!\n",
8673 @embedFile("testdata/good-known_size-with_eopm.lzma"),
......@@ -88,8 +75,6 @@ test "LZMA: known size with end of payload marker" {
8875}
8976
9077test "LZMA: too big uncompressed size in header" {
91 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
92
9378 try testDecompressError(
9479 error.CorruptInput,
9580 @embedFile("testdata/bad-too_big_size-with_eopm.lzma"),
......@@ -97,8 +82,6 @@ test "LZMA: too big uncompressed size in header" {
9782}
9883
9984test "LZMA: too small uncompressed size in header" {
100 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
101
10285 try testDecompressError(
10386 error.CorruptInput,
10487 @embedFile("testdata/bad-too_small_size-without_eopm-3.lzma"),
lib/std/compress/lzma/vec2d.zig-2
......@@ -50,8 +50,6 @@ const expectEqualSlices = std.testing.expectEqualSlices;
5050const expectError = std.testing.expectError;
5151
5252test "Vec2D.init" {
53 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
54
5553 const allocator = testing.allocator;
5654 var vec2d = try Vec2D(i32).init(allocator, 1, .{ 2, 3 });
5755 defer vec2d.deinit(allocator);
lib/std/compress/xz/test.zig-2
......@@ -19,8 +19,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void {
1919}
2020
2121test "compressed data" {
22 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
23
2422 try testReader(@embedFile("testdata/good-0-empty.xz"), "");
2523
2624 inline for ([_][]const u8{
lib/std/compress/zlib.zig-4
......@@ -199,8 +199,6 @@ fn testDecompress(data: []const u8, expected: []const u8) !void {
199199// https://tools.ietf.org/rfc/rfc1951.txt length=36944 bytes
200200// SHA256=5ebf4b5b7fe1c3a0c0ab9aa3ac8c0f3853a7dc484905e76e03b0b0f301350009
201201test "compressed data" {
202 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
203
204202 const rfc1951_txt = @embedFile("testdata/rfc1951.txt");
205203
206204 // Compressed with compression level = 0
......@@ -266,8 +264,6 @@ test "sanity checks" {
266264}
267265
268266test "compress data" {
269 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
270
271267 const allocator = testing.allocator;
272268 const rfc1951_txt = @embedFile("testdata/rfc1951.txt");
273269
lib/std/compress/zstandard.zig-2
......@@ -264,8 +264,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void {
264264}
265265
266266test "zstandard decompression" {
267 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
268
269267 const uncompressed = @embedFile("testdata/rfc8478.txt");
270268 const compressed3 = @embedFile("testdata/rfc8478.txt.zst.3");
271269 const compressed19 = @embedFile("testdata/rfc8478.txt.zst.19");
lib/std/crypto.zig-2
......@@ -314,8 +314,6 @@ test "CSPRNG" {
314314}
315315
316316test "issue #4532: no index out of bounds" {
317 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
318
319317 const types = [_]type{
320318 hash.Md5,
321319 hash.Sha1,
lib/std/crypto/25519/curve25519.zig-5
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const crypto = std.crypto;
43
54const IdentityElementError = crypto.errors.IdentityElementError;
......@@ -112,8 +111,6 @@ pub const Curve25519 = struct {
112111};
113112
114113test "curve25519" {
115 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
116
117114 var s = [32]u8{ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8 };
118115 const p = try Curve25519.basePoint.clampedMul(s);
119116 try p.rejectIdentity();
......@@ -128,8 +125,6 @@ test "curve25519" {
128125}
129126
130127test "curve25519 small order check" {
131 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
132
133128 var s: [32]u8 = [_]u8{1} ++ [_]u8{0} ** 31;
134129 const small_order_ss: [7][32]u8 = .{
135130 .{
lib/std/crypto/25519/ed25519.zig+1-15
......@@ -1,5 +1,5 @@
1const std = @import("std");
21const builtin = @import("builtin");
2const std = @import("std");
33const crypto = std.crypto;
44const debug = std.debug;
55const fmt = std.fmt;
......@@ -484,8 +484,6 @@ pub const Ed25519 = struct {
484484};
485485
486486test "ed25519 key pair creation" {
487 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
488
489487 var seed: [32]u8 = undefined;
490488 _ = try fmt.hexToBytes(seed[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166");
491489 const key_pair = try Ed25519.KeyPair.create(seed);
......@@ -495,8 +493,6 @@ test "ed25519 key pair creation" {
495493}
496494
497495test "ed25519 signature" {
498 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
499
500496 var seed: [32]u8 = undefined;
501497 _ = try fmt.hexToBytes(seed[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166");
502498 const key_pair = try Ed25519.KeyPair.create(seed);
......@@ -509,8 +505,6 @@ test "ed25519 signature" {
509505}
510506
511507test "ed25519 batch verification" {
512 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
513
514508 var i: usize = 0;
515509 while (i < 100) : (i += 1) {
516510 const key_pair = try Ed25519.KeyPair.create(null);
......@@ -540,8 +534,6 @@ test "ed25519 batch verification" {
540534}
541535
542536test "ed25519 test vectors" {
543 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
544
545537 const Vec = struct {
546538 msg_hex: *const [64:0]u8,
547539 public_key_hex: *const [64:0]u8,
......@@ -644,8 +636,6 @@ test "ed25519 test vectors" {
644636}
645637
646638test "ed25519 with blind keys" {
647 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
648
649639 const BlindKeyPair = Ed25519.key_blinding.BlindKeyPair;
650640
651641 // Create a standard Ed25519 key pair
......@@ -669,8 +659,6 @@ test "ed25519 with blind keys" {
669659}
670660
671661test "ed25519 signatures with streaming" {
672 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
673
674662 const kp = try Ed25519.KeyPair.create(null);
675663
676664 var signer = try kp.signer(null);
......@@ -687,8 +675,6 @@ test "ed25519 signatures with streaming" {
687675}
688676
689677test "ed25519 key pair from secret key" {
690 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
691
692678 const kp = try Ed25519.KeyPair.create(null);
693679 const kp2 = try Ed25519.KeyPair.fromSecretKey(kp.secret_key);
694680 try std.testing.expectEqualSlices(u8, &kp.secret_key.toBytes(), &kp2.secret_key.toBytes());
lib/std/crypto/25519/edwards25519.zig-11
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const crypto = std.crypto;
43const debug = std.debug;
54const fmt = std.fmt;
......@@ -495,8 +494,6 @@ pub const Edwards25519 = struct {
495494const htest = @import("../test.zig");
496495
497496test "edwards25519 packing/unpacking" {
498 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
499
500497 const s = [_]u8{170} ++ [_]u8{0} ** 31;
501498 var b = Edwards25519.basePoint;
502499 const pk = try b.mul(s);
......@@ -533,8 +530,6 @@ test "edwards25519 packing/unpacking" {
533530}
534531
535532test "edwards25519 point addition/subtraction" {
536 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
537
538533 var s1: [32]u8 = undefined;
539534 var s2: [32]u8 = undefined;
540535 crypto.random.bytes(&s1);
......@@ -549,8 +544,6 @@ test "edwards25519 point addition/subtraction" {
549544}
550545
551546test "edwards25519 uniform-to-point" {
552 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
553
554547 var r = [32]u8{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
555548 var p = Edwards25519.fromUniform(r);
556549 try htest.assertEqual("0691eee3cf70a0056df6bfa03120635636581b5c4ea571dfc680f78c7e0b4137", p.toBytes()[0..]);
......@@ -562,8 +555,6 @@ test "edwards25519 uniform-to-point" {
562555
563556// Test vectors from draft-irtf-cfrg-hash-to-curve-12
564557test "edwards25519 hash-to-curve operation" {
565 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
566
567558 var p = Edwards25519.fromString(true, "QUUX-V01-CS02-with-edwards25519_XMD:SHA-512_ELL2_RO_", "abc");
568559 try htest.assertEqual("31558a26887f23fb8218f143e69d5f0af2e7831130bd5b432ef23883b895839a", p.toBytes()[0..]);
569560
......@@ -572,8 +563,6 @@ test "edwards25519 hash-to-curve operation" {
572563}
573564
574565test "edwards25519 implicit reduction of invalid scalars" {
575 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
576
577566 const s = [_]u8{0} ** 31 ++ [_]u8{255};
578567 const p1 = try Edwards25519.basePoint.mulPublic(s);
579568 const p2 = try Edwards25519.basePoint.mul(s);
lib/std/crypto/25519/ristretto255.zig-2
......@@ -168,8 +168,6 @@ pub const Ristretto255 = struct {
168168};
169169
170170test "ristretto255" {
171 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
172
173171 const p = Ristretto255.basePoint;
174172 var buf: [256]u8 = undefined;
175173 try std.testing.expectEqualStrings(try std.fmt.bufPrint(&buf, "{s}", .{std.fmt.fmtSliceHexUpper(&p.toBytes())}), "E2F2AE0A6ABC4E71A884A961C500515F58E30B6AA582DD8DB6A65945E08D2D76");
lib/std/crypto/25519/x25519.zig-15
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const crypto = std.crypto;
43const mem = std.mem;
54const fmt = std.fmt;
......@@ -83,8 +82,6 @@ pub const X25519 = struct {
8382const htest = @import("../test.zig");
8483
8584test "x25519 public key calculation from secret key" {
86 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
87
8885 var sk: [32]u8 = undefined;
8986 var pk_expected: [32]u8 = undefined;
9087 _ = try fmt.hexToBytes(sk[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166");
......@@ -94,8 +91,6 @@ test "x25519 public key calculation from secret key" {
9491}
9592
9693test "x25519 rfc7748 vector1" {
97 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
98
9994 const secret_key = [32]u8{ 0xa5, 0x46, 0xe3, 0x6b, 0xf0, 0x52, 0x7c, 0x9d, 0x3b, 0x16, 0x15, 0x4b, 0x82, 0x46, 0x5e, 0xdd, 0x62, 0x14, 0x4c, 0x0a, 0xc1, 0xfc, 0x5a, 0x18, 0x50, 0x6a, 0x22, 0x44, 0xba, 0x44, 0x9a, 0xc4 };
10095 const public_key = [32]u8{ 0xe6, 0xdb, 0x68, 0x67, 0x58, 0x30, 0x30, 0xdb, 0x35, 0x94, 0xc1, 0xa4, 0x24, 0xb1, 0x5f, 0x7c, 0x72, 0x66, 0x24, 0xec, 0x26, 0xb3, 0x35, 0x3b, 0x10, 0xa9, 0x03, 0xa6, 0xd0, 0xab, 0x1c, 0x4c };
10196
......@@ -106,8 +101,6 @@ test "x25519 rfc7748 vector1" {
106101}
107102
108103test "x25519 rfc7748 vector2" {
109 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
110
111104 const secret_key = [32]u8{ 0x4b, 0x66, 0xe9, 0xd4, 0xd1, 0xb4, 0x67, 0x3c, 0x5a, 0xd2, 0x26, 0x91, 0x95, 0x7d, 0x6a, 0xf5, 0xc1, 0x1b, 0x64, 0x21, 0xe0, 0xea, 0x01, 0xd4, 0x2c, 0xa4, 0x16, 0x9e, 0x79, 0x18, 0xba, 0x0d };
112105 const public_key = [32]u8{ 0xe5, 0x21, 0x0f, 0x12, 0x78, 0x68, 0x11, 0xd3, 0xf4, 0xb7, 0x95, 0x9d, 0x05, 0x38, 0xae, 0x2c, 0x31, 0xdb, 0xe7, 0x10, 0x6f, 0xc0, 0x3c, 0x3e, 0xfc, 0x4c, 0xd5, 0x49, 0xc7, 0x15, 0xa4, 0x93 };
113106
......@@ -118,8 +111,6 @@ test "x25519 rfc7748 vector2" {
118111}
119112
120113test "x25519 rfc7748 one iteration" {
121 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
122
123114 const initial_value = [32]u8{ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
124115 const expected_output = [32]u8{ 0x42, 0x2c, 0x8e, 0x7a, 0x62, 0x27, 0xd7, 0xbc, 0xa1, 0x35, 0x0b, 0x3e, 0x2b, 0xb7, 0x27, 0x9f, 0x78, 0x97, 0xb8, 0x7b, 0xb6, 0x85, 0x4b, 0x78, 0x3c, 0x60, 0xe8, 0x03, 0x11, 0xae, 0x30, 0x79 };
125116
......@@ -137,8 +128,6 @@ test "x25519 rfc7748 one iteration" {
137128}
138129
139130test "x25519 rfc7748 1,000 iterations" {
140 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
141
142131 // These iteration tests are slow so we always skip them. Results have been verified.
143132 if (true) {
144133 return error.SkipZigTest;
......@@ -161,8 +150,6 @@ test "x25519 rfc7748 1,000 iterations" {
161150}
162151
163152test "x25519 rfc7748 1,000,000 iterations" {
164 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
165
166153 if (true) {
167154 return error.SkipZigTest;
168155 }
......@@ -184,8 +171,6 @@ test "x25519 rfc7748 1,000,000 iterations" {
184171}
185172
186173test "edwards25519 -> curve25519 map" {
187 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
188
189174 const ed_kp = try crypto.sign.Ed25519.KeyPair.create([_]u8{0x42} ** 32);
190175 const mont_kp = try X25519.KeyPair.fromEd25519(ed_kp);
191176 try htest.assertEqual("90e7595fc89e52fdfddce9c6a43d74dbf6047025ee0462d2d172e8b6a2841d6e", &mont_kp.secret_key);
lib/std/crypto/Certificate.zig-6
......@@ -624,8 +624,6 @@ pub fn parseTimeDigits(text: *const [2]u8, min: u8, max: u8) !u8 {
624624}
625625
626626test parseTimeDigits {
627 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
628
629627 const expectEqual = std.testing.expectEqual;
630628 try expectEqual(@as(u8, 0), try parseTimeDigits("00", 0, 99));
631629 try expectEqual(@as(u8, 99), try parseTimeDigits("99", 0, 99));
......@@ -647,8 +645,6 @@ pub fn parseYear4(text: *const [4]u8) !u16 {
647645}
648646
649647test parseYear4 {
650 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
651
652648 const expectEqual = std.testing.expectEqual;
653649 try expectEqual(@as(u16, 0), try parseYear4("0000"));
654650 try expectEqual(@as(u16, 9999), try parseYear4("9999"));
......@@ -1123,5 +1119,3 @@ pub const rsa = struct {
11231119 return res;
11241120 }
11251121};
1126
1127const builtin = @import("builtin");
lib/std/crypto/Certificate/Bundle.zig-2
......@@ -318,8 +318,6 @@ const MapContext = struct {
318318test "scan for OS-provided certificates" {
319319 if (builtin.os.tag == .wasi) return error.SkipZigTest;
320320
321 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
322
323321 var bundle: Bundle = .{};
324322 defer bundle.deinit(std.testing.allocator);
325323
lib/std/crypto/aegis.zig-15
......@@ -17,7 +17,6 @@
1717//! https://datatracker.ietf.org/doc/draft-irtf-cfrg-aegis-aead/
1818
1919const std = @import("std");
20const builtin = @import("builtin");
2120const crypto = std.crypto;
2221const mem = std.mem;
2322const assert = std.debug.assert;
......@@ -514,8 +513,6 @@ const htest = @import("test.zig");
514513const testing = std.testing;
515514
516515test "Aegis128L test vector 1" {
517 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
518
519516 const key: [Aegis128L.key_length]u8 = [_]u8{ 0x10, 0x01 } ++ [_]u8{0x00} ** 14;
520517 const nonce: [Aegis128L.nonce_length]u8 = [_]u8{ 0x10, 0x00, 0x02 } ++ [_]u8{0x00} ** 13;
521518 const ad = [8]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
......@@ -539,8 +536,6 @@ test "Aegis128L test vector 1" {
539536}
540537
541538test "Aegis128L test vector 2" {
542 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
543
544539 const key: [Aegis128L.key_length]u8 = [_]u8{0x00} ** 16;
545540 const nonce: [Aegis128L.nonce_length]u8 = [_]u8{0x00} ** 16;
546541 const ad = [_]u8{};
......@@ -558,8 +553,6 @@ test "Aegis128L test vector 2" {
558553}
559554
560555test "Aegis128L test vector 3" {
561 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
562
563556 const key: [Aegis128L.key_length]u8 = [_]u8{0x00} ** 16;
564557 const nonce: [Aegis128L.nonce_length]u8 = [_]u8{0x00} ** 16;
565558 const ad = [_]u8{};
......@@ -576,8 +569,6 @@ test "Aegis128L test vector 3" {
576569}
577570
578571test "Aegis256 test vector 1" {
579 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
580
581572 const key: [Aegis256.key_length]u8 = [_]u8{ 0x10, 0x01 } ++ [_]u8{0x00} ** 30;
582573 const nonce: [Aegis256.nonce_length]u8 = [_]u8{ 0x10, 0x00, 0x02 } ++ [_]u8{0x00} ** 29;
583574 const ad = [8]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
......@@ -601,8 +592,6 @@ test "Aegis256 test vector 1" {
601592}
602593
603594test "Aegis256 test vector 2" {
604 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
605
606595 const key: [Aegis256.key_length]u8 = [_]u8{0x00} ** 32;
607596 const nonce: [Aegis256.nonce_length]u8 = [_]u8{0x00} ** 32;
608597 const ad = [_]u8{};
......@@ -620,8 +609,6 @@ test "Aegis256 test vector 2" {
620609}
621610
622611test "Aegis256 test vector 3" {
623 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
624
625612 const key: [Aegis256.key_length]u8 = [_]u8{0x00} ** 32;
626613 const nonce: [Aegis256.nonce_length]u8 = [_]u8{0x00} ** 32;
627614 const ad = [_]u8{};
......@@ -638,8 +625,6 @@ test "Aegis256 test vector 3" {
638625}
639626
640627test "Aegis MAC" {
641 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
642
643628 const key = [_]u8{0x00} ** Aegis128LMac.key_length;
644629 var msg: [64]u8 = undefined;
645630 for (&msg, 0..) |*m, i| {
lib/std/crypto/aes.zig-10
......@@ -28,8 +28,6 @@ pub const Aes128 = impl.Aes128;
2828pub const Aes256 = impl.Aes256;
2929
3030test "ctr" {
31 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
32
3331 // NIST SP 800-38A pp 55-58
3432 const ctr = @import("modes.zig").ctr;
3533
......@@ -55,8 +53,6 @@ test "ctr" {
5553}
5654
5755test "encrypt" {
58 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
59
6056 // Appendix B
6157 {
6258 const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c };
......@@ -86,8 +82,6 @@ test "encrypt" {
8682}
8783
8884test "decrypt" {
89 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
90
9185 // Appendix B
9286 {
9387 const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c };
......@@ -117,8 +111,6 @@ test "decrypt" {
117111}
118112
119113test "expand 128-bit key" {
120 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
121
122114 const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c };
123115 const exp_enc = [_]*const [32:0]u8{
124116 "2b7e151628aed2a6abf7158809cf4f3c", "a0fafe1788542cb123a339392a6c7605", "f2c295f27a96b9435935807a7359f67f", "3d80477d4716fe3e1e237e446d7a883b", "ef44a541a8525b7fb671253bdb0bad00", "d4d1c6f87c839d87caf2b8bc11f915bc", "6d88a37a110b3efddbf98641ca0093fd", "4e54f70e5f5fc9f384a64fb24ea6dc4f", "ead27321b58dbad2312bf5607f8d292f", "ac7766f319fadc2128d12941575c006e", "d014f9a8c9ee2589e13f0cc8b6630ca6",
......@@ -141,8 +133,6 @@ test "expand 128-bit key" {
141133}
142134
143135test "expand 256-bit key" {
144 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
145
146136 const key = [_]u8{
147137 0x60, 0x3d, 0xeb, 0x10,
148138 0x15, 0xca, 0x71, 0xbe,
lib/std/crypto/aes_gcm.zig-9
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const assert = std.debug.assert;
43const crypto = std.crypto;
54const debug = std.debug;
......@@ -113,8 +112,6 @@ const htest = @import("test.zig");
113112const testing = std.testing;
114113
115114test "Aes256Gcm - Empty message and no associated data" {
116 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
117
118115 const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length;
119116 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length;
120117 const ad = "";
......@@ -127,8 +124,6 @@ test "Aes256Gcm - Empty message and no associated data" {
127124}
128125
129126test "Aes256Gcm - Associated data only" {
130 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
131
132127 const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length;
133128 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length;
134129 const m = "";
......@@ -141,8 +136,6 @@ test "Aes256Gcm - Associated data only" {
141136}
142137
143138test "Aes256Gcm - Message only" {
144 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
145
146139 const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length;
147140 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length;
148141 const m = "Test with message only";
......@@ -160,8 +153,6 @@ test "Aes256Gcm - Message only" {
160153}
161154
162155test "Aes256Gcm - Message and associated data" {
163 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
164
165156 const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length;
166157 const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length;
167158 const m = "Test with message";
lib/std/crypto/aes_ocb.zig+4-16
......@@ -261,10 +261,7 @@ inline fn xorWith(x: *Block, y: Block) void {
261261const hexToBytes = std.fmt.hexToBytes;
262262
263263test "AesOcb test vector 1" {
264 switch (builtin.zig_backend) {
265 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
266 else => {},
267 }
264 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
268265
269266 var k: [Aes128Ocb.key_length]u8 = undefined;
270267 var nonce: [Aes128Ocb.nonce_length]u8 = undefined;
......@@ -283,10 +280,7 @@ test "AesOcb test vector 1" {
283280}
284281
285282test "AesOcb test vector 2" {
286 switch (builtin.zig_backend) {
287 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
288 else => {},
289 }
283 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
290284
291285 var k: [Aes128Ocb.key_length]u8 = undefined;
292286 var nonce: [Aes128Ocb.nonce_length]u8 = undefined;
......@@ -307,10 +301,7 @@ test "AesOcb test vector 2" {
307301}
308302
309303test "AesOcb test vector 3" {
310 switch (builtin.zig_backend) {
311 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
312 else => {},
313 }
304 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
314305
315306 var k: [Aes128Ocb.key_length]u8 = undefined;
316307 var nonce: [Aes128Ocb.nonce_length]u8 = undefined;
......@@ -334,10 +325,7 @@ test "AesOcb test vector 3" {
334325}
335326
336327test "AesOcb test vector 4" {
337 switch (builtin.zig_backend) {
338 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
339 else => {},
340 }
328 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
341329
342330 var k: [Aes128Ocb.key_length]u8 = undefined;
343331 var nonce: [Aes128Ocb.nonce_length]u8 = undefined;
lib/std/crypto/argon2.zig-14
......@@ -622,8 +622,6 @@ pub fn strVerify(
622622}
623623
624624test "argon2d" {
625 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
626
627625 const password = [_]u8{0x01} ** 32;
628626 const salt = [_]u8{0x02} ** 16;
629627 const secret = [_]u8{0x03} ** 8;
......@@ -649,8 +647,6 @@ test "argon2d" {
649647}
650648
651649test "argon2i" {
652 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
653
654650 const password = [_]u8{0x01} ** 32;
655651 const salt = [_]u8{0x02} ** 16;
656652 const secret = [_]u8{0x03} ** 8;
......@@ -676,8 +672,6 @@ test "argon2i" {
676672}
677673
678674test "argon2id" {
679 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
680
681675 const password = [_]u8{0x01} ** 32;
682676 const salt = [_]u8{0x02} ** 16;
683677 const secret = [_]u8{0x03} ** 8;
......@@ -703,8 +697,6 @@ test "argon2id" {
703697}
704698
705699test "kdf" {
706 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
707
708700 const password = "password";
709701 const salt = "somesalt";
710702
......@@ -904,8 +896,6 @@ test "kdf" {
904896}
905897
906898test "phc format hasher" {
907 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
908
909899 const allocator = std.testing.allocator;
910900 const password = "testpass";
911901
......@@ -921,8 +911,6 @@ test "phc format hasher" {
921911}
922912
923913test "password hash and password verify" {
924 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
925
926914 const allocator = std.testing.allocator;
927915 const password = "testpass";
928916
......@@ -936,8 +924,6 @@ test "password hash and password verify" {
936924}
937925
938926test "kdf derived key length" {
939 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
940
941927 const allocator = std.testing.allocator;
942928
943929 const password = "testpass";
lib/std/crypto/bcrypt.zig-7
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const base64 = std.base64;
43const crypto = std.crypto;
54const debug = std.debug;
......@@ -754,8 +753,6 @@ pub fn strVerify(
754753}
755754
756755test "bcrypt codec" {
757 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
758
759756 var salt: [salt_length]u8 = undefined;
760757 crypto.random.bytes(&salt);
761758 var salt_str: [salt_str_length]u8 = undefined;
......@@ -766,8 +763,6 @@ test "bcrypt codec" {
766763}
767764
768765test "bcrypt crypt format" {
769 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
770
771766 var hash_options = HashOptions{
772767 .params = .{ .rounds_log = 5 },
773768 .encoding = .crypt,
......@@ -808,8 +803,6 @@ test "bcrypt crypt format" {
808803}
809804
810805test "bcrypt phc format" {
811 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
812
813806 var hash_options = HashOptions{
814807 .params = .{ .rounds_log = 5 },
815808 .encoding = .phc,
lib/std/crypto/blake3.zig+1-3
......@@ -200,7 +200,7 @@ const CompressGeneric = struct {
200200 }
201201};
202202
203const compress = if (builtin.cpu.arch == .x86_64 and builtin.zig_backend != .stage2_x86_64)
203const compress = if (builtin.cpu.arch == .x86_64)
204204 CompressVectorized.compress
205205else
206206 CompressGeneric.compress;
......@@ -682,8 +682,6 @@ fn testBlake3(hasher: *Blake3, input_len: usize, expected_hex: [262]u8) !void {
682682}
683683
684684test "BLAKE3 reference test cases" {
685 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
686
687685 var hash_state = Blake3.init(.{});
688686 const hash = &hash_state;
689687 var keyed_hash_state = Blake3.init(.{ .key = reference_test.key.* });
lib/std/crypto/chacha20.zig-22
......@@ -499,8 +499,6 @@ fn ChaChaNonVecImpl(comptime rounds_nb: usize) type {
499499fn ChaChaImpl(comptime rounds_nb: usize) type {
500500 switch (builtin.cpu.arch) {
501501 .x86_64 => {
502 if (builtin.zig_backend == .stage2_x86_64) return ChaChaNonVecImpl(rounds_nb);
503
504502 const has_avx2 = std.Target.x86.featureSetHas(builtin.cpu.features, .avx2);
505503 const has_avx512f = std.Target.x86.featureSetHas(builtin.cpu.features, .avx512f);
506504 if (has_avx512f) return ChaChaVecImpl(rounds_nb, 4);
......@@ -759,8 +757,6 @@ fn XChaChaPoly1305(comptime rounds_nb: usize) type {
759757}
760758
761759test "chacha20 AEAD API" {
762 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
763
764760 const aeads = [_]type{ ChaCha20Poly1305, XChaCha20Poly1305 };
765761 const m = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it.";
766762 const ad = "Additional data";
......@@ -782,8 +778,6 @@ test "chacha20 AEAD API" {
782778
783779// https://tools.ietf.org/html/rfc7539#section-2.4.2
784780test "crypto.chacha20 test vector sunscreen" {
785 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
786
787781 const expected_result = [_]u8{
788782 0x6e, 0x2e, 0x35, 0x9a, 0x25, 0x68, 0xf9, 0x80,
789783 0x41, 0xba, 0x07, 0x28, 0xdd, 0x0d, 0x69, 0x81,
......@@ -825,8 +819,6 @@ test "crypto.chacha20 test vector sunscreen" {
825819
826820// https://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04#section-7
827821test "crypto.chacha20 test vector 1" {
828 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
829
830822 const expected_result = [_]u8{
831823 0x76, 0xb8, 0xe0, 0xad, 0xa0, 0xf1, 0x3d, 0x90,
832824 0x40, 0x5d, 0x6a, 0xe5, 0x53, 0x86, 0xbd, 0x28,
......@@ -861,8 +853,6 @@ test "crypto.chacha20 test vector 1" {
861853}
862854
863855test "crypto.chacha20 test vector 2" {
864 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
865
866856 const expected_result = [_]u8{
867857 0x45, 0x40, 0xf0, 0x5a, 0x9f, 0x1f, 0xb2, 0x96,
868858 0xd7, 0x73, 0x6e, 0x7b, 0x20, 0x8e, 0x3c, 0x96,
......@@ -897,8 +887,6 @@ test "crypto.chacha20 test vector 2" {
897887}
898888
899889test "crypto.chacha20 test vector 3" {
900 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
901
902890 const expected_result = [_]u8{
903891 0xde, 0x9c, 0xba, 0x7b, 0xf3, 0xd6, 0x9e, 0xf5,
904892 0xe7, 0x86, 0xdc, 0x63, 0x97, 0x3f, 0x65, 0x3a,
......@@ -933,8 +921,6 @@ test "crypto.chacha20 test vector 3" {
933921}
934922
935923test "crypto.chacha20 test vector 4" {
936 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
937
938924 const expected_result = [_]u8{
939925 0xef, 0x3f, 0xdf, 0xd6, 0xc6, 0x15, 0x78, 0xfb,
940926 0xf5, 0xcf, 0x35, 0xbd, 0x3d, 0xd3, 0x3b, 0x80,
......@@ -969,8 +955,6 @@ test "crypto.chacha20 test vector 4" {
969955}
970956
971957test "crypto.chacha20 test vector 5" {
972 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
973
974958 const expected_result = [_]u8{
975959 0xf7, 0x98, 0xa1, 0x89, 0xf1, 0x95, 0xe6, 0x69,
976960 0x82, 0x10, 0x5f, 0xfb, 0x64, 0x0b, 0xb7, 0x75,
......@@ -1043,8 +1027,6 @@ test "crypto.chacha20 test vector 5" {
10431027}
10441028
10451029test "seal" {
1046 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1047
10481030 {
10491031 const m = "";
10501032 const ad = "";
......@@ -1095,8 +1077,6 @@ test "seal" {
10951077}
10961078
10971079test "open" {
1098 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1099
11001080 {
11011081 const c = [_]u8{ 0xa0, 0x78, 0x4d, 0x7a, 0x47, 0x16, 0xf3, 0xfe, 0xb4, 0xf6, 0x4e, 0x7f, 0x4b, 0x39, 0xbf, 0x4 };
11021082 const ad = "";
......@@ -1161,8 +1141,6 @@ test "open" {
11611141}
11621142
11631143test "crypto.xchacha20" {
1164 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1165
11661144 const key = [_]u8{69} ** 32;
11671145 const nonce = [_]u8{42} ** 24;
11681146 const m = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it.";
lib/std/crypto/cmac.zig-9
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const crypto = std.crypto;
43const mem = std.mem;
54
......@@ -94,8 +93,6 @@ pub fn Cmac(comptime BlockCipher: type) type {
9493const testing = std.testing;
9594
9695test "CmacAes128 - Example 1: len = 0" {
97 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
98
9996 const key = [_]u8{
10097 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c,
10198 };
......@@ -109,8 +106,6 @@ test "CmacAes128 - Example 1: len = 0" {
109106}
110107
111108test "CmacAes128 - Example 2: len = 16" {
112 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
113
114109 const key = [_]u8{
115110 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c,
116111 };
......@@ -126,8 +121,6 @@ test "CmacAes128 - Example 2: len = 16" {
126121}
127122
128123test "CmacAes128 - Example 3: len = 40" {
129 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
130
131124 const key = [_]u8{
132125 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c,
133126 };
......@@ -145,8 +138,6 @@ test "CmacAes128 - Example 3: len = 40" {
145138}
146139
147140test "CmacAes128 - Example 4: len = 64" {
148 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
149
150141 const key = [_]u8{
151142 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c,
152143 };
lib/std/crypto/ecdsa.zig+6-24
......@@ -372,10 +372,7 @@ pub fn Ecdsa(comptime Curve: type, comptime Hash: type) type {
372372}
373373
374374test "ECDSA - Basic operations over EcdsaP384Sha384" {
375 switch (builtin.zig_backend) {
376 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
377 else => {},
378 }
375 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
379376
380377 const Scheme = EcdsaP384Sha384;
381378 const kp = try Scheme.KeyPair.create(null);
......@@ -391,10 +388,7 @@ test "ECDSA - Basic operations over EcdsaP384Sha384" {
391388}
392389
393390test "ECDSA - Basic operations over Secp256k1" {
394 switch (builtin.zig_backend) {
395 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
396 else => {},
397 }
391 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
398392
399393 const Scheme = EcdsaSecp256k1Sha256oSha256;
400394 const kp = try Scheme.KeyPair.create(null);
......@@ -410,10 +404,7 @@ test "ECDSA - Basic operations over Secp256k1" {
410404}
411405
412406test "ECDSA - Basic operations over EcdsaP384Sha256" {
413 switch (builtin.zig_backend) {
414 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
415 else => {},
416 }
407 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
417408
418409 const Scheme = Ecdsa(crypto.ecc.P384, crypto.hash.sha2.Sha256);
419410 const kp = try Scheme.KeyPair.create(null);
......@@ -429,10 +420,7 @@ test "ECDSA - Basic operations over EcdsaP384Sha256" {
429420}
430421
431422test "ECDSA - Verifying a existing signature with EcdsaP384Sha256" {
432 switch (builtin.zig_backend) {
433 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
434 else => {},
435 }
423 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
436424
437425 const Scheme = Ecdsa(crypto.ecc.P384, crypto.hash.sha2.Sha256);
438426 // zig fmt: off
......@@ -476,10 +464,7 @@ const TestVector = struct {
476464};
477465
478466test "ECDSA - Test vectors from Project Wycheproof" {
479 switch (builtin.zig_backend) {
480 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
481 else => {},
482 }
467 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
483468
484469 const vectors = [_]TestVector{
485470 .{ .key = "042927b10512bae3eddcfe467828128bad2903269919f7086069c8c4df6c732838c7787964eaac00e5921fb1498a60f4606766b3d9685001558d1a974e7341513e", .msg = "313233343030", .sig = "304402202ba3a8be6b94d5ec80a6d9d1190a436effe50d85a1eee859b8cc6af9bd5c2e1802204cd60b855d442f5b3c7b11eb6c4e0ae7525fe710fab9aa7c77a67f79e6fadd76", .result = .valid },
......@@ -893,10 +878,7 @@ fn tvTry(vector: TestVector) !void {
893878}
894879
895880test "ECDSA - Sec1 encoding/decoding" {
896 switch (builtin.zig_backend) {
897 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
898 else => {},
899 }
881 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
900882
901883 const Scheme = EcdsaP384Sha384;
902884 const kp = try Scheme.KeyPair.create(null);
lib/std/crypto/ff.zig+1-4
......@@ -912,10 +912,7 @@ const ct_unprotected = struct {
912912};
913913
914914test {
915 switch (@import("builtin").zig_backend) {
916 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
917 else => {},
918 }
915 if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest;
919916
920917 const M = Modulus(256);
921918 const m = try M.fromPrimitive(u256, 3429938563481314093726330772853735541133072814650493833233);
lib/std/crypto/ghash_polyval.zig-6
......@@ -422,8 +422,6 @@ fn Hash(comptime endian: std.builtin.Endian, comptime shift_key: bool) type {
422422const htest = @import("test.zig");
423423
424424test "ghash" {
425 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
426
427425 const key = [_]u8{0x42} ** 16;
428426 const m = [_]u8{0x69} ** 256;
429427
......@@ -441,8 +439,6 @@ test "ghash" {
441439}
442440
443441test "ghash2" {
444 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
445
446442 var key: [16]u8 = undefined;
447443 var i: usize = 0;
448444 while (i < key.len) : (i += 1) {
......@@ -476,8 +472,6 @@ test "ghash2" {
476472}
477473
478474test "polyval" {
479 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
480
481475 const key = [_]u8{0x42} ** 16;
482476 const m = [_]u8{0x69} ** 256;
483477
lib/std/crypto/hash_composition.zig-2
......@@ -65,8 +65,6 @@ pub const Sha384oSha384 = Composition(sha2.Sha384, sha2.Sha384);
6565pub const Sha512oSha512 = Composition(sha2.Sha512, sha2.Sha512);
6666
6767test "Hash composition" {
68 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
69
7068 const Sha256 = sha2.Sha256;
7169 const msg = "test";
7270
lib/std/crypto/hkdf.zig-2
......@@ -72,8 +72,6 @@ pub fn Hkdf(comptime Hmac: type) type {
7272const htest = @import("test.zig");
7373
7474test "Hkdf" {
75 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
76
7775 const ikm = [_]u8{0x0b} ** 22;
7876 const salt = [_]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c };
7977 const context = [_]u8{ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9 };
lib/std/crypto/kyber_d00.zig-28
......@@ -553,8 +553,6 @@ const inv_ntt_reductions = [_]i16{
553553};
554554
555555test "invNTTReductions bounds" {
556 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
557
558556 // Checks whether the reductions proposed by invNTTReductions
559557 // don't overflow during invNTT().
560558 var xs = [_]i32{1} ** 256; // start at |x| ≤ q
......@@ -658,8 +656,6 @@ fn montReduce(x: i32) i16 {
658656}
659657
660658test "Test montReduce" {
661 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
662
663659 var rnd = RndGen.init(0);
664660 for (0..1000) |_| {
665661 const bound = comptime @as(i32, Q) * (1 << 15);
......@@ -678,8 +674,6 @@ fn feToMont(x: i16) i16 {
678674}
679675
680676test "Test feToMont" {
681 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
682
683677 var x: i32 = -(1 << 15);
684678 while (x < 1 << 15) : (x += 1) {
685679 const y = feToMont(@as(i16, @intCast(x)));
......@@ -713,8 +707,6 @@ fn feBarrettReduce(x: i16) i16 {
713707}
714708
715709test "Test Barrett reduction" {
716 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
717
718710 var x: i32 = -(1 << 15);
719711 while (x < 1 << 15) : (x += 1) {
720712 var y1 = feBarrettReduce(@as(i16, @intCast(x)));
......@@ -735,8 +727,6 @@ fn csubq(x: i16) i16 {
735727}
736728
737729test "Test csubq" {
738 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
739
740730 var x: i32 = -29439;
741731 while (x < 1 << 15) : (x += 1) {
742732 const y1 = csubq(@as(i16, @intCast(x)));
......@@ -1476,8 +1466,6 @@ fn cmov(comptime len: usize, dst: *[len]u8, src: [len]u8, b: u1) void {
14761466}
14771467
14781468test "MulHat" {
1479 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1480
14811469 var rnd = RndGen.init(0);
14821470
14831471 for (0..100) |_| {
......@@ -1509,8 +1497,6 @@ test "MulHat" {
15091497}
15101498
15111499test "NTT" {
1512 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1513
15141500 var rnd = RndGen.init(0);
15151501
15161502 for (0..1000) |_| {
......@@ -1534,8 +1520,6 @@ test "NTT" {
15341520}
15351521
15361522test "Compression" {
1537 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1538
15391523 var rnd = RndGen.init(0);
15401524 inline for (.{ 1, 4, 5, 10, 11 }) |d| {
15411525 for (0..1000) |_| {
......@@ -1548,8 +1532,6 @@ test "Compression" {
15481532}
15491533
15501534test "noise" {
1551 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1552
15531535 var seed: [32]u8 = undefined;
15541536 for (&seed, 0..) |*s, i| {
15551537 s.* = @as(u8, @intCast(i));
......@@ -1596,8 +1578,6 @@ test "noise" {
15961578}
15971579
15981580test "uniform sampling" {
1599 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1600
16011581 var seed: [32]u8 = undefined;
16021582 for (&seed, 0..) |*s, i| {
16031583 s.* = @as(u8, @intCast(i));
......@@ -1631,8 +1611,6 @@ test "uniform sampling" {
16311611}
16321612
16331613test "Polynomial packing" {
1634 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1635
16361614 var rnd = RndGen.init(0);
16371615
16381616 for (0..1000) |_| {
......@@ -1642,8 +1620,6 @@ test "Polynomial packing" {
16421620}
16431621
16441622test "Test inner PKE" {
1645 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1646
16471623 var seed: [32]u8 = undefined;
16481624 var pt: [32]u8 = undefined;
16491625 for (&seed, &pt, 0..) |*s, *p, i| {
......@@ -1665,8 +1641,6 @@ test "Test inner PKE" {
16651641}
16661642
16671643test "Test happy flow" {
1668 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1669
16701644 var seed: [64]u8 = undefined;
16711645 for (&seed, 0..) |*s, i| {
16721646 s.* = @as(u8, @intCast(i));
......@@ -1693,8 +1667,6 @@ test "Test happy flow" {
16931667const sha2 = crypto.hash.sha2;
16941668
16951669test "NIST KAT test" {
1696 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1697
16981670 inline for (.{
16991671 .{ Kyber512, "e9c2bd37133fcb40772f81559f14b1f58dccd1c816701be9ba6214d43baf4547" },
17001672 .{ Kyber1024, "89248f2f33f7f4f7051729111f3049c409a933ec904aedadf035f30fa5646cd5" },
lib/std/crypto/pbkdf2.zig-15
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const mem = std.mem;
43const maxInt = std.math.maxInt;
54const OutputTooLongError = std.crypto.errors.OutputTooLongError;
......@@ -152,8 +151,6 @@ const HmacSha1 = std.crypto.auth.hmac.HmacSha1;
152151// RFC 6070 PBKDF2 HMAC-SHA1 Test Vectors
153152
154153test "RFC 6070 one iteration" {
155 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
156
157154 const p = "password";
158155 const s = "salt";
159156 const c = 1;
......@@ -169,8 +166,6 @@ test "RFC 6070 one iteration" {
169166}
170167
171168test "RFC 6070 two iterations" {
172 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
173
174169 const p = "password";
175170 const s = "salt";
176171 const c = 2;
......@@ -186,8 +181,6 @@ test "RFC 6070 two iterations" {
186181}
187182
188183test "RFC 6070 4096 iterations" {
189 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
190
191184 const p = "password";
192185 const s = "salt";
193186 const c = 4096;
......@@ -203,8 +196,6 @@ test "RFC 6070 4096 iterations" {
203196}
204197
205198test "RFC 6070 16,777,216 iterations" {
206 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
207
208199 // These iteration tests are slow so we always skip them. Results have been verified.
209200 if (true) {
210201 return error.SkipZigTest;
......@@ -225,8 +216,6 @@ test "RFC 6070 16,777,216 iterations" {
225216}
226217
227218test "RFC 6070 multi-block salt and password" {
228 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
229
230219 const p = "passwordPASSWORDpassword";
231220 const s = "saltSALTsaltSALTsaltSALTsaltSALTsalt";
232221 const c = 4096;
......@@ -242,8 +231,6 @@ test "RFC 6070 multi-block salt and password" {
242231}
243232
244233test "RFC 6070 embedded NUL" {
245 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
246
247234 const p = "pass\x00word";
248235 const s = "sa\x00lt";
249236 const c = 4096;
......@@ -259,8 +246,6 @@ test "RFC 6070 embedded NUL" {
259246}
260247
261248test "Very large dk_len" {
262 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
263
264249 // This test allocates 8GB of memory and is expected to take several hours to run.
265250 if (true) {
266251 return error.SkipZigTest;
lib/std/crypto/pcurves/p256.zig-2
......@@ -478,7 +478,5 @@ pub const AffineCoordinates = struct {
478478};
479479
480480test {
481 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
482
483481 _ = @import("tests/p256.zig");
484482}
lib/std/crypto/pcurves/p384.zig+1-4
......@@ -478,10 +478,7 @@ pub const AffineCoordinates = struct {
478478};
479479
480480test {
481 switch (@import("builtin").zig_backend) {
482 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
483 else => {},
484 }
481 if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest;
485482
486483 _ = @import("tests/p384.zig");
487484}
lib/std/crypto/pcurves/secp256k1.zig+1-4
......@@ -556,10 +556,7 @@ pub const AffineCoordinates = struct {
556556};
557557
558558test {
559 switch (@import("builtin").zig_backend) {
560 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
561 else => {},
562 }
559 if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest;
563560
564561 _ = @import("tests/secp256k1.zig");
565562}
lib/std/crypto/phc_encoding.zig-9
......@@ -1,7 +1,6 @@
11// https://github.com/P-H-C/phc-string-format
22
33const std = @import("std");
4const builtin = @import("builtin");
54const fmt = std.fmt;
65const io = std.io;
76const mem = std.mem;
......@@ -264,8 +263,6 @@ fn kvSplit(str: []const u8) !struct { key: []const u8, value: []const u8 } {
264263}
265264
266265test "phc format - encoding/decoding" {
267 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
268
269266 const Input = struct {
270267 str: []const u8,
271268 HashResult: type,
......@@ -351,24 +348,18 @@ test "phc format - encoding/decoding" {
351348}
352349
353350test "phc format - empty input string" {
354 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
355
356351 const s = "";
357352 const v = deserialize(struct { alg_id: []const u8 }, s);
358353 try std.testing.expectError(Error.InvalidEncoding, v);
359354}
360355
361356test "phc format - hash without salt" {
362 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
363
364357 const s = "$scrypt";
365358 const v = deserialize(struct { alg_id: []const u8, hash: BinValue(16) }, s);
366359 try std.testing.expectError(Error.InvalidEncoding, v);
367360}
368361
369362test "phc format - calcSize" {
370 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
371
372363 const s = "$scrypt$v=1$ln=15,r=8,p=1$c2FsdHNhbHQ$dGVzdHBhc3M";
373364 const v = try deserialize(struct {
374365 alg_id: []const u8,
lib/std/crypto/poly1305.zig-2
......@@ -196,8 +196,6 @@ pub const Poly1305 = struct {
196196};
197197
198198test "poly1305 rfc7439 vector1" {
199 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
200
201199 const expected_mac = "\xa8\x06\x1d\xc1\x30\x51\x36\xc6\xc2\x2b\x8b\xaf\x0c\x01\x27\xa9";
202200
203201 const msg = "Cryptographic Forum Research Group";
lib/std/crypto/salsa20.zig-12
......@@ -555,8 +555,6 @@ pub const SealedBox = struct {
555555const htest = @import("test.zig");
556556
557557test "(x)salsa20" {
558 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
559
560558 const key = [_]u8{0x69} ** 32;
561559 const nonce = [_]u8{0x42} ** 8;
562560 const msg = [_]u8{0} ** 20;
......@@ -571,8 +569,6 @@ test "(x)salsa20" {
571569}
572570
573571test "xsalsa20poly1305" {
574 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
575
576572 var msg: [100]u8 = undefined;
577573 var msg2: [msg.len]u8 = undefined;
578574 var c: [msg.len]u8 = undefined;
......@@ -588,8 +584,6 @@ test "xsalsa20poly1305" {
588584}
589585
590586test "xsalsa20poly1305 secretbox" {
591 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
592
593587 var msg: [100]u8 = undefined;
594588 var msg2: [msg.len]u8 = undefined;
595589 var key: [XSalsa20Poly1305.key_length]u8 = undefined;
......@@ -604,8 +598,6 @@ test "xsalsa20poly1305 secretbox" {
604598}
605599
606600test "xsalsa20poly1305 box" {
607 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
608
609601 var msg: [100]u8 = undefined;
610602 var msg2: [msg.len]u8 = undefined;
611603 var nonce: [Box.nonce_length]u8 = undefined;
......@@ -620,8 +612,6 @@ test "xsalsa20poly1305 box" {
620612}
621613
622614test "xsalsa20poly1305 sealedbox" {
623 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
624
625615 var msg: [100]u8 = undefined;
626616 var msg2: [msg.len]u8 = undefined;
627617 var boxed: [msg.len + SealedBox.seal_length]u8 = undefined;
......@@ -633,8 +623,6 @@ test "xsalsa20poly1305 sealedbox" {
633623}
634624
635625test "secretbox twoblocks" {
636 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
637
638626 const key = [_]u8{ 0xc9, 0xc9, 0x4d, 0xcf, 0x68, 0xbe, 0x00, 0xe4, 0x7f, 0xe6, 0x13, 0x26, 0xfc, 0xc4, 0x2f, 0xd0, 0xdb, 0x93, 0x91, 0x1c, 0x09, 0x94, 0x89, 0xe1, 0x1b, 0x88, 0x63, 0x18, 0x86, 0x64, 0x8b, 0x7b };
639627 const nonce = [_]u8{ 0xa4, 0x33, 0xe9, 0x0a, 0x07, 0x68, 0x6e, 0x9a, 0x2b, 0x6d, 0xd4, 0x59, 0x04, 0x72, 0x3e, 0xd3, 0x8a, 0x67, 0x55, 0xc7, 0x9e, 0x3e, 0x77, 0xdc };
640628 const msg = [_]u8{'a'} ** 97;
lib/std/crypto/scrypt.zig-5
......@@ -3,7 +3,6 @@
33// https://github.com/Tarsnap/scrypt
44
55const std = @import("std");
6const builtin = @import("builtin");
76const crypto = std.crypto;
87const fmt = std.fmt;
98const io = std.io;
......@@ -684,8 +683,6 @@ test "unix-scrypt" {
684683}
685684
686685test "crypt format" {
687 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
688
689686 const str = "$7$C6..../....SodiumChloride$kBGj9fHznVYFQMEn/qDCfrDevf9YDtcDdKvEqHJLV8D";
690687 const params = try crypt_format.deserialize(crypt_format.HashResult(32), str);
691688 var buf: [str.len]u8 = undefined;
......@@ -694,8 +691,6 @@ test "crypt format" {
694691}
695692
696693test "kdf fast" {
697 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
698
699694 const TestVector = struct {
700695 password: []const u8,
701696 salt: []const u8,
lib/std/crypto/sha2.zig+1-11
......@@ -238,7 +238,7 @@ fn Sha2x32(comptime params: Sha2Params32) type {
238238 return;
239239 },
240240 // C backend doesn't currently support passing vectors to inline asm.
241 .x86_64 => if (builtin.zig_backend != .stage2_c and builtin.zig_backend != .stage2_x86_64 and comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .sha, .avx2 })) {
241 .x86_64 => if (builtin.zig_backend != .stage2_c and comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .sha, .avx2 })) {
242242 var x: v4u32 = [_]u32{ d.s[5], d.s[4], d.s[1], d.s[0] };
243243 var y: v4u32 = [_]u32{ d.s[7], d.s[6], d.s[3], d.s[2] };
244244 const s_v = @as(*[16]v4u32, @ptrCast(&s));
......@@ -406,16 +406,12 @@ fn Sha2x32(comptime params: Sha2Params32) type {
406406}
407407
408408test "sha224 single" {
409 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
410
411409 try htest.assertEqualHash(Sha224, "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", "");
412410 try htest.assertEqualHash(Sha224, "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", "abc");
413411 try htest.assertEqualHash(Sha224, "c97ca9a559850ce97a04a96def6d99a9e0e0e2ab14e6b8df265fc0b3", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu");
414412}
415413
416414test "sha224 streaming" {
417 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
418
419415 var h = Sha224.init(.{});
420416 var out: [28]u8 = undefined;
421417
......@@ -436,16 +432,12 @@ test "sha224 streaming" {
436432}
437433
438434test "sha256 single" {
439 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
440
441435 try htest.assertEqualHash(Sha256, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "");
442436 try htest.assertEqualHash(Sha256, "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "abc");
443437 try htest.assertEqualHash(Sha256, "cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu");
444438}
445439
446440test "sha256 streaming" {
447 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
448
449441 var h = Sha256.init(.{});
450442 var out: [32]u8 = undefined;
451443
......@@ -466,8 +458,6 @@ test "sha256 streaming" {
466458}
467459
468460test "sha256 aligned final" {
469 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
470
471461 var block = [_]u8{0} ** Sha256.block_length;
472462 var out: [Sha256.digest_length]u8 = undefined;
473463
lib/std/crypto/utils.zig-2
......@@ -149,8 +149,6 @@ test "crypto.utils.timingSafeEql" {
149149}
150150
151151test "crypto.utils.timingSafeEql (vectors)" {
152 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
153
154152 var a: [100]u8 = undefined;
155153 var b: [100]u8 = undefined;
156154 random.bytes(a[0..]);
lib/std/debug.zig-2
......@@ -2513,8 +2513,6 @@ pub fn dumpStackPointerAddr(prefix: []const u8) void {
25132513}
25142514
25152515test "manage resources correctly" {
2516 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2517
25182516 if (builtin.os.tag == .wasi) return error.SkipZigTest;
25192517
25202518 if (builtin.os.tag == .windows) {
lib/std/dwarf/expressions.zig-2
......@@ -1054,8 +1054,6 @@ fn isOpcodeRegisterLocation(opcode: u8) bool {
10541054
10551055const testing = std.testing;
10561056test "DWARF expressions" {
1057 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1058
10591057 const allocator = std.testing.allocator;
10601058
10611059 const options = ExpressionOptions{};
lib/std/fifo.zig-2
......@@ -505,8 +505,6 @@ test "LinearFifo(u8, .Dynamic)" {
505505}
506506
507507test "LinearFifo" {
508 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
509
510508 inline for ([_]type{ u1, u8, u16, u64 }) |T| {
511509 inline for ([_]LinearFifoBufferType{ LinearFifoBufferType{ .Static = 32 }, .Slice, .Dynamic }) |bt| {
512510 const FifoType = LinearFifo(T, bt);
lib/std/fmt.zig-24
......@@ -2129,8 +2129,6 @@ test "int.small" {
21292129}
21302130
21312131test "int.specifier" {
2132 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2133
21342132 {
21352133 const value: u8 = 'a';
21362134 try expectFmt("u8: a\n", "u8: {c}\n", .{value});
......@@ -2181,8 +2179,6 @@ test "int.padded" {
21812179}
21822180
21832181test "buffer" {
2184 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2185
21862182 {
21872183 var buf1: [32]u8 = undefined;
21882184 var fbs = std.io.fixedBufferStream(&buf1);
......@@ -2379,8 +2375,6 @@ test "float.scientific" {
23792375}
23802376
23812377test "float.scientific.precision" {
2382 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2383
23842378 try expectFmt("f64: 1.40971e-42", "f64: {e:.5}", .{@as(f64, 1.409706e-42)});
23852379 try expectFmt("f64: 1.00000e-09", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 814313563))))});
23862380 try expectFmt("f64: 7.81250e-03", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1006632960))))});
......@@ -2441,8 +2435,6 @@ test "float.hexadecimal" {
24412435}
24422436
24432437test "float.hexadecimal.precision" {
2444 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2445
24462438 try expectFmt("f16: 0x1.5p-2", "f16: {x:.1}", .{@as(f16, 1.0 / 3.0)});
24472439 try expectFmt("f32: 0x1.555p-2", "f32: {x:.3}", .{@as(f32, 1.0 / 3.0)});
24482440 try expectFmt("f64: 0x1.55555p-2", "f64: {x:.5}", .{@as(f64, 1.0 / 3.0)});
......@@ -2457,8 +2449,6 @@ test "float.hexadecimal.precision" {
24572449}
24582450
24592451test "float.decimal" {
2460 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2461
24622452 try expectFmt("f64: 152314000000000000000000000000", "f64: {d}", .{@as(f64, 1.52314e+29)});
24632453 try expectFmt("f32: 0", "f32: {d}", .{@as(f32, 0.0)});
24642454 try expectFmt("f32: 0", "f32: {d:.0}", .{@as(f32, 0.0)});
......@@ -2482,8 +2472,6 @@ test "float.decimal" {
24822472}
24832473
24842474test "float.libc.sanity" {
2485 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2486
24872475 try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 916964781))))});
24882476 try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 925353389))))});
24892477 try expectFmt("f64: 0.10000", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1036831278))))});
......@@ -2503,8 +2491,6 @@ test "float.libc.sanity" {
25032491}
25042492
25052493test "custom" {
2506 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2507
25082494 const Vec2 = struct {
25092495 const SelfType = @This();
25102496 x: f32,
......@@ -2683,8 +2669,6 @@ test "formatFloatValue with comptime_float" {
26832669}
26842670
26852671test "formatType max_depth" {
2686 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2687
26882672 const Vec2 = struct {
26892673 const SelfType = @This();
26902674 x: f32,
......@@ -2751,8 +2735,6 @@ test "formatType max_depth" {
27512735}
27522736
27532737test "positional" {
2754 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2755
27562738 try expectFmt("2 1 0", "{2} {1} {0}", .{ @as(usize, 0), @as(usize, 1), @as(usize, 2) });
27572739 try expectFmt("2 1 0", "{2} {1} {}", .{ @as(usize, 0), @as(usize, 1), @as(usize, 2) });
27582740 try expectFmt("0 0", "{0} {0}", .{@as(usize, 0)});
......@@ -2761,20 +2743,14 @@ test "positional" {
27612743}
27622744
27632745test "positional with specifier" {
2764 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2765
27662746 try expectFmt("10.0", "{0d:.1}", .{@as(f64, 9.999)});
27672747}
27682748
27692749test "positional/alignment/width/precision" {
2770 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2771
27722750 try expectFmt("10.0", "{0d: >3.1}", .{@as(f64, 9.999)});
27732751}
27742752
27752753test "vector" {
2776 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2777
27782754 if (builtin.target.cpu.arch == .riscv64) {
27792755 // https://github.com/ziglang/zig/issues/4486
27802756 return error.SkipZigTest;
lib/std/fmt/parse_float.zig+1-17
......@@ -1,8 +1,8 @@
11pub const parseFloat = @import("parse_float/parse_float.zig").parseFloat;
22pub const ParseFloatError = @import("parse_float/parse_float.zig").ParseFloatError;
33
4const std = @import("std");
54const builtin = @import("builtin");
5const std = @import("std");
66const math = std.math;
77const testing = std.testing;
88const expect = testing.expect;
......@@ -14,8 +14,6 @@ const epsilon = 1e-7;
1414// See https://github.com/tiehuis/parse-number-fxx-test-data for a wider-selection of test-data.
1515
1616test "fmt.parseFloat" {
17 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
18
1917 inline for ([_]type{ f16, f32, f64, f128 }) |T| {
2018 try testing.expectError(error.InvalidCharacter, parseFloat(T, ""));
2119 try testing.expectError(error.InvalidCharacter, parseFloat(T, " 1"));
......@@ -72,8 +70,6 @@ test "fmt.parseFloat" {
7270}
7371
7472test "fmt.parseFloat nan and inf" {
75 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
76
7773 inline for ([_]type{ f16, f32, f64, f128 }) |T| {
7874 const Z = std.meta.Int(.unsigned, @typeInfo(T).Float.bits);
7975
......@@ -84,22 +80,16 @@ test "fmt.parseFloat nan and inf" {
8480}
8581
8682test "fmt.parseFloat #11169" {
87 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
88
8983 try expectEqual(try parseFloat(f128, "9007199254740993.0"), 9007199254740993.0);
9084}
9185
9286test "fmt.parseFloat hex.special" {
93 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
94
9587 try testing.expect(math.isNan(try parseFloat(f32, "nAn")));
9688 try testing.expect(math.isPositiveInf(try parseFloat(f32, "iNf")));
9789 try testing.expect(math.isPositiveInf(try parseFloat(f32, "+Inf")));
9890 try testing.expect(math.isNegativeInf(try parseFloat(f32, "-iNf")));
9991}
10092test "fmt.parseFloat hex.zero" {
101 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
102
10393 try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "0x0"));
10494 try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "-0x0"));
10595 try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "0x0p42"));
......@@ -108,8 +98,6 @@ test "fmt.parseFloat hex.zero" {
10898}
10999
110100test "fmt.parseFloat hex.f16" {
111 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
112
113101 try testing.expectEqual(try parseFloat(f16, "0x1p0"), 1.0);
114102 try testing.expectEqual(try parseFloat(f16, "-0x1p-1"), -0.5);
115103 try testing.expectEqual(try parseFloat(f16, "0x10p+10"), 16384.0);
......@@ -126,8 +114,6 @@ test "fmt.parseFloat hex.f16" {
126114}
127115
128116test "fmt.parseFloat hex.f32" {
129 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
130
131117 try testing.expectError(error.InvalidCharacter, parseFloat(f32, "0x"));
132118 try testing.expectEqual(try parseFloat(f32, "0x1p0"), 1.0);
133119 try testing.expectEqual(try parseFloat(f32, "-0x1p-1"), -0.5);
......@@ -162,8 +148,6 @@ test "fmt.parseFloat hex.f64" {
162148 try testing.expectEqual(try parseFloat(f64, "-0x1p-1074"), -math.floatTrueMin(f64));
163149}
164150test "fmt.parseFloat hex.f128" {
165 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
166
167151 try testing.expectEqual(try parseFloat(f128, "0x1p0"), 1.0);
168152 try testing.expectEqual(try parseFloat(f128, "-0x1p-1"), -0.5);
169153 try testing.expectEqual(try parseFloat(f128, "0x10p+10"), 16384.0);
lib/std/fs.zig+6-8
......@@ -3244,15 +3244,13 @@ fn copy_file(fd_in: os.fd_t, fd_out: os.fd_t, maybe_size: ?u64) CopyFileRawError
32443244}
32453245
32463246test {
3247 if (builtin.zig_backend != .stage2_x86_64) {
3248 if (builtin.os.tag != .wasi) {
3249 _ = &makeDirAbsolute;
3250 _ = &makeDirAbsoluteZ;
3251 _ = &copyFileAbsolute;
3252 _ = &updateFileAbsolute;
3253 }
3254 _ = &Dir.copyFile;
3247 if (builtin.os.tag != .wasi) {
3248 _ = &makeDirAbsolute;
3249 _ = &makeDirAbsoluteZ;
3250 _ = &copyFileAbsolute;
3251 _ = &updateFileAbsolute;
32553252 }
3253 _ = &Dir.copyFile;
32563254 _ = @import("fs/test.zig");
32573255 _ = @import("fs/path.zig");
32583256 _ = @import("fs/file.zig");
lib/std/fs/test.zig-104
......@@ -124,8 +124,6 @@ fn testWithAllSupportedPathTypes(test_func: anytype) !void {
124124}
125125
126126test "Dir.readLink" {
127 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
128
129127 try testWithAllSupportedPathTypes(struct {
130128 fn impl(ctx: *TestContext) !void {
131129 // Create some targets
......@@ -163,8 +161,6 @@ fn testReadLink(dir: Dir, target_path: []const u8, symlink_path: []const u8) !vo
163161}
164162
165163test "relative symlink to parent directory" {
166 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
167
168164 var tmp = tmpDir(.{});
169165 defer tmp.cleanup();
170166
......@@ -182,8 +178,6 @@ test "relative symlink to parent directory" {
182178}
183179
184180test "openDir" {
185 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
186
187181 try testWithAllSupportedPathTypes(struct {
188182 fn impl(ctx: *TestContext) !void {
189183 const allocator = ctx.arena.allocator();
......@@ -202,8 +196,6 @@ test "openDir" {
202196test "accessAbsolute" {
203197 if (builtin.os.tag == .wasi) return error.SkipZigTest;
204198
205 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
206
207199 var tmp = tmpDir(.{});
208200 defer tmp.cleanup();
209201
......@@ -222,8 +214,6 @@ test "accessAbsolute" {
222214test "openDirAbsolute" {
223215 if (builtin.os.tag == .wasi) return error.SkipZigTest;
224216
225 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
226
227217 var tmp = tmpDir(.{});
228218 defer tmp.cleanup();
229219
......@@ -262,8 +252,6 @@ test "openDir non-cwd parent .." {
262252 else => {},
263253 }
264254
265 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
266
267255 var tmp = tmpDir(.{});
268256 defer tmp.cleanup();
269257
......@@ -285,8 +273,6 @@ test "openDir non-cwd parent .." {
285273test "readLinkAbsolute" {
286274 if (builtin.os.tag == .wasi) return error.SkipZigTest;
287275
288 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
289
290276 var tmp = tmpDir(.{});
291277 defer tmp.cleanup();
292278
......@@ -337,8 +323,6 @@ fn testReadLinkAbsolute(target_path: []const u8, symlink_path: []const u8) !void
337323}
338324
339325test "Dir.Iterator" {
340 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
341
342326 var tmp_dir = tmpIterableDir(.{});
343327 defer tmp_dir.cleanup();
344328
......@@ -369,8 +353,6 @@ test "Dir.Iterator" {
369353}
370354
371355test "Dir.Iterator many entries" {
372 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
373
374356 var tmp_dir = tmpIterableDir(.{});
375357 defer tmp_dir.cleanup();
376358
......@@ -406,8 +388,6 @@ test "Dir.Iterator many entries" {
406388}
407389
408390test "Dir.Iterator twice" {
409 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
410
411391 var tmp_dir = tmpIterableDir(.{});
412392 defer tmp_dir.cleanup();
413393
......@@ -441,8 +421,6 @@ test "Dir.Iterator twice" {
441421}
442422
443423test "Dir.Iterator reset" {
444 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
445
446424 var tmp_dir = tmpIterableDir(.{});
447425 defer tmp_dir.cleanup();
448426
......@@ -479,8 +457,6 @@ test "Dir.Iterator reset" {
479457}
480458
481459test "Dir.Iterator but dir is deleted during iteration" {
482 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
483
484460 var tmp = std.testing.tmpDir(.{});
485461 defer tmp.cleanup();
486462
......@@ -523,8 +499,6 @@ fn contains(entries: *const std.ArrayList(IterableDir.Entry), el: IterableDir.En
523499test "Dir.realpath smoke test" {
524500 if (!comptime std.os.isGetFdPathSupportedOnTarget(builtin.os)) return error.SkipZigTest;
525501
526 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
527
528502 try testWithAllSupportedPathTypes(struct {
529503 fn impl(ctx: *TestContext) !void {
530504 const allocator = ctx.arena.allocator();
......@@ -575,8 +549,6 @@ test "Dir.realpath smoke test" {
575549}
576550
577551test "readAllAlloc" {
578 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
579
580552 var tmp_dir = tmpDir(.{});
581553 defer tmp_dir.cleanup();
582554
......@@ -613,8 +585,6 @@ test "Dir.statFile" {
613585 // TODO: Re-enable once https://github.com/ziglang/zig/issues/17034 is solved
614586 if (builtin.os.tag == .linux and builtin.link_libc and builtin.abi == .gnu) return error.SkipZigTest;
615587
616 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
617
618588 try testWithAllSupportedPathTypes(struct {
619589 fn impl(ctx: *TestContext) !void {
620590 const test_file_name = try ctx.transformPath("test_file");
......@@ -630,8 +600,6 @@ test "Dir.statFile" {
630600}
631601
632602test "directory operations on files" {
633 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
634
635603 try testWithAllSupportedPathTypes(struct {
636604 fn impl(ctx: *TestContext) !void {
637605 const test_file_name = try ctx.transformPath("test_file");
......@@ -661,8 +629,6 @@ test "file operations on directories" {
661629 // TODO: fix this test on FreeBSD. https://github.com/ziglang/zig/issues/1759
662630 if (builtin.os.tag == .freebsd) return error.SkipZigTest;
663631
664 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
665
666632 try testWithAllSupportedPathTypes(struct {
667633 fn impl(ctx: *TestContext) !void {
668634 const test_dir_name = try ctx.transformPath("test_dir");
......@@ -710,8 +676,6 @@ test "makeOpenPath parent dirs do not exist" {
710676}
711677
712678test "deleteDir" {
713 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
714
715679 try testWithAllSupportedPathTypes(struct {
716680 fn impl(ctx: *TestContext) !void {
717681 const test_dir_path = try ctx.transformPath("test_dir");
......@@ -733,8 +697,6 @@ test "deleteDir" {
733697}
734698
735699test "Dir.rename files" {
736 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
737
738700 try testWithAllSupportedPathTypes(struct {
739701 fn impl(ctx: *TestContext) !void {
740702 // Rename on Windows can hit intermittent AccessDenied errors
......@@ -777,8 +739,6 @@ test "Dir.rename files" {
777739}
778740
779741test "Dir.rename directories" {
780 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
781
782742 try testWithAllSupportedPathTypes(struct {
783743 fn impl(ctx: *TestContext) !void {
784744 // Rename on Windows can hit intermittent AccessDenied errors
......@@ -820,8 +780,6 @@ test "Dir.rename directory onto empty dir" {
820780 // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364
821781 if (builtin.os.tag == .windows) return error.SkipZigTest;
822782
823 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
824
825783 try testWithAllSupportedPathTypes(struct {
826784 fn impl(ctx: *TestContext) !void {
827785 const test_dir_path = try ctx.transformPath("test_dir");
......@@ -843,8 +801,6 @@ test "Dir.rename directory onto non-empty dir" {
843801 // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364
844802 if (builtin.os.tag == .windows) return error.SkipZigTest;
845803
846 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
847
848804 try testWithAllSupportedPathTypes(struct {
849805 fn impl(ctx: *TestContext) !void {
850806 const test_dir_path = try ctx.transformPath("test_dir");
......@@ -871,8 +827,6 @@ test "Dir.rename file <-> dir" {
871827 // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364
872828 if (builtin.os.tag == .windows) return error.SkipZigTest;
873829
874 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
875
876830 try testWithAllSupportedPathTypes(struct {
877831 fn impl(ctx: *TestContext) !void {
878832 const test_file_path = try ctx.transformPath("test_file");
......@@ -888,8 +842,6 @@ test "Dir.rename file <-> dir" {
888842}
889843
890844test "rename" {
891 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
892
893845 var tmp_dir1 = tmpDir(.{});
894846 defer tmp_dir1.cleanup();
895847
......@@ -912,8 +864,6 @@ test "rename" {
912864test "renameAbsolute" {
913865 if (builtin.os.tag == .wasi) return error.SkipZigTest;
914866
915 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
916
917867 var tmp_dir = tmpDir(.{});
918868 defer tmp_dir.cleanup();
919869
......@@ -972,8 +922,6 @@ test "openSelfExe" {
972922}
973923
974924test "makePath, put some files in it, deleteTree" {
975 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
976
977925 try testWithAllSupportedPathTypes(struct {
978926 fn impl(ctx: *TestContext) !void {
979927 const allocator = ctx.arena.allocator();
......@@ -990,8 +938,6 @@ test "makePath, put some files in it, deleteTree" {
990938}
991939
992940test "makePath, put some files in it, deleteTreeMinStackSize" {
993 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
994
995941 try testWithAllSupportedPathTypes(struct {
996942 fn impl(ctx: *TestContext) !void {
997943 const allocator = ctx.arena.allocator();
......@@ -1010,8 +956,6 @@ test "makePath, put some files in it, deleteTreeMinStackSize" {
1010956test "makePath in a directory that no longer exists" {
1011957 if (builtin.os.tag == .windows) return error.SkipZigTest; // Windows returns FileBusy if attempting to remove an open dir
1012958
1013 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1014
1015959 var tmp = tmpDir(.{});
1016960 defer tmp.cleanup();
1017961 try tmp.parent_dir.deleteTree(&tmp.sub_path);
......@@ -1043,8 +987,6 @@ fn testFilenameLimits(iterable_dir: IterableDir, maxed_filename: []const u8) !vo
1043987}
1044988
1045989test "max file name component lengths" {
1046 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1047
1048990 var tmp = tmpIterableDir(.{});
1049991 defer tmp.cleanup();
1050992
......@@ -1066,8 +1008,6 @@ test "max file name component lengths" {
10661008}
10671009
10681010test "writev, readv" {
1069 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1070
10711011 var tmp = tmpDir(.{});
10721012 defer tmp.cleanup();
10731013
......@@ -1110,8 +1050,6 @@ test "writev, readv" {
11101050}
11111051
11121052test "pwritev, preadv" {
1113 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1114
11151053 var tmp = tmpDir(.{});
11161054 defer tmp.cleanup();
11171055
......@@ -1153,8 +1091,6 @@ test "pwritev, preadv" {
11531091}
11541092
11551093test "access file" {
1156 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1157
11581094 try testWithAllSupportedPathTypes(struct {
11591095 fn impl(ctx: *TestContext) !void {
11601096 const dir_path = try ctx.transformPath("os_test_tmp");
......@@ -1171,8 +1107,6 @@ test "access file" {
11711107}
11721108
11731109test "sendfile" {
1174 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1175
11761110 var tmp = tmpDir(.{});
11771111 defer tmp.cleanup();
11781112
......@@ -1238,8 +1172,6 @@ test "sendfile" {
12381172}
12391173
12401174test "copyRangeAll" {
1241 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1242
12431175 var tmp = tmpDir(.{});
12441176 defer tmp.cleanup();
12451177
......@@ -1266,8 +1198,6 @@ test "copyRangeAll" {
12661198}
12671199
12681200test "copyFile" {
1269 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1270
12711201 try testWithAllSupportedPathTypes(struct {
12721202 fn impl(ctx: *TestContext) !void {
12731203 const data = "u6wj+JmdF3qHsFPE BUlH2g4gJCmEz0PP";
......@@ -1298,8 +1228,6 @@ fn expectFileContents(dir: Dir, file_path: []const u8, data: []const u8) !void {
12981228}
12991229
13001230test "AtomicFile" {
1301 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1302
13031231 try testWithAllSupportedPathTypes(struct {
13041232 fn impl(ctx: *TestContext) !void {
13051233 const allocator = ctx.arena.allocator();
......@@ -1326,8 +1254,6 @@ test "AtomicFile" {
13261254test "open file with exclusive nonblocking lock twice" {
13271255 if (builtin.os.tag == .wasi) return error.SkipZigTest;
13281256
1329 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1330
13311257 try testWithAllSupportedPathTypes(struct {
13321258 fn impl(ctx: *TestContext) !void {
13331259 const filename = try ctx.transformPath("file_nonblocking_lock_test.txt");
......@@ -1344,8 +1270,6 @@ test "open file with exclusive nonblocking lock twice" {
13441270test "open file with shared and exclusive nonblocking lock" {
13451271 if (builtin.os.tag == .wasi) return error.SkipZigTest;
13461272
1347 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1348
13491273 try testWithAllSupportedPathTypes(struct {
13501274 fn impl(ctx: *TestContext) !void {
13511275 const filename = try ctx.transformPath("file_nonblocking_lock_test.txt");
......@@ -1362,8 +1286,6 @@ test "open file with shared and exclusive nonblocking lock" {
13621286test "open file with exclusive and shared nonblocking lock" {
13631287 if (builtin.os.tag == .wasi) return error.SkipZigTest;
13641288
1365 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1366
13671289 try testWithAllSupportedPathTypes(struct {
13681290 fn impl(ctx: *TestContext) !void {
13691291 const filename = try ctx.transformPath("file_nonblocking_lock_test.txt");
......@@ -1378,8 +1300,6 @@ test "open file with exclusive and shared nonblocking lock" {
13781300}
13791301
13801302test "open file with exclusive lock twice, make sure second lock waits" {
1381 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1382
13831303 if (builtin.single_threaded) return error.SkipZigTest;
13841304
13851305 if (std.io.is_async) {
......@@ -1430,8 +1350,6 @@ test "open file with exclusive lock twice, make sure second lock waits" {
14301350test "open file with exclusive nonblocking lock twice (absolute paths)" {
14311351 if (builtin.os.tag == .wasi) return error.SkipZigTest;
14321352
1433 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1434
14351353 var random_bytes: [12]u8 = undefined;
14361354 std.crypto.random.bytes(&random_bytes);
14371355
......@@ -1466,8 +1384,6 @@ test "open file with exclusive nonblocking lock twice (absolute paths)" {
14661384test "walker" {
14671385 if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest;
14681386
1469 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1470
14711387 var tmp = tmpIterableDir(.{});
14721388 defer tmp.cleanup();
14731389
......@@ -1521,8 +1437,6 @@ test "walker" {
15211437test "walker without fully iterating" {
15221438 if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest;
15231439
1524 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1525
15261440 var tmp = tmpIterableDir(.{});
15271441 defer tmp.cleanup();
15281442
......@@ -1546,8 +1460,6 @@ test "walker without fully iterating" {
15461460test ". and .. in fs.Dir functions" {
15471461 if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest;
15481462
1549 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1550
15511463 if (builtin.os.tag == .windows and builtin.cpu.arch == .aarch64) {
15521464 // https://github.com/ziglang/zig/issues/17134
15531465 return error.SkipZigTest;
......@@ -1588,8 +1500,6 @@ test ". and .. in fs.Dir functions" {
15881500test ". and .. in absolute functions" {
15891501 if (builtin.os.tag == .wasi) return error.SkipZigTest;
15901502
1591 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1592
15931503 var tmp = tmpDir(.{});
15941504 defer tmp.cleanup();
15951505
......@@ -1635,8 +1545,6 @@ test "chmod" {
16351545 if (builtin.os.tag == .windows or builtin.os.tag == .wasi)
16361546 return error.SkipZigTest;
16371547
1638 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1639
16401548 var tmp = tmpDir(.{});
16411549 defer tmp.cleanup();
16421550
......@@ -1659,8 +1567,6 @@ test "chown" {
16591567 if (builtin.os.tag == .windows or builtin.os.tag == .wasi)
16601568 return error.SkipZigTest;
16611569
1662 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1663
16641570 var tmp = tmpDir(.{});
16651571 defer tmp.cleanup();
16661572
......@@ -1676,8 +1582,6 @@ test "chown" {
16761582}
16771583
16781584test "File.Metadata" {
1679 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1680
16811585 var tmp = tmpDir(.{});
16821586 defer tmp.cleanup();
16831587
......@@ -1696,8 +1600,6 @@ test "File.Permissions" {
16961600 if (builtin.os.tag == .wasi)
16971601 return error.SkipZigTest;
16981602
1699 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1700
17011603 var tmp = tmpDir(.{});
17021604 defer tmp.cleanup();
17031605
......@@ -1724,8 +1626,6 @@ test "File.PermissionsUnix" {
17241626 if (builtin.os.tag == .windows or builtin.os.tag == .wasi)
17251627 return error.SkipZigTest;
17261628
1727 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1728
17291629 var tmp = tmpDir(.{});
17301630 defer tmp.cleanup();
17311631
......@@ -1761,8 +1661,6 @@ test "delete a read-only file on windows" {
17611661 if (builtin.os.tag != .windows)
17621662 return error.SkipZigTest;
17631663
1764 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1765
17661664 var tmp = testing.tmpDir(.{});
17671665 defer tmp.cleanup();
17681666
......@@ -1793,8 +1691,6 @@ test "delete a read-only file on windows" {
17931691test "delete a setAsCwd directory on Windows" {
17941692 if (builtin.os.tag != .windows) return error.SkipZigTest;
17951693
1796 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1797
17981694 var tmp = tmpDir(.{});
17991695 // Set tmp dir as current working directory.
18001696 try tmp.dir.setAsCwd();
lib/std/hash/auto_hash.zig-21
......@@ -1,6 +1,5 @@
11const std = @import("std");
22const assert = std.debug.assert;
3const builtin = @import("builtin");
43const mem = std.mem;
54const meta = std.meta;
65
......@@ -253,8 +252,6 @@ test "typeContainsSlice" {
253252}
254253
255254test "hash pointer" {
256 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
257
258255 const array = [_]u32{ 123, 123, 123 };
259256 const a = &array[0];
260257 const b = &array[1];
......@@ -275,8 +272,6 @@ test "hash pointer" {
275272}
276273
277274test "hash slice shallow" {
278 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
279
280275 // Allocate one array dynamically so that we're assured it is not merged
281276 // with the other by the optimization passes.
282277 const array1 = try std.testing.allocator.create([6]u32);
......@@ -295,8 +290,6 @@ test "hash slice shallow" {
295290}
296291
297292test "hash slice deep" {
298 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
299
300293 // Allocate one array dynamically so that we're assured it is not merged
301294 // with the other by the optimization passes.
302295 const array1 = try std.testing.allocator.create([6]u32);
......@@ -313,8 +306,6 @@ test "hash slice deep" {
313306}
314307
315308test "hash struct deep" {
316 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
317
318309 const Foo = struct {
319310 a: u32,
320311 b: u16,
......@@ -354,8 +345,6 @@ test "hash struct deep" {
354345}
355346
356347test "testHash optional" {
357 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
358
359348 const a: ?u32 = 123;
360349 const b: ?u32 = null;
361350 try testing.expectEqual(testHash(a), testHash(@as(u32, 123)));
......@@ -364,8 +353,6 @@ test "testHash optional" {
364353}
365354
366355test "testHash array" {
367 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
368
369356 const a = [_]u32{ 1, 2, 3 };
370357 const h = testHash(a);
371358 var hasher = Wyhash.init(0);
......@@ -382,8 +369,6 @@ test "testHash multi-dimensional array" {
382369}
383370
384371test "testHash struct" {
385 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
386
387372 const Foo = struct {
388373 a: u32 = 1,
389374 b: u32 = 2,
......@@ -399,8 +384,6 @@ test "testHash struct" {
399384}
400385
401386test "testHash union" {
402 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
403
404387 const Foo = union(enum) {
405388 A: u32,
406389 B: bool,
......@@ -425,8 +408,6 @@ test "testHash union" {
425408}
426409
427410test "testHash vector" {
428 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
429
430411 const a: @Vector(4, u32) = [_]u32{ 1, 2, 3, 4 };
431412 const b: @Vector(4, u32) = [_]u32{ 1, 2, 3, 5 };
432413 try testing.expect(testHash(a) == testHash(a));
......@@ -439,8 +420,6 @@ test "testHash vector" {
439420}
440421
441422test "testHash error union" {
442 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
443
444423 const Errors = error{Test};
445424 const Foo = struct {
446425 a: u32 = 1,
lib/std/hash/wyhash.zig-2
......@@ -242,8 +242,6 @@ test "smhasher" {
242242}
243243
244244test "iterative api" {
245 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
246
247245 const Test = struct {
248246 fn do() !void {
249247 try verify.iterativeApi(Wyhash);
lib/std/hash/xxhash.zig-18
......@@ -803,8 +803,6 @@ fn testExpect(comptime H: type, seed: anytype, input: []const u8, expected: u64)
803803}
804804
805805test "xxhash3" {
806 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
807
808806 const H = XxHash3;
809807 // Non-Seeded Tests
810808 try testExpect(H, 0, "", 0x2d06800538d394c2);
......@@ -836,8 +834,6 @@ test "xxhash3" {
836834}
837835
838836test "xxhash3 smhasher" {
839 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
840
841837 const Test = struct {
842838 fn do() !void {
843839 try expectEqual(verify.smhasher(XxHash3.hash), 0x9a636405);
......@@ -849,8 +845,6 @@ test "xxhash3 smhasher" {
849845}
850846
851847test "xxhash3 iterative api" {
852 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
853
854848 const Test = struct {
855849 fn do() !void {
856850 try verify.iterativeApi(XxHash3);
......@@ -862,8 +856,6 @@ test "xxhash3 iterative api" {
862856}
863857
864858test "xxhash64" {
865 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
866
867859 const H = XxHash64;
868860 try testExpect(H, 0, "", 0xef46db3751d8e999);
869861 try testExpect(H, 0, "a", 0xd24ec4f1a98c6e5b);
......@@ -875,8 +867,6 @@ test "xxhash64" {
875867}
876868
877869test "xxhash64 smhasher" {
878 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
879
880870 const Test = struct {
881871 fn do() !void {
882872 try expectEqual(verify.smhasher(XxHash64.hash), 0x024B7CF4);
......@@ -888,8 +878,6 @@ test "xxhash64 smhasher" {
888878}
889879
890880test "xxhash64 iterative api" {
891 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
892
893881 const Test = struct {
894882 fn do() !void {
895883 try verify.iterativeApi(XxHash64);
......@@ -901,8 +889,6 @@ test "xxhash64 iterative api" {
901889}
902890
903891test "xxhash32" {
904 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
905
906892 const H = XxHash32;
907893
908894 try testExpect(H, 0, "", 0x02cc5d05);
......@@ -915,8 +901,6 @@ test "xxhash32" {
915901}
916902
917903test "xxhash32 smhasher" {
918 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
919
920904 const Test = struct {
921905 fn do() !void {
922906 try expectEqual(verify.smhasher(XxHash32.hash), 0xBA88B743);
......@@ -928,8 +912,6 @@ test "xxhash32 smhasher" {
928912}
929913
930914test "xxhash32 iterative api" {
931 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
932
933915 const Test = struct {
934916 fn do() !void {
935917 try verify.iterativeApi(XxHash32);
lib/std/hash_map.zig-2
......@@ -1873,8 +1873,6 @@ test "std.hash_map multiple removes on same metadata" {
18731873}
18741874
18751875test "std.hash_map put and remove loop in random order" {
1876 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1877
18781876 var map = AutoHashMap(u32, u32).init(std.testing.allocator);
18791877 defer map.deinit();
18801878
lib/std/heap/general_purpose_allocator.zig-4
......@@ -1042,8 +1042,6 @@ const TraceKind = enum {
10421042const test_config = Config{};
10431043
10441044test "small allocations - free in same order" {
1045 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1046
10471045 var gpa = GeneralPurposeAllocator(test_config){};
10481046 defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak");
10491047 const allocator = gpa.allocator();
......@@ -1063,8 +1061,6 @@ test "small allocations - free in same order" {
10631061}
10641062
10651063test "small allocations - free in reverse order" {
1066 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1067
10681064 var gpa = GeneralPurposeAllocator(test_config){};
10691065 defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak");
10701066 const allocator = gpa.allocator();
lib/std/http/Client.zig+2-6
......@@ -1,7 +1,6 @@
11//! Connecting and opening requests are threadsafe. Individual requests are not.
22
33const std = @import("../std.zig");
4const builtin = @import("builtin");
54const testing = std.testing;
65const http = std.http;
76const mem = std.mem;
......@@ -428,8 +427,6 @@ pub const Response = struct {
428427 }
429428
430429 test parseInt3 {
431 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
432
433430 const expectEqual = testing.expectEqual;
434431 try expectEqual(@as(u10, 0), parseInt3("000".*));
435432 try expectEqual(@as(u10, 418), parseInt3("418".*));
......@@ -588,7 +585,7 @@ pub const Request = struct {
588585
589586 if (!req.headers.contains("user-agent")) {
590587 try w.writeAll("User-Agent: zig/");
591 try w.writeAll(builtin.zig_version_string);
588 try w.writeAll(@import("builtin").zig_version_string);
592589 try w.writeAll(" (std.http)\r\n");
593590 }
594591
......@@ -1252,6 +1249,7 @@ pub fn fetch(client: *Client, allocator: Allocator, options: FetchOptions) !Fetc
12521249}
12531250
12541251test {
1252 const builtin = @import("builtin");
12551253 const native_endian = comptime builtin.cpu.arch.endian();
12561254 if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) {
12571255 // https://github.com/ziglang/zig/issues/13782
......@@ -1260,7 +1258,5 @@ test {
12601258
12611259 if (builtin.os.tag == .wasi) return error.SkipZigTest;
12621260
1263 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1264
12651261 std.testing.refAllDecls(@This());
12661262}
lib/std/http/Server.zig-2
......@@ -725,8 +725,6 @@ test "HTTP server handles a chunked transfer coding request" {
725725 return error.SkipZigTest;
726726 }
727727
728 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
729
730728 const native_endian = comptime builtin.cpu.arch.endian();
731729 if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) {
732730 // https://github.com/ziglang/zig/issues/13782
lib/std/io/bit_reader.zig-2
......@@ -164,8 +164,6 @@ pub fn bitReader(
164164}
165165
166166test "api coverage" {
167 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
168
169167 const mem_be = [_]u8{ 0b11001101, 0b00001011 };
170168 const mem_le = [_]u8{ 0b00011101, 0b10010101 };
171169
lib/std/io/multi_writer.zig-1
......@@ -36,7 +36,6 @@ pub fn multiWriter(streams: anytype) MultiWriter(@TypeOf(streams)) {
3636const testing = std.testing;
3737
3838test "MultiWriter" {
39 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4039 var tmp = testing.tmpDir(.{});
4140 defer tmp.cleanup();
4241 var f = try tmp.dir.createFile("t.txt", .{});
lib/std/io/test.zig-10
......@@ -15,8 +15,6 @@ const native_endian = builtin.target.cpu.arch.endian();
1515const tmpDir = std.testing.tmpDir;
1616
1717test "write a file, read it, then delete it" {
18 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
19
2018 var tmp = tmpDir(.{});
2119 defer tmp.cleanup();
2220
......@@ -63,8 +61,6 @@ test "write a file, read it, then delete it" {
6361}
6462
6563test "BitStreams with File Stream" {
66 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
67
6864 var tmp = tmpDir(.{});
6965 defer tmp.cleanup();
7066
......@@ -110,8 +106,6 @@ test "BitStreams with File Stream" {
110106}
111107
112108test "File seek ops" {
113 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
114
115109 var tmp = tmpDir(.{});
116110 defer tmp.cleanup();
117111
......@@ -139,8 +133,6 @@ test "File seek ops" {
139133}
140134
141135test "setEndPos" {
142 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
143
144136 var tmp = tmpDir(.{});
145137 defer tmp.cleanup();
146138
......@@ -167,8 +159,6 @@ test "setEndPos" {
167159}
168160
169161test "updateTimes" {
170 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
171
172162 var tmp = tmpDir(.{});
173163 defer tmp.cleanup();
174164
lib/std/json.zig-9
......@@ -9,7 +9,6 @@
99//! The low-level `writeStream` emits syntax-conformant JSON tokens to a `std.io.Writer`.
1010//! The high-level `stringify` serializes a Zig or `Value` type into JSON.
1111
12const builtin = @import("builtin");
1312const testing = @import("std").testing;
1413const ArrayList = @import("std").ArrayList;
1514
......@@ -24,8 +23,6 @@ test Scanner {
2423}
2524
2625test parseFromSlice {
27 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
28
2926 var parsed_str = try parseFromSlice([]const u8, testing.allocator, "\"a\\u0020b\"", .{});
3027 defer parsed_str.deinit();
3128 try testing.expectEqualSlices(u8, "a b", parsed_str.value);
......@@ -38,16 +35,12 @@ test parseFromSlice {
3835}
3936
4037test Value {
41 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
42
4338 var parsed = try parseFromSlice(Value, testing.allocator, "{\"anything\": \"goes\"}", .{});
4439 defer parsed.deinit();
4540 try testing.expectEqualSlices(u8, "goes", parsed.value.object.get("anything").?.string);
4641}
4742
4843test writeStream {
49 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
50
5144 var out = ArrayList(u8).init(testing.allocator);
5245 defer out.deinit();
5346 var write_stream = writeStream(out.writer(), .{ .whitespace = .indent_2 });
......@@ -65,8 +58,6 @@ test writeStream {
6558}
6659
6760test stringify {
68 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
69
7061 var out = ArrayList(u8).init(testing.allocator);
7162 defer out.deinit();
7263
lib/std/json/JSONTestSuite_test.zig-72
......@@ -104,8 +104,6 @@ test "i_string_utf16LE_no_BOM.json" {
104104 try any("[\x00\"\x00\xe9\x00\"\x00]\x00");
105105}
106106test "i_structure_500_nested_arrays.json" {
107 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
108
109107 try any("[" ** 500 ++ "]" ** 500);
110108}
111109test "i_structure_UTF-8_BOM_empty_object.json" {
......@@ -361,21 +359,15 @@ test "n_object_bracket_key.json" {
361359 try err("{[: \"x\"}\n");
362360}
363361test "n_object_comma_instead_of_colon.json" {
364 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
365
366362 try err("{\"x\", null}");
367363}
368364test "n_object_double_colon.json" {
369 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
370
371365 try err("{\"x\"::\"b\"}");
372366}
373367test "n_object_emoji.json" {
374368 try err("{\xf0\x9f\x87\xa8\xf0\x9f\x87\xad}");
375369}
376370test "n_object_garbage_at_end.json" {
377 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
378
379371 try err("{\"a\":\"a\" 123}");
380372}
381373test "n_object_key_with_single_quotes.json" {
......@@ -385,26 +377,18 @@ test "n_object_lone_continuation_byte_in_key_and_trailing_comma.json" {
385377 try err("{\"\xb9\":\"0\",}");
386378}
387379test "n_object_missing_colon.json" {
388 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
389
390380 try err("{\"a\" b}");
391381}
392382test "n_object_missing_key.json" {
393383 try err("{:\"b\"}");
394384}
395385test "n_object_missing_semicolon.json" {
396 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
397
398386 try err("{\"a\" \"b\"}");
399387}
400388test "n_object_missing_value.json" {
401 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
402
403389 try err("{\"a\":");
404390}
405391test "n_object_no-colon.json" {
406 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
407
408392 try err("{\"a\"");
409393}
410394test "n_object_non_string_key.json" {
......@@ -417,59 +401,39 @@ test "n_object_repeated_null_null.json" {
417401 try err("{null:null,null:null}");
418402}
419403test "n_object_several_trailing_commas.json" {
420 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
421
422404 try err("{\"id\":0,,,,,}");
423405}
424406test "n_object_single_quote.json" {
425407 try err("{'a':0}");
426408}
427409test "n_object_trailing_comma.json" {
428 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
429
430410 try err("{\"id\":0,}");
431411}
432412test "n_object_trailing_comment.json" {
433 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
434
435413 try err("{\"a\":\"b\"}/**/");
436414}
437415test "n_object_trailing_comment_open.json" {
438 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
439
440416 try err("{\"a\":\"b\"}/**//");
441417}
442418test "n_object_trailing_comment_slash_open.json" {
443 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
444
445419 try err("{\"a\":\"b\"}//");
446420}
447421test "n_object_trailing_comment_slash_open_incomplete.json" {
448 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
449
450422 try err("{\"a\":\"b\"}/");
451423}
452424test "n_object_two_commas_in_a_row.json" {
453 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
454
455425 try err("{\"a\":\"b\",,\"c\":\"d\"}");
456426}
457427test "n_object_unquoted_key.json" {
458428 try err("{a: \"b\"}");
459429}
460430test "n_object_unterminated-value.json" {
461 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
462
463431 try err("{\"a\":\"a");
464432}
465433test "n_object_with_single_string.json" {
466 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
467
468434 try err("{ \"foo\" : \"bar\", \"a\" }");
469435}
470436test "n_object_with_trailing_garbage.json" {
471 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
472
473437 try err("{\"a\":\"b\"}#");
474438}
475439test "n_single_space.json" {
......@@ -596,8 +560,6 @@ test "n_structure_close_unopened_array.json" {
596560 try err("1]");
597561}
598562test "n_structure_comma_instead_of_closing_brace.json" {
599 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
600
601563 try err("{\"x\": true,");
602564}
603565test "n_structure_double_array.json" {
......@@ -628,18 +590,12 @@ test "n_structure_object_followed_by_closing_object.json" {
628590 try err("{}}");
629591}
630592test "n_structure_object_unclosed_no_value.json" {
631 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
632
633593 try err("{\"\":");
634594}
635595test "n_structure_object_with_comment.json" {
636 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
637
638596 try err("{\"a\":/*comment*/\"b\"}");
639597}
640598test "n_structure_object_with_trailing_garbage.json" {
641 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
642
643599 try err("{\"a\": true} \"x\"");
644600}
645601test "n_structure_open_array_apostrophe.json" {
......@@ -649,8 +605,6 @@ test "n_structure_open_array_comma.json" {
649605 try err("[,");
650606}
651607test "n_structure_open_array_object.json" {
652 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
653
654608 try err("[{\"\":" ** 50000 ++ "\n");
655609}
656610test "n_structure_open_array_open_object.json" {
......@@ -690,8 +644,6 @@ test "n_structure_single_star.json" {
690644 try err("*");
691645}
692646test "n_structure_trailing_#.json" {
693 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
694
695647 try err("{\"a\":\"b\"}#{}");
696648}
697649test "n_structure_uescaped_LF_before_string.json" {
......@@ -710,8 +662,6 @@ test "n_structure_unclosed_array_unfinished_true.json" {
710662 try err("[ false, tru");
711663}
712664test "n_structure_unclosed_object.json" {
713 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
714
715665 try err("{\"asd\":\"asd\"");
716666}
717667test "n_structure_unicode-identifier.json" {
......@@ -814,61 +764,39 @@ test "y_number_simple_real.json" {
814764 try ok("[123.456789]");
815765}
816766test "y_object.json" {
817 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
818
819767 try ok("{\"asd\":\"sdf\", \"dfg\":\"fgh\"}");
820768}
821769test "y_object_basic.json" {
822 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
823
824770 try ok("{\"asd\":\"sdf\"}");
825771}
826772test "y_object_duplicated_key.json" {
827 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
828
829773 try ok("{\"a\":\"b\",\"a\":\"c\"}");
830774}
831775test "y_object_duplicated_key_and_value.json" {
832 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
833
834776 try ok("{\"a\":\"b\",\"a\":\"b\"}");
835777}
836778test "y_object_empty.json" {
837779 try ok("{}");
838780}
839781test "y_object_empty_key.json" {
840 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
841
842782 try ok("{\"\":0}");
843783}
844784test "y_object_escaped_null_in_key.json" {
845 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
846
847785 try ok("{\"foo\\u0000bar\": 42}");
848786}
849787test "y_object_extreme_numbers.json" {
850 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
851
852788 try ok("{ \"min\": -1.0e+28, \"max\": 1.0e+28 }");
853789}
854790test "y_object_long_strings.json" {
855 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
856
857791 try ok("{\"x\":[{\"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}], \"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}");
858792}
859793test "y_object_simple.json" {
860 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
861
862794 try ok("{\"a\":[]}");
863795}
864796test "y_object_string_unicode.json" {
865 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
866
867797 try ok("{\"title\":\"\\u041f\\u043e\\u043b\\u0442\\u043e\\u0440\\u0430 \\u0417\\u0435\\u043c\\u043b\\u0435\\u043a\\u043e\\u043f\\u0430\" }");
868798}
869799test "y_object_with_newlines.json" {
870 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
871
872800 try ok("{\n\"a\": \"b\"\n}");
873801}
874802test "y_string_1_2_3_bytes_UTF-8_sequences.json" {
lib/std/json/dynamic_test.zig-25
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const mem = std.mem;
43const testing = std.testing;
54const ArenaAllocator = std.heap.ArenaAllocator;
......@@ -19,8 +18,6 @@ const jsonReader = @import("scanner.zig").reader;
1918const JsonReader = @import("scanner.zig").Reader;
2019
2120test "json.parser.dynamic" {
22 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
23
2421 const s =
2522 \\{
2623 \\ "Image": {
......@@ -75,8 +72,6 @@ test "json.parser.dynamic" {
7572
7673const writeStream = @import("./stringify.zig").writeStream;
7774test "write json then parse it" {
78 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
79
8075 var out_buffer: [1000]u8 = undefined;
8176
8277 var fixed_buffer_stream = std.io.fixedBufferStream(&out_buffer);
......@@ -125,16 +120,12 @@ fn testParse(allocator: std.mem.Allocator, json_str: []const u8) !Value {
125120}
126121
127122test "parsing empty string gives appropriate error" {
128 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
129
130123 var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator);
131124 defer arena_allocator.deinit();
132125 try testing.expectError(error.UnexpectedEndOfInput, testParse(arena_allocator.allocator(), ""));
133126}
134127
135128test "Value.array allocator should still be usable after parsing" {
136 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
137
138129 var parsed = try parseFromSlice(Value, std.testing.allocator, "[]", .{});
139130 defer parsed.deinit();
140131
......@@ -147,8 +138,6 @@ test "Value.array allocator should still be usable after parsing" {
147138}
148139
149140test "integer after float has proper type" {
150 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
151
152141 var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator);
153142 defer arena_allocator.deinit();
154143 const parsed = try testParse(arena_allocator.allocator(),
......@@ -161,8 +150,6 @@ test "integer after float has proper type" {
161150}
162151
163152test "escaped characters" {
164 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
165
166153 var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator);
167154 defer arena_allocator.deinit();
168155 const input =
......@@ -195,8 +182,6 @@ test "escaped characters" {
195182}
196183
197184test "Value.jsonStringify" {
198 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
199
200185 var vals = [_]Value{
201186 .{ .integer = 1 },
202187 .{ .integer = 2 },
......@@ -244,8 +229,6 @@ test "Value.jsonStringify" {
244229}
245230
246231test "parseFromValue(std.json.Value,...)" {
247 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
248
249232 const str =
250233 \\{
251234 \\ "int": 32,
......@@ -263,8 +246,6 @@ test "parseFromValue(std.json.Value,...)" {
263246}
264247
265248test "polymorphic parsing" {
266 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
267
268249 if (true) return error.SkipZigTest; // See https://github.com/ziglang/zig/issues/16108
269250 const doc =
270251 \\{ "type": "div",
......@@ -310,8 +291,6 @@ test "polymorphic parsing" {
310291}
311292
312293test "long object value" {
313 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
314
315294 const value = "01234567890123456789";
316295 const doc = "{\"key\":\"" ++ value ++ "\"}";
317296 var fbs = std.io.fixedBufferStream(doc);
......@@ -324,8 +303,6 @@ test "long object value" {
324303}
325304
326305test "ParseOptions.max_value_len" {
327 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
328
329306 var arena = ArenaAllocator.init(testing.allocator);
330307 defer arena.deinit();
331308
......@@ -340,8 +317,6 @@ test "ParseOptions.max_value_len" {
340317}
341318
342319test "many object keys" {
343 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
344
345320 const doc =
346321 \\{
347322 \\ "k1": "v1",
lib/std/json/hashmap_test.zig-13
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const testing = std.testing;
43
54const ArrayHashMap = @import("hashmap.zig").ArrayHashMap;
......@@ -19,8 +18,6 @@ const T = struct {
1918};
2019
2120test "parse json hashmap" {
22 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
23
2421 const doc =
2522 \\{
2623 \\ "abc": {"i": 0, "s": "d"},
......@@ -36,8 +33,6 @@ test "parse json hashmap" {
3633}
3734
3835test "parse json hashmap while streaming" {
39 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
40
4136 const doc =
4237 \\{
4338 \\ "abc": {"i": 0, "s": "d"},
......@@ -63,8 +58,6 @@ test "parse json hashmap while streaming" {
6358}
6459
6560test "parse json hashmap duplicate fields" {
66 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
67
6861 var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
6962 defer arena.deinit();
7063
......@@ -93,8 +86,6 @@ test "parse json hashmap duplicate fields" {
9386}
9487
9588test "stringify json hashmap" {
96 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
97
9889 var value = ArrayHashMap(T){};
9990 defer value.deinit(testing.allocator);
10091 {
......@@ -132,8 +123,6 @@ test "stringify json hashmap" {
132123}
133124
134125test "stringify json hashmap whitespace" {
135 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
136
137126 var value = ArrayHashMap(T){};
138127 defer value.deinit(testing.allocator);
139128 try value.map.put(testing.allocator, "abc", .{ .i = 0, .s = "d" });
......@@ -158,8 +147,6 @@ test "stringify json hashmap whitespace" {
158147}
159148
160149test "json parse from value hashmap" {
161 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
162
163150 const doc =
164151 \\{
165152 \\ "abc": {"i": 0, "s": "d"},
lib/std/json/static_test.zig-49
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const testing = std.testing;
43const ArenaAllocator = std.heap.ArenaAllocator;
54const Allocator = std.mem.Allocator;
......@@ -372,8 +371,6 @@ test "test all types" {
372371}
373372
374373test "parse" {
375 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
376
377374 try testing.expectEqual(false, try parseFromSliceLeaky(bool, testing.allocator, "false", .{}));
378375 try testing.expectEqual(true, try parseFromSliceLeaky(bool, testing.allocator, "true", .{}));
379376 try testing.expectEqual(@as(u1, 1), try parseFromSliceLeaky(u1, testing.allocator, "1", .{}));
......@@ -392,8 +389,6 @@ test "parse" {
392389}
393390
394391test "parse into enum" {
395 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
396
397392 const T = enum(u32) {
398393 Foo = 42,
399394 Bar,
......@@ -407,8 +402,6 @@ test "parse into enum" {
407402}
408403
409404test "parse into that allocates a slice" {
410 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
411
412405 {
413406 // string as string
414407 const parsed = try parseFromSlice([]u8, testing.allocator, "\"foo\"", .{});
......@@ -429,16 +422,12 @@ test "parse into that allocates a slice" {
429422}
430423
431424test "parse into sentinel slice" {
432 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
433
434425 const parsed = try parseFromSlice([:0]const u8, testing.allocator, "\"\\n\"", .{});
435426 defer parsed.deinit();
436427 try testing.expect(std.mem.eql(u8, parsed.value, "\n"));
437428}
438429
439430test "parse into tagged union" {
440 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
441
442431 const T = union(enum) {
443432 nothing,
444433 int: i32,
......@@ -454,8 +443,6 @@ test "parse into tagged union" {
454443}
455444
456445test "parse into tagged union errors" {
457 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
458
459446 const T = union(enum) {
460447 nothing,
461448 int: i32,
......@@ -478,8 +465,6 @@ test "parse into tagged union errors" {
478465}
479466
480467test "parse into struct with no fields" {
481 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
482
483468 const T = struct {};
484469 const parsed = try parseFromSlice(T, testing.allocator, "{}", .{});
485470 defer parsed.deinit();
......@@ -489,8 +474,6 @@ test "parse into struct with no fields" {
489474const test_const_value: usize = 123;
490475
491476test "parse into struct with default const pointer field" {
492 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
493
494477 const T = struct { a: *const usize = &test_const_value };
495478 const parsed = try parseFromSlice(T, testing.allocator, "{}", .{});
496479 defer parsed.deinit();
......@@ -506,8 +489,6 @@ const test_default_str_slice: [2][]const u8 = [_][]const u8{
506489};
507490
508491test "freeing parsed structs with pointers to default values" {
509 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
510
511492 const T = struct {
512493 int: *const usize = &test_default_usize,
513494 int_ptr: *allowzero align(1) const usize = test_default_usize_ptr,
......@@ -521,15 +502,11 @@ test "freeing parsed structs with pointers to default values" {
521502}
522503
523504test "parse into struct where destination and source lengths mismatch" {
524 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
525
526505 const T = struct { a: [2]u8 };
527506 try testing.expectError(error.LengthMismatch, parseFromSlice(T, testing.allocator, "{\"a\": \"bbb\"}", .{}));
528507}
529508
530509test "parse into struct with misc fields" {
531 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
532
533510 const T = struct {
534511 int: i64,
535512 float: f64,
......@@ -605,8 +582,6 @@ test "parse into struct with misc fields" {
605582}
606583
607584test "parse into struct with strings and arrays with sentinels" {
608 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
609
610585 const T = struct {
611586 language: [:0]const u8,
612587 language_without_sentinel: []const u8,
......@@ -635,8 +610,6 @@ test "parse into struct with strings and arrays with sentinels" {
635610}
636611
637612test "parse into struct with duplicate field" {
638 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
639
640613 const options_first = ParseOptions{ .duplicate_field_behavior = .use_first };
641614 const options_last = ParseOptions{ .duplicate_field_behavior = .use_last };
642615
......@@ -656,8 +629,6 @@ test "parse into struct with duplicate field" {
656629}
657630
658631test "parse into struct ignoring unknown fields" {
659 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
660
661632 const T = struct {
662633 int: i64,
663634 language: []const u8,
......@@ -696,8 +667,6 @@ test "parse into struct ignoring unknown fields" {
696667}
697668
698669test "parse into tuple" {
699 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
700
701670 const Union = union(enum) {
702671 char: u8,
703672 float: f64,
......@@ -753,8 +722,6 @@ const ParseIntoRecursiveUnionDefinitionValue = union(enum) {
753722};
754723
755724test "parse into recursive union definition" {
756 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
757
758725 const T = struct {
759726 values: ParseIntoRecursiveUnionDefinitionValue,
760727 };
......@@ -776,8 +743,6 @@ const ParseIntoDoubleRecursiveUnionValueSecond = union(enum) {
776743};
777744
778745test "parse into double recursive union definition" {
779 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
780
781746 const T = struct {
782747 values: ParseIntoDoubleRecursiveUnionValueFirst,
783748 };
......@@ -789,8 +754,6 @@ test "parse into double recursive union definition" {
789754}
790755
791756test "parse exponential into int" {
792 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
793
794757 const T = struct { int: i64 };
795758 const r = try parseFromSliceLeaky(T, testing.allocator, "{ \"int\": 4.2e2 }", .{});
796759 try testing.expectEqual(@as(i64, 420), r.int);
......@@ -799,8 +762,6 @@ test "parse exponential into int" {
799762}
800763
801764test "parseFromTokenSource" {
802 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
803
804765 {
805766 var scanner = JsonScanner.initCompleteInput(testing.allocator, "123");
806767 defer scanner.deinit();
......@@ -820,14 +781,10 @@ test "parseFromTokenSource" {
820781}
821782
822783test "max_value_len" {
823 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
824
825784 try testing.expectError(error.ValueTooLong, parseFromSlice([]u8, testing.allocator, "\"0123456789\"", .{ .max_value_len = 5 }));
826785}
827786
828787test "parse into vector" {
829 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
830
831788 const T = struct {
832789 vec_i32: @Vector(4, i32),
833790 vec_f32: @Vector(2, f32),
......@@ -860,8 +817,6 @@ fn assertKey(
860817 }
861818}
862819test "json parse partial" {
863 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
864
865820 const Inner = struct {
866821 num: u32,
867822 yes: bool,
......@@ -917,8 +872,6 @@ test "json parse partial" {
917872}
918873
919874test "json parse allocate when streaming" {
920 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
921
922875 const T = struct {
923876 not_const: []u8,
924877 is_const: []const u8,
......@@ -949,8 +902,6 @@ test "json parse allocate when streaming" {
949902}
950903
951904test "parse at comptime" {
952 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
953
954905 const doc =
955906 \\{
956907 \\ "vals": {
lib/std/json/stringify_test.zig-41
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const mem = std.mem;
43const testing = std.testing;
54
......@@ -16,8 +15,6 @@ const writeStreamMaxDepth = @import("stringify.zig").writeStreamMaxDepth;
1615const writeStreamArbitraryDepth = @import("stringify.zig").writeStreamArbitraryDepth;
1716
1817test "json write stream" {
19 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
20
2118 var out_buf: [1024]u8 = undefined;
2219 var slice_stream = std.io.fixedBufferStream(&out_buf);
2320 const out = slice_stream.writer();
......@@ -100,8 +97,6 @@ fn getJsonObject(allocator: std.mem.Allocator) !Value {
10097}
10198
10299test "stringify null optional fields" {
103 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
104
105100 const MyStruct = struct {
106101 optional: ?[]const u8 = null,
107102 required: []const u8 = "something",
......@@ -123,8 +118,6 @@ test "stringify null optional fields" {
123118}
124119
125120test "stringify basic types" {
126 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
127
128121 try testStringify("false", false, .{});
129122 try testStringify("true", true, .{});
130123 try testStringify("null", @as(?u8, null), .{});
......@@ -141,8 +134,6 @@ test "stringify basic types" {
141134}
142135
143136test "stringify string" {
144 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
145
146137 try testStringify("\"hello\"", "hello", .{});
147138 try testStringify("\"with\\nescapes\\r\"", "with\nescapes\r", .{});
148139 try testStringify("\"with\\nescapes\\r\"", "with\nescapes\r", .{ .escape_unicode = true });
......@@ -167,16 +158,12 @@ test "stringify string" {
167158}
168159
169160test "stringify many-item sentinel-terminated string" {
170 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
171
172161 try testStringify("\"hello\"", @as([*:0]const u8, "hello"), .{});
173162 try testStringify("\"with\\nescapes\\r\"", @as([*:0]const u8, "with\nescapes\r"), .{ .escape_unicode = true });
174163 try testStringify("\"with unicode\\u0001\"", @as([*:0]const u8, "with unicode\u{1}"), .{ .escape_unicode = true });
175164}
176165
177166test "stringify enums" {
178 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
179
180167 const E = enum {
181168 foo,
182169 bar,
......@@ -186,15 +173,11 @@ test "stringify enums" {
186173}
187174
188175test "stringify enum literals" {
189 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
190
191176 try testStringify("\"foo\"", .foo, .{});
192177 try testStringify("\"bar\"", .bar, .{});
193178}
194179
195180test "stringify tagged unions" {
196 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
197
198181 const T = union(enum) {
199182 nothing,
200183 foo: u32,
......@@ -206,16 +189,12 @@ test "stringify tagged unions" {
206189}
207190
208191test "stringify struct" {
209 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
210
211192 try testStringify("{\"foo\":42}", struct {
212193 foo: u32,
213194 }{ .foo = 42 }, .{});
214195}
215196
216197test "emit_strings_as_arrays" {
217 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
218
219198 // Should only affect string values, not object keys.
220199 try testStringify("{\"foo\":\"bar\"}", .{ .foo = "bar" }, .{});
221200 try testStringify("{\"foo\":[98,97,114]}", .{ .foo = "bar" }, .{ .emit_strings_as_arrays = true });
......@@ -230,8 +209,6 @@ test "emit_strings_as_arrays" {
230209}
231210
232211test "stringify struct with indentation" {
233 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
234
235212 try testStringify(
236213 \\{
237214 \\ "foo": 42,
......@@ -277,8 +254,6 @@ test "stringify struct with indentation" {
277254}
278255
279256test "stringify struct with void field" {
280 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
281
282257 try testStringify("{\"foo\":42}", struct {
283258 foo: u32,
284259 bar: void = {},
......@@ -286,8 +261,6 @@ test "stringify struct with void field" {
286261}
287262
288263test "stringify array of structs" {
289 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
290
291264 const MyStruct = struct {
292265 foo: u32,
293266 };
......@@ -299,8 +272,6 @@ test "stringify array of structs" {
299272}
300273
301274test "stringify struct with custom stringifier" {
302 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
303
304275 try testStringify("[\"something special\",42]", struct {
305276 foo: u32,
306277 const Self = @This();
......@@ -315,16 +286,12 @@ test "stringify struct with custom stringifier" {
315286}
316287
317288test "stringify vector" {
318 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
319
320289 try testStringify("[1,1]", @as(@Vector(2, u32), @splat(1)), .{});
321290 try testStringify("\"AA\"", @as(@Vector(2, u8), @splat('A')), .{});
322291 try testStringify("[65,65]", @as(@Vector(2, u8), @splat('A')), .{ .emit_strings_as_arrays = true });
323292}
324293
325294test "stringify tuple" {
326 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
327
328295 try testStringify("[\"foo\",42]", std.meta.Tuple(&.{ []const u8, usize }){ "foo", 42 }, .{});
329296}
330297
......@@ -411,8 +378,6 @@ fn testStringifyArbitraryDepth(expected: []const u8, value: anytype, options: St
411378}
412379
413380test "stringify alloc" {
414 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
415
416381 const allocator = std.testing.allocator;
417382 const expected =
418383 \\{"foo":"bar","answer":42,"my_friend":"sammy"}
......@@ -424,8 +389,6 @@ test "stringify alloc" {
424389}
425390
426391test "comptime stringify" {
427 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
428
429392 comptime testStringifyMaxDepth("false", false, .{}, null) catch unreachable;
430393 comptime testStringifyMaxDepth("false", false, .{}, 0) catch unreachable;
431394 comptime testStringifyArbitraryDepth("false", false, .{}) catch unreachable;
......@@ -446,8 +409,6 @@ test "comptime stringify" {
446409}
447410
448411test "print" {
449 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
450
451412 var out_buf: [1024]u8 = undefined;
452413 var slice_stream = std.io.fixedBufferStream(&out_buf);
453414 const out = slice_stream.writer();
......@@ -479,8 +440,6 @@ test "print" {
479440}
480441
481442test "nonportable numbers" {
482 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
483
484443 try testStringify("9999999999999999", 9999999999999999, .{});
485444 try testStringify("\"9999999999999999\"", 9999999999999999, .{ .emit_nonportable_numbers_as_strings = true });
486445}
lib/std/json/test.zig-5
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const testing = std.testing;
43const parseFromSlice = @import("./static.zig").parseFromSlice;
54const validate = @import("./scanner.zig").validate;
......@@ -35,15 +34,11 @@ fn testHighLevelDynamicParser(s: []const u8) !void {
3534
3635// Additional tests not part of test JSONTestSuite.
3736test "y_trailing_comma_after_empty" {
38 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
39
4037 try roundTrip(
4138 \\{"1":[],"2":{},"3":"4"}
4239 );
4340}
4441test "n_object_closed_missing_value" {
45 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
46
4742 try err(
4843 \\{"a":}
4944 );
lib/std/leb128.zig-4
......@@ -215,8 +215,6 @@ fn test_read_uleb128_seq(comptime T: type, comptime N: usize, encoded: []const u
215215}
216216
217217test "deserialize signed LEB128" {
218 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
219
220218 // Truncated
221219 try testing.expectError(error.EndOfStream, test_read_stream_ileb128(i64, "\x80"));
222220
......@@ -363,8 +361,6 @@ test "serialize unsigned LEB128" {
363361}
364362
365363test "serialize signed LEB128" {
366 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
367
368364 // explicitly test i0 because starting `t` at 0
369365 // will break the while loop
370366 try test_write_leb128(@as(i0, 0));
lib/std/math.zig-26
......@@ -492,13 +492,10 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T {
492492}
493493
494494test "shl" {
495 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
496
497495 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
498496 // https://github.com/ziglang/zig/issues/12012
499497 return error.SkipZigTest;
500498 }
501
502499 try testing.expect(shl(u8, 0b11111111, @as(usize, 3)) == 0b11111000);
503500 try testing.expect(shl(u8, 0b11111111, @as(usize, 8)) == 0);
504501 try testing.expect(shl(u8, 0b11111111, @as(usize, 9)) == 0);
......@@ -539,13 +536,10 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T {
539536}
540537
541538test "shr" {
542 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
543
544539 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
545540 // https://github.com/ziglang/zig/issues/12012
546541 return error.SkipZigTest;
547542 }
548
549543 try testing.expect(shr(u8, 0b11111111, @as(usize, 3)) == 0b00011111);
550544 try testing.expect(shr(u8, 0b11111111, @as(usize, 8)) == 0);
551545 try testing.expect(shr(u8, 0b11111111, @as(usize, 9)) == 0);
......@@ -587,13 +581,10 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T {
587581}
588582
589583test "rotr" {
590 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
591
592584 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
593585 // https://github.com/ziglang/zig/issues/12012
594586 return error.SkipZigTest;
595587 }
596
597588 try testing.expect(rotr(u0, 0b0, @as(usize, 3)) == 0b0);
598589 try testing.expect(rotr(u5, 0b00001, @as(usize, 0)) == 0b00001);
599590 try testing.expect(rotr(u6, 0b000001, @as(usize, 7)) == 0b100000);
......@@ -634,13 +625,10 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T {
634625}
635626
636627test "rotl" {
637 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
638
639628 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
640629 // https://github.com/ziglang/zig/issues/12012
641630 return error.SkipZigTest;
642631 }
643
644632 try testing.expect(rotl(u0, 0b0, @as(usize, 3)) == 0b0);
645633 try testing.expect(rotl(u5, 0b00001, @as(usize, 0)) == 0b00001);
646634 try testing.expect(rotl(u6, 0b000001, @as(usize, 7)) == 0b000010);
......@@ -764,8 +752,6 @@ pub fn divTrunc(comptime T: type, numerator: T, denominator: T) !T {
764752}
765753
766754test "divTrunc" {
767 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
768
769755 try testDivTrunc();
770756 try comptime testDivTrunc();
771757}
......@@ -790,8 +776,6 @@ pub fn divFloor(comptime T: type, numerator: T, denominator: T) !T {
790776}
791777
792778test "divFloor" {
793 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
794
795779 try testDivFloor();
796780 try comptime testDivFloor();
797781}
......@@ -829,8 +813,6 @@ pub fn divCeil(comptime T: type, numerator: T, denominator: T) !T {
829813}
830814
831815test "divCeil" {
832 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
833
834816 try testDivCeil();
835817 try comptime testDivCeil();
836818}
......@@ -875,8 +857,6 @@ pub fn divExact(comptime T: type, numerator: T, denominator: T) !T {
875857}
876858
877859test "divExact" {
878 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
879
880860 try testDivExact();
881861 try comptime testDivExact();
882862}
......@@ -907,8 +887,6 @@ test "mod" {
907887 try comptime testMod();
908888}
909889fn testMod() !void {
910 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
911
912890 try testing.expect((mod(i32, -5, 3) catch unreachable) == 1);
913891 try testing.expect((mod(i32, 5, 3) catch unreachable) == 2);
914892 try testing.expectError(error.NegativeDenominator, mod(i32, 10, -1));
......@@ -931,8 +909,6 @@ pub fn rem(comptime T: type, numerator: T, denominator: T) !T {
931909}
932910
933911test "rem" {
934 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
935
936912 try testRem();
937913 try comptime testRem();
938914}
......@@ -1285,8 +1261,6 @@ pub fn lerp(a: anytype, b: anytype, t: anytype) @TypeOf(a, b, t) {
12851261}
12861262
12871263test "lerp" {
1288 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1289
12901264 try testing.expectEqual(@as(f64, 75), lerp(50, 100, 0.5));
12911265 try testing.expectEqual(@as(f32, 43.75), lerp(50, 25, 0.25));
12921266 try testing.expectEqual(@as(f64, -31.25), lerp(-50, 25, 0.25));
lib/std/math/big/int_test.zig+13-160
......@@ -71,8 +71,6 @@ test "big.int set negative minimum" {
7171}
7272
7373test "big.int set double-width maximum then zero" {
74 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
75
7674 var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb));
7775 defer a.deinit();
7876 try a.set(@as(DoubleLimb, 0));
......@@ -246,8 +244,6 @@ test "big.int fits" {
246244}
247245
248246test "big.int string set" {
249 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
250
251247 var a = try Managed.init(testing.allocator);
252248 defer a.deinit();
253249
......@@ -264,8 +260,6 @@ test "big.int string negative" {
264260}
265261
266262test "big.int string set number with underscores" {
267 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
268
269263 var a = try Managed.init(testing.allocator);
270264 defer a.deinit();
271265
......@@ -274,8 +268,6 @@ test "big.int string set number with underscores" {
274268}
275269
276270test "big.int string set case insensitive number" {
277 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
278
279271 var a = try Managed.init(testing.allocator);
280272 defer a.deinit();
281273
......@@ -326,8 +318,6 @@ test "big.int twos complement limit set" {
326318}
327319
328320test "big.int string to" {
329 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
330
331321 var a = try Managed.initSet(testing.allocator, 120317241209124781241290847124);
332322 defer a.deinit();
333323
......@@ -368,8 +358,6 @@ test "big.int string to base 16" {
368358}
369359
370360test "big.int neg string to" {
371 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
372
373361 var a = try Managed.initSet(testing.allocator, -123907434);
374362 defer a.deinit();
375363
......@@ -392,8 +380,6 @@ test "big.int zero string to" {
392380}
393381
394382test "big.int clone" {
395 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
396
397383 var a = try Managed.initSet(testing.allocator, 1234);
398384 defer a.deinit();
399385 var b = try a.clone();
......@@ -531,8 +517,6 @@ test "big.int add multi-single" {
531517}
532518
533519test "big.int add multi-multi" {
534 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
535
536520 var op1: u128 = 0xefefefef7f7f7f7f;
537521 var op2: u128 = 0xfefefefe9f9f9f9f;
538522 var a = try Managed.initSet(testing.allocator, op1);
......@@ -634,8 +618,6 @@ test "big.int addWrap single-single, unsigned" {
634618}
635619
636620test "big.int subWrap single-single, unsigned" {
637 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
638
639621 var a = try Managed.initSet(testing.allocator, 0);
640622 defer a.deinit();
641623
......@@ -649,8 +631,6 @@ test "big.int subWrap single-single, unsigned" {
649631}
650632
651633test "big.int addWrap multi-multi, unsigned, limb aligned" {
652 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
653
654634 var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb));
655635 defer a.deinit();
656636
......@@ -703,8 +683,6 @@ test "big.int subWrap single-single, signed" {
703683}
704684
705685test "big.int addWrap multi-multi, signed, limb aligned" {
706 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
707
708686 var a = try Managed.initSet(testing.allocator, maxInt(SignedDoubleLimb));
709687 defer a.deinit();
710688
......@@ -755,8 +733,6 @@ test "big.int subSat single-single, unsigned" {
755733}
756734
757735test "big.int addSat multi-multi, unsigned, limb aligned" {
758 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
759
760736 var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb));
761737 defer a.deinit();
762738
......@@ -842,8 +818,6 @@ test "big.int sub single-single" {
842818}
843819
844820test "big.int sub multi-single" {
845 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
846
847821 var a = try Managed.initSet(testing.allocator, maxInt(Limb) + 1);
848822 defer a.deinit();
849823 var b = try Managed.initSet(testing.allocator, 1);
......@@ -857,8 +831,6 @@ test "big.int sub multi-single" {
857831}
858832
859833test "big.int sub multi-multi" {
860 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
861
862834 var op1: u128 = 0xefefefefefefefefefefefef;
863835 var op2: u128 = 0xabababababababababababab;
864836
......@@ -943,10 +915,7 @@ test "big.int mul multi-single" {
943915}
944916
945917test "big.int mul multi-multi" {
946 switch (builtin.zig_backend) {
947 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
948 else => {},
949 }
918 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
950919
951920 var op1: u256 = 0x998888efefefefefefefef;
952921 var op2: u256 = 0x333000abababababababab;
......@@ -963,8 +932,6 @@ test "big.int mul multi-multi" {
963932}
964933
965934test "big.int mul alias r with a" {
966 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
967
968935 var a = try Managed.initSet(testing.allocator, maxInt(Limb));
969936 defer a.deinit();
970937 var b = try Managed.initSet(testing.allocator, 2);
......@@ -976,8 +943,6 @@ test "big.int mul alias r with a" {
976943}
977944
978945test "big.int mul alias r with b" {
979 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
980
981946 var a = try Managed.initSet(testing.allocator, maxInt(Limb));
982947 defer a.deinit();
983948 var b = try Managed.initSet(testing.allocator, 2);
......@@ -989,8 +954,6 @@ test "big.int mul alias r with b" {
989954}
990955
991956test "big.int mul alias r with a and b" {
992 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
993
994957 var a = try Managed.initSet(testing.allocator, maxInt(Limb));
995958 defer a.deinit();
996959
......@@ -1026,8 +989,6 @@ test "big.int mul 0*0" {
1026989}
1027990
1028991test "big.int mul large" {
1029 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1030
1031992 var a = try Managed.initCapacity(testing.allocator, 50);
1032993 defer a.deinit();
1033994 var b = try Managed.initCapacity(testing.allocator, 100);
......@@ -1075,10 +1036,7 @@ test "big.int mulWrap single-single signed" {
10751036}
10761037
10771038test "big.int mulWrap multi-multi unsigned" {
1078 switch (builtin.zig_backend) {
1079 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1080 else => {},
1081 }
1039 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
10821040
10831041 var op1: u256 = 0x998888efefefefefefefef;
10841042 var op2: u256 = 0x333000abababababababab;
......@@ -1095,10 +1053,7 @@ test "big.int mulWrap multi-multi unsigned" {
10951053}
10961054
10971055test "big.int mulWrap multi-multi signed" {
1098 switch (builtin.zig_backend) {
1099 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1100 else => {},
1101 }
1056 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
11021057
11031058 var a = try Managed.initSet(testing.allocator, maxInt(SignedDoubleLimb) - 1);
11041059 defer a.deinit();
......@@ -1113,8 +1068,6 @@ test "big.int mulWrap multi-multi signed" {
11131068}
11141069
11151070test "big.int mulWrap large" {
1116 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1117
11181071 var a = try Managed.initCapacity(testing.allocator, 50);
11191072 defer a.deinit();
11201073 var b = try Managed.initCapacity(testing.allocator, 100);
......@@ -1171,8 +1124,6 @@ test "big.int div single-half with rem" {
11711124}
11721125
11731126test "big.int div single-single no rem" {
1174 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1175
11761127 // assumes usize is <= 64 bits.
11771128 var a = try Managed.initSet(testing.allocator, 1 << 52);
11781129 defer a.deinit();
......@@ -1190,8 +1141,6 @@ test "big.int div single-single no rem" {
11901141}
11911142
11921143test "big.int div single-single with rem" {
1193 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1194
11951144 var a = try Managed.initSet(testing.allocator, (1 << 52) | (1 << 33));
11961145 defer a.deinit();
11971146 var b = try Managed.initSet(testing.allocator, (1 << 35));
......@@ -1208,8 +1157,6 @@ test "big.int div single-single with rem" {
12081157}
12091158
12101159test "big.int div multi-single no rem" {
1211 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1212
12131160 var op1: u128 = 0xffffeeeeddddcccc;
12141161 var op2: u128 = 34;
12151162
......@@ -1229,8 +1176,6 @@ test "big.int div multi-single no rem" {
12291176}
12301177
12311178test "big.int div multi-single with rem" {
1232 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1233
12341179 var op1: u128 = 0xffffeeeeddddcccf;
12351180 var op2: u128 = 34;
12361181
......@@ -1250,8 +1195,6 @@ test "big.int div multi-single with rem" {
12501195}
12511196
12521197test "big.int div multi>2-single" {
1253 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1254
12551198 var op1: u128 = 0xfefefefefefefefefefefefefefefefe;
12561199 var op2: u128 = 0xefab8;
12571200
......@@ -1271,8 +1214,6 @@ test "big.int div multi>2-single" {
12711214}
12721215
12731216test "big.int div single-single q < r" {
1274 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1275
12761217 var a = try Managed.initSet(testing.allocator, 0x0078f432);
12771218 defer a.deinit();
12781219 var b = try Managed.initSet(testing.allocator, 0x01000000);
......@@ -1317,10 +1258,7 @@ test "big.int div q=0 alias" {
13171258}
13181259
13191260test "big.int div multi-multi q < r" {
1320 switch (builtin.zig_backend) {
1321 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1322 else => {},
1323 }
1261 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
13241262
13251263 const op1 = 0x1ffffffff0078f432;
13261264 const op2 = 0x1ffffffff01000000;
......@@ -1436,8 +1374,6 @@ test "big.int div trunc single-single -/-" {
14361374}
14371375
14381376test "big.int divTrunc #15535" {
1439 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1440
14411377 var one = try Managed.initSet(testing.allocator, 1);
14421378 defer one.deinit();
14431379 var x = try Managed.initSet(testing.allocator, std.math.pow(u128, 2, 64));
......@@ -1451,8 +1387,6 @@ test "big.int divTrunc #15535" {
14511387}
14521388
14531389test "big.int divFloor #10932" {
1454 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1455
14561390 var a = try Managed.init(testing.allocator);
14571391 defer a.deinit();
14581392
......@@ -1477,8 +1411,6 @@ test "big.int divFloor #10932" {
14771411}
14781412
14791413test "big.int divFloor #11166" {
1480 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1481
14821414 var a = try Managed.init(testing.allocator);
14831415 defer a.deinit();
14841416
......@@ -1506,8 +1438,6 @@ test "big.int divFloor #11166" {
15061438}
15071439
15081440test "big.int gcd #10932" {
1509 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1510
15111441 var a = try Managed.init(testing.allocator);
15121442 defer a.deinit();
15131443
......@@ -1642,8 +1572,6 @@ test "big.int div floor single-single -/-" {
16421572}
16431573
16441574test "big.int div floor no remainder negative quotient" {
1645 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1646
16471575 const u: i32 = -0x80000000;
16481576 const v: i32 = 1;
16491577
......@@ -1701,10 +1629,7 @@ test "big.int div floor positive close to zero" {
17011629}
17021630
17031631test "big.int div multi-multi with rem" {
1704 switch (builtin.zig_backend) {
1705 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1706 else => {},
1707 }
1632 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
17081633
17091634 var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeeddddccccbbbbaaaa9999);
17101635 defer a.deinit();
......@@ -1722,10 +1647,7 @@ test "big.int div multi-multi with rem" {
17221647}
17231648
17241649test "big.int div multi-multi no rem" {
1725 switch (builtin.zig_backend) {
1726 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1727 else => {},
1728 }
1650 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
17291651
17301652 var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeedb4fec200ee3a4286361);
17311653 defer a.deinit();
......@@ -1743,10 +1665,7 @@ test "big.int div multi-multi no rem" {
17431665}
17441666
17451667test "big.int div multi-multi (2 branch)" {
1746 switch (builtin.zig_backend) {
1747 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1748 else => {},
1749 }
1668 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
17501669
17511670 var a = try Managed.initSet(testing.allocator, 0x866666665555555588888887777777761111111111111111);
17521671 defer a.deinit();
......@@ -1764,10 +1683,7 @@ test "big.int div multi-multi (2 branch)" {
17641683}
17651684
17661685test "big.int div multi-multi (3.1/3.3 branch)" {
1767 switch (builtin.zig_backend) {
1768 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1769 else => {},
1770 }
1686 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
17711687
17721688 var a = try Managed.initSet(testing.allocator, 0x11111111111111111111111111111111111111111111111111111111111111);
17731689 defer a.deinit();
......@@ -1785,10 +1701,7 @@ test "big.int div multi-multi (3.1/3.3 branch)" {
17851701}
17861702
17871703test "big.int div multi-single zero-limb trailing" {
1788 switch (builtin.zig_backend) {
1789 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1790 else => {},
1791 }
1704 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
17921705
17931706 var a = try Managed.initSet(testing.allocator, 0x60000000000000000000000000000000000000000000000000000000000000000);
17941707 defer a.deinit();
......@@ -1808,10 +1721,7 @@ test "big.int div multi-single zero-limb trailing" {
18081721}
18091722
18101723test "big.int div multi-multi zero-limb trailing (with rem)" {
1811 switch (builtin.zig_backend) {
1812 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1813 else => {},
1814 }
1724 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
18151725
18161726 var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000);
18171727 defer a.deinit();
......@@ -1832,10 +1742,7 @@ test "big.int div multi-multi zero-limb trailing (with rem)" {
18321742}
18331743
18341744test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count > divisor zero-limb count" {
1835 switch (builtin.zig_backend) {
1836 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1837 else => {},
1838 }
1745 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
18391746
18401747 var a = try Managed.initSet(testing.allocator, 0x8666666655555555888888877777777611111111111111110000000000000000);
18411748 defer a.deinit();
......@@ -1856,10 +1763,7 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li
18561763}
18571764
18581765test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count < divisor zero-limb count" {
1859 switch (builtin.zig_backend) {
1860 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1861 else => {},
1862 }
1766 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
18631767
18641768 var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000);
18651769 defer a.deinit();
......@@ -1882,8 +1786,6 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li
18821786}
18831787
18841788test "big.int div multi-multi fuzz case #1" {
1885 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1886
18871789 var a = try Managed.init(testing.allocator);
18881790 defer a.deinit();
18891791 var b = try Managed.init(testing.allocator);
......@@ -1908,8 +1810,6 @@ test "big.int div multi-multi fuzz case #1" {
19081810}
19091811
19101812test "big.int div multi-multi fuzz case #2" {
1911 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1912
19131813 var a = try Managed.init(testing.allocator);
19141814 defer a.deinit();
19151815 var b = try Managed.init(testing.allocator);
......@@ -1982,8 +1882,6 @@ test "big.int truncate multi to multi unsigned" {
19821882}
19831883
19841884test "big.int truncate multi to multi signed" {
1985 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1986
19871885 var a = try Managed.initSet(testing.allocator, 3 << @bitSizeOf(Limb));
19881886 defer a.deinit();
19891887
......@@ -1993,8 +1891,6 @@ test "big.int truncate multi to multi signed" {
19931891}
19941892
19951893test "big.int truncate negative multi to single" {
1996 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1997
19981894 var a = try Managed.initSet(testing.allocator, -@as(SignedDoubleLimb, maxInt(Limb) + 1));
19991895 defer a.deinit();
20001896
......@@ -2101,8 +1997,6 @@ test "big.int shift-right multi" {
21011997}
21021998
21031999test "big.int shift-left single" {
2104 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2105
21062000 var a = try Managed.initSet(testing.allocator, 0xffff);
21072001 defer a.deinit();
21082002 try a.shiftLeft(&a, 16);
......@@ -2147,8 +2041,6 @@ test "big.int sat shift-left simple unsigned" {
21472041}
21482042
21492043test "big.int sat shift-left simple unsigned no sat" {
2150 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2151
21522044 var a = try Managed.initSet(testing.allocator, 1);
21532045 defer a.deinit();
21542046 try a.shiftLeftSat(&a, 16, .unsigned, 21);
......@@ -2205,8 +2097,6 @@ test "big.int sat shift-left signed simple positive" {
22052097}
22062098
22072099test "big.int sat shift-left signed multi positive" {
2208 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2209
22102100 var x: SignedDoubleLimb = 1;
22112101 const shift = @bitSizeOf(SignedDoubleLimb) - 1;
22122102
......@@ -2218,8 +2108,6 @@ test "big.int sat shift-left signed multi positive" {
22182108}
22192109
22202110test "big.int sat shift-left signed multi negative" {
2221 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2222
22232111 var x: SignedDoubleLimb = -1;
22242112 const shift = @bitSizeOf(SignedDoubleLimb) - 1;
22252113
......@@ -2406,8 +2294,6 @@ test "big.int bitwise xor simple" {
24062294}
24072295
24082296test "big.int bitwise xor multi-limb" {
2409 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2410
24112297 var x: DoubleLimb = maxInt(Limb) + 1;
24122298 var y: DoubleLimb = maxInt(Limb);
24132299 var a = try Managed.initSet(testing.allocator, x);
......@@ -2582,8 +2468,6 @@ test "big.int var args" {
25822468}
25832469
25842470test "big.int gcd non-one small" {
2585 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2586
25872471 var a = try Managed.initSet(testing.allocator, 17);
25882472 defer a.deinit();
25892473 var b = try Managed.initSet(testing.allocator, 97);
......@@ -2597,8 +2481,6 @@ test "big.int gcd non-one small" {
25972481}
25982482
25992483test "big.int gcd non-one medium" {
2600 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2601
26022484 var a = try Managed.initSet(testing.allocator, 4864);
26032485 defer a.deinit();
26042486 var b = try Managed.initSet(testing.allocator, 3458);
......@@ -2612,8 +2494,6 @@ test "big.int gcd non-one medium" {
26122494}
26132495
26142496test "big.int gcd non-one large" {
2615 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2616
26172497 var a = try Managed.initSet(testing.allocator, 0xffffffffffffffff);
26182498 defer a.deinit();
26192499 var b = try Managed.initSet(testing.allocator, 0xffffffffffffffff7777);
......@@ -2627,10 +2507,7 @@ test "big.int gcd non-one large" {
26272507}
26282508
26292509test "big.int gcd large multi-limb result" {
2630 switch (builtin.zig_backend) {
2631 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
2632 else => {},
2633 }
2510 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
26342511
26352512 var a = try Managed.initSet(testing.allocator, 0x12345678123456781234567812345678123456781234567812345678);
26362513 defer a.deinit();
......@@ -2646,8 +2523,6 @@ test "big.int gcd large multi-limb result" {
26462523}
26472524
26482525test "big.int gcd one large" {
2649 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2650
26512526 var a = try Managed.initSet(testing.allocator, 1897056385327307);
26522527 defer a.deinit();
26532528 var b = try Managed.initSet(testing.allocator, 2251799813685248);
......@@ -2672,8 +2547,6 @@ test "big.int mutable to managed" {
26722547}
26732548
26742549test "big.int const to managed" {
2675 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2676
26772550 var a = try Managed.initSet(testing.allocator, 123423453456);
26782551 defer a.deinit();
26792552
......@@ -2684,8 +2557,6 @@ test "big.int const to managed" {
26842557}
26852558
26862559test "big.int pow" {
2687 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2688
26892560 {
26902561 var a = try Managed.initSet(testing.allocator, -3);
26912562 defer a.deinit();
......@@ -2741,8 +2612,6 @@ test "big.int pow" {
27412612}
27422613
27432614test "big.int sqrt" {
2744 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2745
27462615 var r = try Managed.init(testing.allocator);
27472616 defer r.deinit();
27482617 var a = try Managed.init(testing.allocator);
......@@ -2773,8 +2642,6 @@ test "big.int sqrt" {
27732642}
27742643
27752644test "big.int regression test for 1 limb overflow with alias" {
2776 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2777
27782645 // Note these happen to be two consecutive Fibonacci sequence numbers, the
27792646 // first two whose sum exceeds 2**64.
27802647 var a = try Managed.initSet(testing.allocator, 7540113804746346429);
......@@ -2789,8 +2656,6 @@ test "big.int regression test for 1 limb overflow with alias" {
27892656}
27902657
27912658test "big.int regression test for realloc with alias" {
2792 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2793
27942659 // Note these happen to be two consecutive Fibonacci sequence numbers, the
27952660 // second of which is the first such number to exceed 2**192.
27962661 var a = try Managed.initSet(testing.allocator, 5611500259351924431073312796924978741056961814867751431689);
......@@ -2805,8 +2670,6 @@ test "big.int regression test for realloc with alias" {
28052670}
28062671
28072672test "big int popcount" {
2808 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2809
28102673 var a = try Managed.init(testing.allocator);
28112674 defer a.deinit();
28122675
......@@ -2887,8 +2750,6 @@ fn popCountTest(val: *const Managed, bit_count: usize, expected: usize) !void {
28872750}
28882751
28892752test "big int conversion read/write twos complement" {
2890 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2891
28922753 var a = try Managed.initSet(testing.allocator, (1 << 493) - 1);
28932754 defer a.deinit();
28942755 var b = try Managed.initSet(testing.allocator, (1 << 493) - 1);
......@@ -2987,8 +2848,6 @@ test "big int write twos complement +/- zero" {
29872848}
29882849
29892850test "big int conversion write twos complement with padding" {
2990 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2991
29922851 var a = try Managed.initSet(testing.allocator, 0x01_ffffffff_ffffffff_ffffffff);
29932852 defer a.deinit();
29942853
......@@ -3172,8 +3031,6 @@ fn byteSwapTest(comptime T: type, comptime input: comptime_int, comptime expecte
31723031}
31733032
31743033test "big int byte swap" {
3175 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
3176
31773034 var a = try Managed.initSet(testing.allocator, 0x01_ffffffff_ffffffff_ffffffff);
31783035 defer a.deinit();
31793036
......@@ -3218,8 +3075,6 @@ test "big int byte swap" {
32183075}
32193076
32203077test "big.int mul multi-multi alias r with a and b" {
3221 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
3222
32233078 var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb));
32243079 defer a.deinit();
32253080
......@@ -3236,8 +3091,6 @@ test "big.int mul multi-multi alias r with a and b" {
32363091}
32373092
32383093test "big.int sqr multi alias r with a" {
3239 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
3240
32413094 var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb));
32423095 defer a.deinit();
32433096
lib/std/math/big/rational.zig-35
......@@ -1,5 +1,4 @@
11const std = @import("../../std.zig");
2const builtin = @import("builtin");
32const debug = std.debug;
43const math = std.math;
54const mem = std.mem;
......@@ -494,8 +493,6 @@ fn extractLowBits(a: Int, comptime T: type) T {
494493}
495494
496495test "big.rational extractLowBits" {
497 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
498
499496 var a = try Int.initSet(testing.allocator, 0x11112222333344441234567887654321);
500497 defer a.deinit();
501498
......@@ -516,8 +513,6 @@ test "big.rational extractLowBits" {
516513}
517514
518515test "big.rational set" {
519 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
520
521516 var a = try Rational.init(testing.allocator);
522517 defer a.deinit();
523518
......@@ -547,8 +542,6 @@ test "big.rational set" {
547542}
548543
549544test "big.rational setFloat" {
550 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
551
552545 var a = try Rational.init(testing.allocator);
553546 defer a.deinit();
554547
......@@ -574,8 +567,6 @@ test "big.rational setFloat" {
574567}
575568
576569test "big.rational setFloatString" {
577 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
578
579570 var a = try Rational.init(testing.allocator);
580571 defer a.deinit();
581572
......@@ -587,8 +578,6 @@ test "big.rational setFloatString" {
587578}
588579
589580test "big.rational toFloat" {
590 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
591
592581 var a = try Rational.init(testing.allocator);
593582 defer a.deinit();
594583
......@@ -602,8 +591,6 @@ test "big.rational toFloat" {
602591}
603592
604593test "big.rational set/to Float round-trip" {
605 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
606
607594 var a = try Rational.init(testing.allocator);
608595 defer a.deinit();
609596 var prng = std.rand.DefaultPrng.init(0x5EED);
......@@ -617,8 +604,6 @@ test "big.rational set/to Float round-trip" {
617604}
618605
619606test "big.rational copy" {
620 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
621
622607 var a = try Rational.init(testing.allocator);
623608 defer a.deinit();
624609
......@@ -649,8 +634,6 @@ test "big.rational copy" {
649634}
650635
651636test "big.rational negate" {
652 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
653
654637 var a = try Rational.init(testing.allocator);
655638 defer a.deinit();
656639
......@@ -668,8 +651,6 @@ test "big.rational negate" {
668651}
669652
670653test "big.rational abs" {
671 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
672
673654 var a = try Rational.init(testing.allocator);
674655 defer a.deinit();
675656
......@@ -687,8 +668,6 @@ test "big.rational abs" {
687668}
688669
689670test "big.rational swap" {
690 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
691
692671 var a = try Rational.init(testing.allocator);
693672 defer a.deinit();
694673 var b = try Rational.init(testing.allocator);
......@@ -713,8 +692,6 @@ test "big.rational swap" {
713692}
714693
715694test "big.rational order" {
716 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
717
718695 var a = try Rational.init(testing.allocator);
719696 defer a.deinit();
720697 var b = try Rational.init(testing.allocator);
......@@ -730,8 +707,6 @@ test "big.rational order" {
730707}
731708
732709test "big.rational order/orderAbs with negative" {
733 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
734
735710 var a = try Rational.init(testing.allocator);
736711 defer a.deinit();
737712 var b = try Rational.init(testing.allocator);
......@@ -744,8 +719,6 @@ test "big.rational order/orderAbs with negative" {
744719}
745720
746721test "big.rational add single-limb" {
747 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
748
749722 var a = try Rational.init(testing.allocator);
750723 defer a.deinit();
751724 var b = try Rational.init(testing.allocator);
......@@ -761,8 +734,6 @@ test "big.rational add single-limb" {
761734}
762735
763736test "big.rational add" {
764 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
765
766737 var a = try Rational.init(testing.allocator);
767738 defer a.deinit();
768739 var b = try Rational.init(testing.allocator);
......@@ -779,8 +750,6 @@ test "big.rational add" {
779750}
780751
781752test "big.rational sub" {
782 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
783
784753 var a = try Rational.init(testing.allocator);
785754 defer a.deinit();
786755 var b = try Rational.init(testing.allocator);
......@@ -797,8 +766,6 @@ test "big.rational sub" {
797766}
798767
799768test "big.rational mul" {
800 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
801
802769 var a = try Rational.init(testing.allocator);
803770 defer a.deinit();
804771 var b = try Rational.init(testing.allocator);
......@@ -815,8 +782,6 @@ test "big.rational mul" {
815782}
816783
817784test "big.rational div" {
818 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
819
820785 {
821786 var a = try Rational.init(testing.allocator);
822787 defer a.deinit();
lib/std/math/ilogb.zig-9
......@@ -6,7 +6,6 @@
66// https://git.musl-libc.org/cgit/musl/tree/src/math/ilogb.c
77
88const std = @import("../std.zig");
9const builtin = @import("builtin");
109const math = std.math;
1110const expect = std.testing.expect;
1211const maxInt = std.math.maxInt;
......@@ -109,8 +108,6 @@ test "64" {
109108}
110109
111110test "80" {
112 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
113
114111 try expect(ilogbX(f80, 0.0) == fp_ilogb0);
115112 try expect(ilogbX(f80, 0.5) == -1);
116113 try expect(ilogbX(f80, 0.8923) == -1);
......@@ -125,8 +122,6 @@ test "80" {
125122}
126123
127124test "128" {
128 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
129
130125 try expect(ilogbX(f128, 0.0) == fp_ilogb0);
131126 try expect(ilogbX(f128, 0.5) == -1);
132127 try expect(ilogbX(f128, 0.8923) == -1);
......@@ -162,8 +157,6 @@ test "64 special" {
162157}
163158
164159test "80 special" {
165 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
166
167160 try expect(ilogbX(f80, math.inf(f80)) == maxInt(i32));
168161 try expect(ilogbX(f80, -math.inf(f80)) == maxInt(i32));
169162 try expect(ilogbX(f80, 0.0) == minInt(i32));
......@@ -171,8 +164,6 @@ test "80 special" {
171164}
172165
173166test "128 special" {
174 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
175
176167 try expect(ilogbX(f128, math.inf(f128)) == maxInt(i32));
177168 try expect(ilogbX(f128, -math.inf(f128)) == maxInt(i32));
178169 try expect(ilogbX(f128, 0.0) == minInt(i32));
lib/std/math/ldexp.zig-1
......@@ -67,7 +67,6 @@ pub fn ldexp(x: anytype, n: i32) @TypeOf(x) {
6767}
6868
6969test "math.ldexp" {
70 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
7170
7271 // subnormals
7372 try expect(ldexp(@as(f16, 0x1.1FFp14), -14 - 9 - 15) == math.floatTrueMin(f16));
lib/std/math/log10.zig+1-1
......@@ -170,11 +170,11 @@ test "log10_int vs old implementation" {
170170test "log10_int close to powers of 10" {
171171 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
172172 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
173 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
173174 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
174175 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
175176 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
176177 if (builtin.zig_backend == .stage2_llvm and comptime builtin.target.isWasm()) return error.SkipZigTest; // TODO
177 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
178178
179179 const int_types = .{ u8, u16, u32, u64, u128, u256, u512 };
180180 const max_log_values: [7]usize = .{ 2, 4, 9, 19, 38, 77, 154 };
lib/std/math/log_int.zig-2
......@@ -56,8 +56,6 @@ pub fn log_int(comptime T: type, base: T, x: T) Log2Int(T) {
5656}
5757
5858test "math.log_int" {
59 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
60
6159 // Test all unsigned integers with 2, 3, ..., 64 bits.
6260 // We cannot test 0 or 1 bits since base must be > 1.
6361 inline for (2..64 + 1) |bits| {
lib/std/math/nextafter.zig-2
......@@ -103,8 +103,6 @@ fn nextAfterFloat(comptime T: type, x: T, y: T) T {
103103}
104104
105105test "math.nextAfter.int" {
106 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
107
108106 try expect(nextAfter(i0, 0, 0) == 0);
109107 try expect(nextAfter(u0, 0, 0) == 0);
110108 try expect(nextAfter(i1, 0, 0) == 0);
lib/std/math/scalbn.zig-2
......@@ -7,8 +7,6 @@ const expect = std.testing.expect;
77pub const scalbn = @import("ldexp.zig").ldexp;
88
99test "math.scalbn" {
10 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
11
1210 // Verify we are using base 2.
1311 try expect(scalbn(@as(f16, 1.5), 4) == 24.0);
1412 try expect(scalbn(@as(f32, 1.5), 4) == 24.0);
lib/std/mem.zig+4-20
......@@ -315,8 +315,6 @@ pub fn zeroes(comptime T: type) T {
315315}
316316
317317test "zeroes" {
318 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
319
320318 const C_struct = extern struct {
321319 x: u32,
322320 y: u32 align(128),
......@@ -1025,8 +1023,6 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co
10251023}
10261024
10271025test "indexOfSentinel vector paths" {
1028 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1029
10301026 const Types = [_]type{ u8, u16, u32, u64 };
10311027 const allocator = std.testing.allocator;
10321028
......@@ -1741,8 +1737,6 @@ pub fn readIntSlice(comptime T: type, bytes: []const u8, endian: Endian) T {
17411737}
17421738
17431739test "comptime read/write int" {
1744 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1745
17461740 comptime {
17471741 var bytes: [2]u8 = undefined;
17481742 writeIntLittle(u16, &bytes, 0x1234);
......@@ -1758,10 +1752,7 @@ test "comptime read/write int" {
17581752}
17591753
17601754test "readIntBig and readIntLittle" {
1761 switch (builtin.zig_backend) {
1762 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
1763 else => {},
1764 }
1755 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
17651756
17661757 try testing.expect(readIntSliceBig(u0, &[_]u8{}) == 0x0);
17671758 try testing.expect(readIntSliceLittle(u0, &[_]u8{}) == 0x0);
......@@ -2062,10 +2053,7 @@ pub fn writeVarPackedInt(bytes: []u8, bit_offset: usize, bit_count: usize, value
20622053}
20632054
20642055test "writeIntBig and writeIntLittle" {
2065 switch (builtin.zig_backend) {
2066 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
2067 else => {},
2068 }
2056 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
20692057
20702058 var buf0: [0]u8 = undefined;
20712059 var buf1: [1]u8 = undefined;
......@@ -3309,8 +3297,6 @@ test "testStringEquality" {
33093297}
33103298
33113299test "testReadInt" {
3312 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3313
33143300 try testReadIntImpl();
33153301 try comptime testReadIntImpl();
33163302}
......@@ -4664,10 +4650,8 @@ pub fn alignInSlice(slice: anytype, comptime new_alignment: usize) ?AlignedSlice
46644650}
46654651
46664652test "read/write(Var)PackedInt" {
4667 switch (builtin.zig_backend) {
4668 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
4669 else => {},
4670 }
4653 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
4654
46714655 switch (builtin.cpu.arch) {
46724656 // This test generates too much code to execute on WASI.
46734657 // LLVM backend fails with "too many locals: locals exceed maximum"
lib/std/multi_array_list.zig-16
......@@ -583,8 +583,6 @@ pub fn MultiArrayList(comptime T: type) type {
583583}
584584
585585test "basic usage" {
586 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
587
588586 const ally = testing.allocator;
589587
590588 const Foo = struct {
......@@ -679,8 +677,6 @@ test "basic usage" {
679677// This was observed to fail on aarch64 with LLVM 11, when the capacityInBytes
680678// function used the @reduce code path.
681679test "regression test for @reduce bug" {
682 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
683
684680 const ally = testing.allocator;
685681 var list = MultiArrayList(struct {
686682 tag: std.zig.Token.Tag,
......@@ -758,8 +754,6 @@ test "regression test for @reduce bug" {
758754}
759755
760756test "ensure capacity on empty list" {
761 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
762
763757 const ally = testing.allocator;
764758
765759 const Foo = struct {
......@@ -795,8 +789,6 @@ test "ensure capacity on empty list" {
795789}
796790
797791test "insert elements" {
798 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
799
800792 const ally = testing.allocator;
801793
802794 const Foo = struct {
......@@ -816,8 +808,6 @@ test "insert elements" {
816808}
817809
818810test "union" {
819 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
820
821811 const ally = testing.allocator;
822812
823813 const Foo = union(enum) {
......@@ -873,8 +863,6 @@ test "union" {
873863}
874864
875865test "sorting a span" {
876 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
877
878866 var list: MultiArrayList(struct { score: u32, chr: u8 }) = .{};
879867 defer list.deinit(testing.allocator);
880868
......@@ -915,8 +903,6 @@ test "sorting a span" {
915903}
916904
917905test "0 sized struct field" {
918 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
919
920906 const ally = testing.allocator;
921907
922908 const Foo = struct {
......@@ -944,8 +930,6 @@ test "0 sized struct field" {
944930}
945931
946932test "0 sized struct" {
947 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
948
949933 const ally = testing.allocator;
950934
951935 const Foo = struct {
lib/std/net/test.zig-6
......@@ -5,7 +5,6 @@ const mem = std.mem;
55const testing = std.testing;
66
77test "parse and render IPv6 addresses" {
8 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
98 if (builtin.os.tag == .wasi) return error.SkipZigTest;
109
1110 var buffer: [100]u8 = undefined;
......@@ -71,7 +70,6 @@ test "invalid but parseable IPv6 scope ids" {
7170}
7271
7372test "parse and render IPv4 addresses" {
74 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
7573 if (builtin.os.tag == .wasi) return error.SkipZigTest;
7674
7775 var buffer: [18]u8 = undefined;
......@@ -111,8 +109,6 @@ test "parse and render UNIX addresses" {
111109test "resolve DNS" {
112110 if (builtin.os.tag == .wasi) return error.SkipZigTest;
113111
114 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
115
116112 if (builtin.os.tag == .windows) {
117113 _ = try std.os.windows.WSAStartup(2, 2);
118114 }
......@@ -295,8 +291,6 @@ test "listen on a unix socket, send bytes, receive bytes" {
295291 if (builtin.single_threaded) return error.SkipZigTest;
296292 if (!net.has_unix_sockets) return error.SkipZigTest;
297293
298 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
299
300294 if (builtin.os.tag == .windows) {
301295 _ = try std.os.windows.WSAStartup(2, 2);
302296 }
lib/std/once.zig-2
......@@ -46,8 +46,6 @@ fn incr() void {
4646}
4747
4848test "Once executes its function just once" {
49 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
50
5149 if (builtin.single_threaded) {
5250 global_once.call();
5351 global_once.call();
lib/std/os/linux/io_uring.zig-30
......@@ -1741,8 +1741,6 @@ test "readv" {
17411741test "writev/fsync/readv" {
17421742 if (builtin.os.tag != .linux) return error.SkipZigTest;
17431743
1744 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1745
17461744 var ring = IO_Uring.init(4, 0) catch |err| switch (err) {
17471745 error.SystemOutdated => return error.SkipZigTest,
17481746 error.PermissionDenied => return error.SkipZigTest,
......@@ -1813,8 +1811,6 @@ test "writev/fsync/readv" {
18131811test "write/read" {
18141812 if (builtin.os.tag != .linux) return error.SkipZigTest;
18151813
1816 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1817
18181814 var ring = IO_Uring.init(2, 0) catch |err| switch (err) {
18191815 error.SystemOutdated => return error.SkipZigTest,
18201816 error.PermissionDenied => return error.SkipZigTest,
......@@ -1862,8 +1858,6 @@ test "write/read" {
18621858test "splice/read" {
18631859 if (builtin.os.tag != .linux) return error.SkipZigTest;
18641860
1865 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1866
18671861 var ring = IO_Uring.init(4, 0) catch |err| switch (err) {
18681862 error.SystemOutdated => return error.SkipZigTest,
18691863 error.PermissionDenied => return error.SkipZigTest,
......@@ -1935,8 +1929,6 @@ test "splice/read" {
19351929test "write_fixed/read_fixed" {
19361930 if (builtin.os.tag != .linux) return error.SkipZigTest;
19371931
1938 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1939
19401932 var ring = IO_Uring.init(2, 0) catch |err| switch (err) {
19411933 error.SystemOutdated => return error.SkipZigTest,
19421934 error.PermissionDenied => return error.SkipZigTest,
......@@ -2002,8 +1994,6 @@ test "write_fixed/read_fixed" {
20021994test "openat" {
20031995 if (builtin.os.tag != .linux) return error.SkipZigTest;
20041996
2005 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2006
20071997 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
20081998 error.SystemOutdated => return error.SkipZigTest,
20091999 error.PermissionDenied => return error.SkipZigTest,
......@@ -2055,8 +2045,6 @@ test "openat" {
20552045test "close" {
20562046 if (builtin.os.tag != .linux) return error.SkipZigTest;
20572047
2058 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2059
20602048 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
20612049 error.SystemOutdated => return error.SkipZigTest,
20622050 error.PermissionDenied => return error.SkipZigTest,
......@@ -2216,8 +2204,6 @@ test "sendmsg/recvmsg" {
22162204test "timeout (after a relative time)" {
22172205 if (builtin.os.tag != .linux) return error.SkipZigTest;
22182206
2219 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2220
22212207 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
22222208 error.SystemOutdated => return error.SkipZigTest,
22232209 error.PermissionDenied => return error.SkipZigTest,
......@@ -2282,8 +2268,6 @@ test "timeout (after a number of completions)" {
22822268test "timeout_remove" {
22832269 if (builtin.os.tag != .linux) return error.SkipZigTest;
22842270
2285 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2286
22872271 var ring = IO_Uring.init(2, 0) catch |err| switch (err) {
22882272 error.SystemOutdated => return error.SkipZigTest,
22892273 error.PermissionDenied => return error.SkipZigTest,
......@@ -2392,8 +2376,6 @@ test "accept/connect/recv/link_timeout" {
23922376test "fallocate" {
23932377 if (builtin.os.tag != .linux) return error.SkipZigTest;
23942378
2395 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2396
23972379 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
23982380 error.SystemOutdated => return error.SkipZigTest,
23992381 error.PermissionDenied => return error.SkipZigTest,
......@@ -2440,8 +2422,6 @@ test "fallocate" {
24402422test "statx" {
24412423 if (builtin.os.tag != .linux) return error.SkipZigTest;
24422424
2443 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2444
24452425 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
24462426 error.SystemOutdated => return error.SkipZigTest,
24472427 error.PermissionDenied => return error.SkipZigTest,
......@@ -2698,8 +2678,6 @@ test "shutdown" {
26982678test "renameat" {
26992679 if (builtin.os.tag != .linux) return error.SkipZigTest;
27002680
2701 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2702
27032681 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
27042682 error.SystemOutdated => return error.SkipZigTest,
27052683 error.PermissionDenied => return error.SkipZigTest,
......@@ -2769,8 +2747,6 @@ test "renameat" {
27692747test "unlinkat" {
27702748 if (builtin.os.tag != .linux) return error.SkipZigTest;
27712749
2772 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2773
27742750 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
27752751 error.SystemOutdated => return error.SkipZigTest,
27762752 error.PermissionDenied => return error.SkipZigTest,
......@@ -2823,8 +2799,6 @@ test "unlinkat" {
28232799test "mkdirat" {
28242800 if (builtin.os.tag != .linux) return error.SkipZigTest;
28252801
2826 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2827
28282802 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
28292803 error.SystemOutdated => return error.SkipZigTest,
28302804 error.PermissionDenied => return error.SkipZigTest,
......@@ -2869,8 +2843,6 @@ test "mkdirat" {
28692843test "symlinkat" {
28702844 if (builtin.os.tag != .linux) return error.SkipZigTest;
28712845
2872 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2873
28742846 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
28752847 error.SystemOutdated => return error.SkipZigTest,
28762848 error.PermissionDenied => return error.SkipZigTest,
......@@ -2919,8 +2891,6 @@ test "symlinkat" {
29192891test "linkat" {
29202892 if (builtin.os.tag != .linux) return error.SkipZigTest;
29212893
2922 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2923
29242894 var ring = IO_Uring.init(1, 0) catch |err| switch (err) {
29252895 error.SystemOutdated => return error.SkipZigTest,
29262896 error.PermissionDenied => return error.SkipZigTest,
lib/std/os/linux/test.zig-6
......@@ -8,8 +8,6 @@ const expectEqual = std.testing.expectEqual;
88const fs = std.fs;
99
1010test "fallocate" {
11 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
12
1311 var tmp = std.testing.tmpDir(.{});
1412 defer tmp.cleanup();
1513
......@@ -71,8 +69,6 @@ test "timer" {
7169}
7270
7371test "statx" {
74 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
75
7672 var tmp = std.testing.tmpDir(.{});
7773 defer tmp.cleanup();
7874
......@@ -111,8 +107,6 @@ test "user and group ids" {
111107}
112108
113109test "fadvise" {
114 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
115
116110 var tmp = std.testing.tmpDir(.{});
117111 defer tmp.cleanup();
118112
lib/std/os/test.zig-51
......@@ -88,8 +88,6 @@ test "chdir smoke test" {
8888test "open smoke test" {
8989 if (native_os == .wasi) return error.SkipZigTest;
9090
91 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
92
9391 // TODO verify file attributes using `fstat`
9492
9593 var tmp = tmpDir(.{});
......@@ -144,8 +142,6 @@ test "open smoke test" {
144142test "openat smoke test" {
145143 if (native_os == .wasi and builtin.link_libc) return error.SkipZigTest;
146144
147 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
148
149145 // TODO verify file attributes using `fstatat`
150146
151147 var tmp = tmpDir(.{});
......@@ -280,8 +276,6 @@ test "link with relative paths" {
280276test "linkat with different directories" {
281277 if (native_os == .wasi and builtin.link_libc) return error.SkipZigTest;
282278
283 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
284
285279 switch (native_os) {
286280 .wasi, .linux, .solaris, .illumos => {},
287281 else => return error.SkipZigTest,
......@@ -327,8 +321,6 @@ test "fstatat" {
327321 // enable when `fstat` and `fstatat` are implemented on Windows
328322 if (native_os == .windows) return error.SkipZigTest;
329323
330 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
331
332324 var tmp = tmpDir(.{});
333325 defer tmp.cleanup();
334326
......@@ -348,8 +340,6 @@ test "fstatat" {
348340}
349341
350342test "readlinkat" {
351 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
352
353343 var tmp = tmpDir(.{});
354344 defer tmp.cleanup();
355345
......@@ -385,8 +375,6 @@ fn testThreadIdFn(thread_id: *Thread.Id) void {
385375test "std.Thread.getCurrentId" {
386376 if (builtin.single_threaded) return error.SkipZigTest;
387377
388 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
389
390378 var thread_current_id: Thread.Id = undefined;
391379 const thread = try Thread.spawn(.{}, testThreadIdFn, .{&thread_current_id});
392380 thread.join();
......@@ -429,9 +417,6 @@ test "cpu count" {
429417
430418test "thread local storage" {
431419 if (builtin.single_threaded) return error.SkipZigTest;
432
433 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
434
435420 const thread1 = try Thread.spawn(.{}, testTls, .{});
436421 const thread2 = try Thread.spawn(.{}, testTls, .{});
437422 try testTls();
......@@ -519,8 +504,6 @@ fn iter_fn(info: *dl_phdr_info, size: usize, counter: *usize) IterFnError!void {
519504test "dl_iterate_phdr" {
520505 if (builtin.object_format != .elf) return error.SkipZigTest;
521506
522 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
523
524507 var counter: usize = 0;
525508 try os.dl_iterate_phdr(&counter, IterFnError, iter_fn);
526509 try expect(counter != 0);
......@@ -583,8 +566,6 @@ test "mmap" {
583566 if (native_os == .windows or native_os == .wasi)
584567 return error.SkipZigTest;
585568
586 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
587
588569 var tmp = tmpDir(.{});
589570 defer tmp.cleanup();
590571
......@@ -695,8 +676,6 @@ test "fcntl" {
695676 if (native_os == .windows or native_os == .wasi)
696677 return error.SkipZigTest;
697678
698 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
699
700679 var tmp = tmpDir(.{});
701680 defer tmp.cleanup();
702681
......@@ -737,8 +716,6 @@ test "sync" {
737716 if (native_os != .linux)
738717 return error.SkipZigTest;
739718
740 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
741
742719 var tmp = tmpDir(.{});
743720 defer tmp.cleanup();
744721
......@@ -759,8 +736,6 @@ test "fsync" {
759736 else => return error.SkipZigTest,
760737 }
761738
762 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
763
764739 var tmp = tmpDir(.{});
765740 defer tmp.cleanup();
766741
......@@ -780,8 +755,6 @@ test "getrlimit and setrlimit" {
780755 return error.SkipZigTest;
781756 }
782757
783 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
784
785758 inline for (std.meta.fields(os.rlimit_resource)) |field| {
786759 const resource = @as(os.rlimit_resource, @enumFromInt(field.value));
787760 const limit = try os.getrlimit(resource);
......@@ -824,8 +797,6 @@ test "sigaction" {
824797 if (native_os == .wasi or native_os == .windows)
825798 return error.SkipZigTest;
826799
827 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
828
829800 // https://github.com/ziglang/zig/issues/7427
830801 if (native_os == .linux and builtin.target.cpu.arch == .x86)
831802 return error.SkipZigTest;
......@@ -903,8 +874,6 @@ test "dup & dup2" {
903874 else => return error.SkipZigTest,
904875 }
905876
906 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
907
908877 var tmp = tmpDir(.{});
909878 defer tmp.cleanup();
910879
......@@ -934,8 +903,6 @@ test "dup & dup2" {
934903test "writev longer than IOV_MAX" {
935904 if (native_os == .windows or native_os == .wasi) return error.SkipZigTest;
936905
937 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
938
939906 var tmp = tmpDir(.{});
940907 defer tmp.cleanup();
941908
......@@ -953,8 +920,6 @@ test "POSIX file locking with fcntl" {
953920 return error.SkipZigTest;
954921 }
955922
956 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
957
958923 if (true) {
959924 // https://github.com/ziglang/zig/issues/11074
960925 return error.SkipZigTest;
......@@ -1017,8 +982,6 @@ test "POSIX file locking with fcntl" {
1017982test "rename smoke test" {
1018983 if (native_os == .wasi) return error.SkipZigTest;
1019984
1020 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1021
1022985 var tmp = tmpDir(.{});
1023986 defer tmp.cleanup();
1024987
......@@ -1075,8 +1038,6 @@ test "rename smoke test" {
10751038test "access smoke test" {
10761039 if (native_os == .wasi) return error.SkipZigTest;
10771040
1078 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1079
10801041 var tmp = tmpDir(.{});
10811042 defer tmp.cleanup();
10821043
......@@ -1141,8 +1102,6 @@ test "timerfd" {
11411102}
11421103
11431104test "isatty" {
1144 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1145
11461105 var tmp = tmpDir(.{});
11471106 defer tmp.cleanup();
11481107
......@@ -1155,8 +1114,6 @@ test "isatty" {
11551114test "read with empty buffer" {
11561115 if (native_os == .wasi) return error.SkipZigTest;
11571116
1158 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1159
11601117 var tmp = tmpDir(.{});
11611118 defer tmp.cleanup();
11621119
......@@ -1182,8 +1139,6 @@ test "read with empty buffer" {
11821139test "pread with empty buffer" {
11831140 if (native_os == .wasi) return error.SkipZigTest;
11841141
1185 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1186
11871142 var tmp = tmpDir(.{});
11881143 defer tmp.cleanup();
11891144
......@@ -1209,8 +1164,6 @@ test "pread with empty buffer" {
12091164test "write with empty buffer" {
12101165 if (native_os == .wasi) return error.SkipZigTest;
12111166
1212 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1213
12141167 var tmp = tmpDir(.{});
12151168 defer tmp.cleanup();
12161169
......@@ -1236,8 +1189,6 @@ test "write with empty buffer" {
12361189test "pwrite with empty buffer" {
12371190 if (native_os == .wasi) return error.SkipZigTest;
12381191
1239 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1240
12411192 var tmp = tmpDir(.{});
12421193 defer tmp.cleanup();
12431194
......@@ -1263,8 +1214,6 @@ test "pwrite with empty buffer" {
12631214test "fchmodat smoke test" {
12641215 if (!std.fs.has_executable_bit) return error.SkipZigTest;
12651216
1266 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1267
12681217 var tmp = tmpDir(.{});
12691218 defer tmp.cleanup();
12701219
lib/std/os/windows.zig-2
......@@ -2491,8 +2491,6 @@ pub fn ntToWin32Namespace(path: []const u16) !PathSpace {
24912491}
24922492
24932493test "ntToWin32Namespace" {
2494 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
2495
24962494 const L = std.unicode.utf8ToUtf16LeStringLiteral;
24972495
24982496 try testNtToWin32Namespace(L("UNC"), L("\\??\\UNC"));
lib/std/priority_dequeue.zig-2
......@@ -705,8 +705,6 @@ test "std.PriorityDequeue: fromOwnedSlice trivial case 1" {
705705}
706706
707707test "std.PriorityDequeue: fromOwnedSlice" {
708 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
709
710708 const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 };
711709 const queue_items = try testing.allocator.dupe(u32, items[0..]);
712710 var queue = PDQ.fromOwnedSlice(testing.allocator, queue_items[0..], {});
lib/std/priority_queue.zig-2
......@@ -385,8 +385,6 @@ test "std.PriorityQueue: fromOwnedSlice trivial case 1" {
385385}
386386
387387test "std.PriorityQueue: fromOwnedSlice" {
388 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
389
390388 const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 };
391389 const heap_items = try testing.allocator.dupe(u32, items[0..]);
392390 var queue = PQlt.fromOwnedSlice(testing.allocator, heap_items[0..], {});
lib/std/rand/Xoshiro256.zig+1-4
......@@ -90,10 +90,7 @@ pub fn fill(self: *Xoshiro256, buf: []u8) void {
9090}
9191
9292test "xoroshiro sequence" {
93 switch (@import("builtin").zig_backend) {
94 .stage2_c, .stage2_x86_64 => return error.SkipZigTest,
95 else => {},
96 }
93 if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest;
9794
9895 var r = Xoshiro256.init(0);
9996
lib/std/rand/test.zig-11
......@@ -1,5 +1,4 @@
11const std = @import("../std.zig");
2const builtin = @import("builtin");
32const math = std.math;
43const DefaultPrng = std.rand.DefaultPrng;
54const Random = std.rand.Random;
......@@ -158,8 +157,6 @@ fn testRandomEnumValue() !void {
158157}
159158
160159test "Random intLessThan" {
161 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
162
163160 @setEvalBranchQuota(10000);
164161 try testRandomIntLessThan();
165162 try comptime testRandomIntLessThan();
......@@ -202,8 +199,6 @@ fn testRandomIntLessThan() !void {
202199}
203200
204201test "Random intAtMost" {
205 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
206
207202 @setEvalBranchQuota(10000);
208203 try testRandomIntAtMost();
209204 try comptime testRandomIntAtMost();
......@@ -244,8 +239,6 @@ fn testRandomIntAtMost() !void {
244239}
245240
246241test "Random Biased" {
247 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
248
249242 var prng = DefaultPrng.init(0);
250243 const random = prng.random();
251244 // Not thoroughly checking the logic here.
......@@ -443,8 +436,6 @@ fn testRangeBias(r: Random, start: i8, end: i8, biased: bool) !void {
443436}
444437
445438test "CSPRNG" {
446 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
447
448439 var secret_seed: [DefaultCsprng.secret_seed_length]u8 = undefined;
449440 std.crypto.random.bytes(&secret_seed);
450441 var csprng = DefaultCsprng.init(secret_seed);
......@@ -456,8 +447,6 @@ test "CSPRNG" {
456447}
457448
458449test "Random weightedIndex" {
459 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
460
461450 // Make sure weightedIndex works for various integers and floats
462451 inline for (.{ u64, i4, f32, f64 }) |T| {
463452 var prng = DefaultPrng.init(0);
lib/std/segmented_list.zig-2
......@@ -409,8 +409,6 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type
409409}
410410
411411test "SegmentedList basic usage" {
412 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
413
414412 try testSegmentedList(0);
415413 try testSegmentedList(1);
416414 try testSegmentedList(2);
lib/std/simd.zig-9
......@@ -196,13 +196,10 @@ pub fn extract(
196196}
197197
198198test "vector patterns" {
199 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
200
201199 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
202200 // https://github.com/ziglang/zig/issues/12012
203201 return error.SkipZigTest;
204202 }
205
206203 const base = @Vector(4, u32){ 10, 20, 30, 40 };
207204 const other_base = @Vector(4, u32){ 55, 66, 77, 88 };
208205
......@@ -272,8 +269,6 @@ pub fn reverseOrder(vec: anytype) @TypeOf(vec) {
272269}
273270
274271test "vector shifting" {
275 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
276
277272 const base = @Vector(4, u32){ 10, 20, 30, 40 };
278273
279274 try std.testing.expectEqual([4]u32{ 30, 40, 999, 999 }, shiftElementsLeft(base, 2, 999));
......@@ -338,8 +333,6 @@ pub fn countElementsWithValue(vec: anytype, value: std.meta.Child(@TypeOf(vec)))
338333}
339334
340335test "vector searching" {
341 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
342
343336 const base = @Vector(8, u32){ 6, 4, 7, 4, 4, 2, 3, 7 };
344337
345338 try std.testing.expectEqual(@as(?u3, 1), firstIndexOfValue(base, 4));
......@@ -431,8 +424,6 @@ pub fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: a
431424}
432425
433426test "vector prefix scan" {
434 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
435
436427 if (comptime builtin.cpu.arch.isMIPS()) {
437428 return error.SkipZigTest;
438429 }
lib/std/sort.zig-11
......@@ -1,6 +1,5 @@
11const std = @import("std.zig");
22const assert = std.debug.assert;
3const builtin = @import("builtin");
43const testing = std.testing;
54const mem = std.mem;
65const math = std.math;
......@@ -177,8 +176,6 @@ const IdAndValue = struct {
177176};
178177
179178test "stable sort" {
180 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
181
182179 const expected = [_]IdAndValue{
183180 IdAndValue{ .id = 0, .value = 0 },
184181 IdAndValue{ .id = 1, .value = 0 },
......@@ -226,8 +223,6 @@ test "stable sort" {
226223}
227224
228225test "sort" {
229 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
230
231226 const u8cases = [_][]const []const u8{
232227 &[_][]const u8{
233228 "",
......@@ -306,8 +301,6 @@ test "sort" {
306301}
307302
308303test "sort descending" {
309 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
310
311304 const rev_cases = [_][]const []const i32{
312305 &[_][]const i32{
313306 &[_]i32{},
......@@ -347,8 +340,6 @@ test "sort descending" {
347340}
348341
349342test "sort with context in the middle of a slice" {
350 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
351
352343 const Context = struct {
353344 items: []i32,
354345
......@@ -388,8 +379,6 @@ test "sort with context in the middle of a slice" {
388379}
389380
390381test "sort fuzz testing" {
391 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
392
393382 var prng = std.rand.DefaultPrng.init(0x12345678);
394383 const random = prng.random();
395384 const test_case_count = 10;
lib/std/time.zig-4
......@@ -122,8 +122,6 @@ pub fn nanoTimestamp() i128 {
122122}
123123
124124test "timestamp" {
125 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
126
127125 const margin = ns_per_ms * 50;
128126
129127 const time_0 = milliTimestamp();
......@@ -321,8 +319,6 @@ pub const Timer = struct {
321319};
322320
323321test "Timer + Instant" {
324 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
325
326322 const margin = ns_per_ms * 150;
327323
328324 var timer = try Timer.start();
lib/std/treap.zig-2
......@@ -350,8 +350,6 @@ const TestTreap = Treap(u64, std.math.order);
350350const TestNode = TestTreap.Node;
351351
352352test "std.Treap: insert, find, replace, remove" {
353 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
354
355353 var treap = TestTreap{};
356354 var nodes: [10]TestNode = undefined;
357355
lib/std/unicode.zig-41
......@@ -1,6 +1,5 @@
11const std = @import("./std.zig");
22const assert = std.debug.assert;
3const builtin = @import("builtin");
43const testing = std.testing;
54const mem = std.mem;
65
......@@ -497,15 +496,11 @@ fn testUtf16CountCodepoints() !void {
497496}
498497
499498test "utf16 count codepoints" {
500 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
501
502499 try testUtf16CountCodepoints();
503500 try comptime testUtf16CountCodepoints();
504501}
505502
506503test "utf8 encode" {
507 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
508
509504 try comptime testUtf8Encode();
510505 try testUtf8Encode();
511506}
......@@ -532,8 +527,6 @@ fn testUtf8Encode() !void {
532527}
533528
534529test "utf8 encode error" {
535 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
536
537530 try comptime testUtf8EncodeError();
538531 try testUtf8EncodeError();
539532}
......@@ -550,8 +543,6 @@ fn testErrorEncode(codePoint: u21, array: []u8, expectedErr: anyerror) !void {
550543}
551544
552545test "utf8 iterator on ascii" {
553 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
554
555546 try comptime testUtf8IteratorOnAscii();
556547 try testUtf8IteratorOnAscii();
557548}
......@@ -572,8 +563,6 @@ fn testUtf8IteratorOnAscii() !void {
572563}
573564
574565test "utf8 view bad" {
575 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
576
577566 try comptime testUtf8ViewBad();
578567 try testUtf8ViewBad();
579568}
......@@ -584,8 +573,6 @@ fn testUtf8ViewBad() !void {
584573}
585574
586575test "utf8 view ok" {
587 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
588
589576 try comptime testUtf8ViewOk();
590577 try testUtf8ViewOk();
591578}
......@@ -606,8 +593,6 @@ fn testUtf8ViewOk() !void {
606593}
607594
608595test "validate slice" {
609 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
610
611596 try comptime testValidateSlice();
612597 try testValidateSlice();
613598
......@@ -648,8 +633,6 @@ fn testValidateSlice() !void {
648633}
649634
650635test "valid utf8" {
651 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
652
653636 try comptime testValidUtf8();
654637 try testValidUtf8();
655638}
......@@ -669,8 +652,6 @@ fn testValidUtf8() !void {
669652}
670653
671654test "invalid utf8 continuation bytes" {
672 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
673
674655 try comptime testInvalidUtf8ContinuationBytes();
675656 try testInvalidUtf8ContinuationBytes();
676657}
......@@ -703,8 +684,6 @@ fn testInvalidUtf8ContinuationBytes() !void {
703684}
704685
705686test "overlong utf8 codepoint" {
706 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
707
708687 try comptime testOverlongUtf8Codepoint();
709688 try testOverlongUtf8Codepoint();
710689}
......@@ -718,8 +697,6 @@ fn testOverlongUtf8Codepoint() !void {
718697}
719698
720699test "misc invalid utf8" {
721 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
722
723700 try comptime testMiscInvalidUtf8();
724701 try testMiscInvalidUtf8();
725702}
......@@ -735,8 +712,6 @@ fn testMiscInvalidUtf8() !void {
735712}
736713
737714test "utf8 iterator peeking" {
738 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
739
740715 try comptime testUtf8Peeking();
741716 try testUtf8Peeking();
742717}
......@@ -821,8 +796,6 @@ pub fn utf16leToUtf8(utf8: []u8, utf16le: []const u16) !usize {
821796}
822797
823798test "utf16leToUtf8" {
824 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
825
826799 var utf16le: [2]u16 = undefined;
827800 const utf16le_as_bytes = mem.sliceAsBytes(utf16le[0..]);
828801
......@@ -935,8 +908,6 @@ pub fn utf8ToUtf16Le(utf16le: []u16, utf8: []const u8) !usize {
935908}
936909
937910test "utf8ToUtf16Le" {
938 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
939
940911 var utf16le: [2]u16 = [_]u16{0} ** 2;
941912 {
942913 const length = try utf8ToUtf16Le(utf16le[0..], "𐐷");
......@@ -955,8 +926,6 @@ test "utf8ToUtf16Le" {
955926}
956927
957928test "utf8ToUtf16LeWithNull" {
958 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
959
960929 {
961930 const utf16 = try utf8ToUtf16LeWithNull(testing.allocator, "𐐷");
962931 defer testing.allocator.free(utf16);
......@@ -1015,8 +984,6 @@ fn testCalcUtf16LeLen() !void {
1015984}
1016985
1017986test "calculate utf16 string length of given utf8 string in u16" {
1018 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1019
1020987 try testCalcUtf16LeLen();
1021988 try comptime testCalcUtf16LeLen();
1022989}
......@@ -1050,8 +1017,6 @@ pub fn fmtUtf16le(utf16le: []const u16) std.fmt.Formatter(formatUtf16le) {
10501017}
10511018
10521019test "fmtUtf16le" {
1053 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1054
10551020 const expectFmt = std.testing.expectFmt;
10561021 try expectFmt("", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral(""))});
10571022 try expectFmt("foo", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral("foo"))});
......@@ -1065,8 +1030,6 @@ test "fmtUtf16le" {
10651030}
10661031
10671032test "utf8ToUtf16LeStringLiteral" {
1068 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1069
10701033 {
10711034 const bytes = [_:0]u16{
10721035 mem.nativeToLittle(u16, 0x41),
......@@ -1127,8 +1090,6 @@ fn testUtf8CountCodepoints() !void {
11271090}
11281091
11291092test "utf8 count codepoints" {
1130 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1131
11321093 try testUtf8CountCodepoints();
11331094 try comptime testUtf8CountCodepoints();
11341095}
......@@ -1145,8 +1106,6 @@ fn testUtf8ValidCodepoint() !void {
11451106}
11461107
11471108test "utf8 valid codepoint" {
1148 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1149
11501109 try testUtf8ValidCodepoint();
11511110 try comptime testUtf8ValidCodepoint();
11521111}
lib/std/zig/CrossTarget.zig-2
......@@ -785,8 +785,6 @@ fn parseOs(result: *CrossTarget, diags: *ParseOptions.Diagnostics, text: []const
785785}
786786
787787test "CrossTarget.parse" {
788 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
789
790788 if (builtin.target.isGnuLibC()) {
791789 var cross_target = try CrossTarget.parse(.{});
792790 cross_target.setGnuLibCVersion(2, 1, 1);
lib/std/zig/Parse.zig-2
......@@ -4102,7 +4102,5 @@ const TokenIndex = Ast.TokenIndex;
41024102const Token = std.zig.Token;
41034103
41044104test {
4105 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4106
41074105 _ = @import("parser_test.zig");
41084106}
lib/std/zig/fmt.zig-3
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const mem = std.mem;
43
54/// Print the string as a Zig identifier escaping it with @"" syntax if needed.
......@@ -96,8 +95,6 @@ pub fn fmtEscapes(bytes: []const u8) std.fmt.Formatter(stringEscape) {
9695}
9796
9897test "escape invalid identifiers" {
99 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
100
10198 const expectFmt = std.testing.expectFmt;
10299 try expectFmt("@\"while\"", "{}", .{fmtId("while")});
103100 try expectFmt("hello", "{}", .{fmtId("hello")});
lib/std/zig/tokenizer.zig-11
......@@ -1,5 +1,4 @@
11const std = @import("../std.zig");
2const builtin = @import("builtin");
32
43pub const Token = struct {
54 tag: Tag,
......@@ -1450,8 +1449,6 @@ test "chars" {
14501449}
14511450
14521451test "invalid token characters" {
1453 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1454
14551452 try testTokenize("#", &.{.invalid});
14561453 try testTokenize("`", &.{.invalid});
14571454 try testTokenize("'c", &.{.invalid});
......@@ -1481,8 +1478,6 @@ test "utf8" {
14811478}
14821479
14831480test "invalid utf8" {
1484 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1485
14861481 try testTokenize("//\x80", &.{
14871482 .invalid,
14881483 });
......@@ -1573,8 +1568,6 @@ test "pipe and then invalid" {
15731568}
15741569
15751570test "line comment and doc comment" {
1576 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1577
15781571 try testTokenize("//", &.{});
15791572 try testTokenize("// a / b", &.{});
15801573 try testTokenize("// /", &.{});
......@@ -1649,8 +1642,6 @@ test "range literals" {
16491642}
16501643
16511644test "number literals decimal" {
1652 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1653
16541645 try testTokenize("0", &.{.number_literal});
16551646 try testTokenize("1", &.{.number_literal});
16561647 try testTokenize("2", &.{.number_literal});
......@@ -1899,8 +1890,6 @@ test "invalid token with unfinished escape right before eof" {
18991890}
19001891
19011892test "saturating operators" {
1902 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
1903
19041893 try testTokenize("<<", &.{.angle_bracket_angle_bracket_left});
19051894 try testTokenize("<<|", &.{.angle_bracket_angle_bracket_left_pipe});
19061895 try testTokenize("<<|=", &.{.angle_bracket_angle_bracket_left_pipe_equal});
src/arch/x86_64/CodeGen.zig+97-158
......@@ -2895,16 +2895,13 @@ fn airIntCast(self: *Self, inst: Air.Inst.Index) !void {
28952895 }.signedness;
28962896
28972897 const src_mcv = try self.resolveInst(ty_op.operand);
2898 const src_storage_bits: u16 = switch (src_mcv) {
2898 const src_storage_bits = switch (src_mcv) {
28992899 .register, .register_offset => 64,
2900 .register_pair => 128,
2901 .load_frame => |frame_addr| @intCast(self.getFrameAddrSize(frame_addr) * 8),
2900 .load_frame => |frame_addr| self.getFrameAddrSize(frame_addr) * 8,
29022901 else => src_int_info.bits,
29032902 };
29042903
29052904 const dst_mcv = if (dst_int_info.bits <= src_storage_bits and
2906 std.math.divCeil(u16, dst_int_info.bits, 64) catch unreachable ==
2907 std.math.divCeil(u32, src_storage_bits, 64) catch unreachable and
29082905 self.reuseOperand(inst, ty_op.operand, 0, src_mcv)) src_mcv else dst: {
29092906 const dst_mcv = try self.allocRegOrMem(inst, true);
29102907 try self.genCopy(min_ty, dst_mcv, src_mcv);
......@@ -2979,21 +2976,8 @@ fn airTrunc(self: *Self, inst: Air.Inst.Index) !void {
29792976
29802977 const dst_mcv = if (src_mcv.isRegister() and self.reuseOperand(inst, ty_op.operand, 0, src_mcv))
29812978 src_mcv
2982 else if (dst_abi_size <= 8)
2983 try self.copyToRegisterWithInstTracking(inst, dst_ty, src_mcv)
2984 else if (dst_abi_size <= 16) dst: {
2985 const dst_regs = try self.register_manager.allocRegs(
2986 2,
2987 .{ inst, inst },
2988 abi.RegisterClass.gp,
2989 );
2990 const dst_mcv: MCValue = .{ .register_pair = dst_regs };
2991 const dst_locks = self.register_manager.lockRegsAssumeUnused(2, dst_regs);
2992 defer for (dst_locks) |lock| self.register_manager.unlockReg(lock);
2993
2994 try self.genCopy(dst_ty, dst_mcv, src_mcv);
2995 break :dst dst_mcv;
2996 } else return self.fail("TODO implement trunc from {} to {}", .{ src_ty.fmt(mod), dst_ty.fmt(mod) });
2979 else
2980 try self.copyToRegisterWithInstTracking(inst, dst_ty, src_mcv);
29972981
29982982 if (dst_ty.zigTypeTag(mod) == .Vector) {
29992983 assert(src_ty.zigTypeTag(mod) == .Vector and dst_ty.vectorLen(mod) == src_ty.vectorLen(mod));
......@@ -3064,15 +3048,14 @@ fn airTrunc(self: *Self, inst: Air.Inst.Index) !void {
30643048 break :result dst_mcv;
30653049 }
30663050
3051 if (dst_abi_size > 8) {
3052 return self.fail("TODO implement trunc for abi sizes larger than 8", .{});
3053 }
3054
30673055 // when truncating a `u16` to `u5`, for example, those top 3 bits in the result
30683056 // have to be removed. this only happens if the dst if not a power-of-two size.
3069 if (dst_abi_size <= 8) {
3070 if (self.regExtraBits(dst_ty) > 0) try self.truncateRegister(dst_ty, dst_mcv.register.to64());
3071 } else if (dst_abi_size <= 16) {
3072 const dst_info = dst_ty.intInfo(mod);
3073 const high_ty = try mod.intType(dst_info.signedness, dst_info.bits - 64);
3074 if (self.regExtraBits(high_ty) > 0) try self.truncateRegister(high_ty, dst_mcv.register_pair[1].to64());
3075 }
3057 if (self.regExtraBits(dst_ty) > 0)
3058 try self.truncateRegister(dst_ty, dst_mcv.register.to64());
30763059
30773060 break :result dst_mcv;
30783061 };
......@@ -3395,7 +3378,7 @@ fn airMulSat(self: *Self, inst: Air.Inst.Index) !void {
33953378 const cc: Condition = if (ty.isSignedInt(mod)) cc: {
33963379 try self.genSetReg(limit_reg, ty, lhs_mcv);
33973380 try self.genBinOpMir(.{ ._, .xor }, ty, limit_mcv, rhs_mcv);
3398 try self.genShiftBinOpMir(.{ ._r, .sa }, ty, limit_mcv, .{ .immediate = reg_bits - 1 });
3381 try self.genShiftBinOpMir(.{ ._, .sa }, ty, limit_mcv, .{ .immediate = reg_bits - 1 });
33993382 try self.genBinOpMir(.{ ._, .xor }, ty, limit_mcv, .{
34003383 .immediate = (@as(u64, 1) << @intCast(reg_bits - 1)) - 1,
34013384 });
......@@ -3663,10 +3646,7 @@ fn airMulWithOverflow(self: *Self, inst: Air.Inst.Index) !void {
36633646 },
36643647 else => {
36653648 // For now, this is the only supported multiply that doesn't fit in a register.
3666 if (dst_info.bits > 128 or src_bits != 64)
3667 return self.fail("TODO implement airWithOverflow from {} to {}", .{
3668 src_ty.fmt(mod), dst_ty.fmt(mod),
3669 });
3649 assert(dst_info.bits <= 128 and src_bits == 64);
36703650
36713651 const frame_index =
36723652 try self.allocFrameIndex(FrameAlloc.initType(tuple_ty, mod));
......@@ -3818,13 +3798,11 @@ fn airShlSat(self: *Self, inst: Air.Inst.Index) !void {
38183798}
38193799
38203800fn airOptionalPayload(self: *Self, inst: Air.Inst.Index) !void {
3821 const mod = self.bin_file.options.module.?;
38223801 const ty_op = self.air.instructions.items(.data)[inst].ty_op;
38233802 const result: MCValue = result: {
38243803 const pl_ty = self.typeOfIndex(inst);
3825 if (!pl_ty.hasRuntimeBitsIgnoreComptime(mod)) break :result .none;
3826
38273804 const opt_mcv = try self.resolveInst(ty_op.operand);
3805
38283806 if (self.reuseOperand(inst, ty_op.operand, 0, opt_mcv)) {
38293807 switch (opt_mcv) {
38303808 .register => |reg| try self.truncateRegister(pl_ty, reg),
......@@ -4444,46 +4422,42 @@ fn airPtrElemVal(self: *Self, inst: Air.Inst.Index) !void {
44444422 // this is identical to the `airPtrElemPtr` codegen expect here an
44454423 // additional `mov` is needed at the end to get the actual value
44464424
4447 const result = result: {
4448 const elem_ty = ptr_ty.elemType2(mod);
4449 if (!elem_ty.hasRuntimeBitsIgnoreComptime(mod)) break :result .none;
4450
4451 const elem_abi_size: u32 = @intCast(elem_ty.abiSize(mod));
4452 const index_ty = self.typeOf(bin_op.rhs);
4453 const index_mcv = try self.resolveInst(bin_op.rhs);
4454 const index_lock = switch (index_mcv) {
4455 .register => |reg| self.register_manager.lockRegAssumeUnused(reg),
4456 else => null,
4457 };
4458 defer if (index_lock) |lock| self.register_manager.unlockReg(lock);
4425 const elem_ty = ptr_ty.elemType2(mod);
4426 const elem_abi_size: u32 = @intCast(elem_ty.abiSize(mod));
4427 const index_ty = self.typeOf(bin_op.rhs);
4428 const index_mcv = try self.resolveInst(bin_op.rhs);
4429 const index_lock = switch (index_mcv) {
4430 .register => |reg| self.register_manager.lockRegAssumeUnused(reg),
4431 else => null,
4432 };
4433 defer if (index_lock) |lock| self.register_manager.unlockReg(lock);
44594434
4460 const offset_reg = try self.elemOffset(index_ty, index_mcv, elem_abi_size);
4461 const offset_lock = self.register_manager.lockRegAssumeUnused(offset_reg);
4462 defer self.register_manager.unlockReg(offset_lock);
4435 const offset_reg = try self.elemOffset(index_ty, index_mcv, elem_abi_size);
4436 const offset_lock = self.register_manager.lockRegAssumeUnused(offset_reg);
4437 defer self.register_manager.unlockReg(offset_lock);
44634438
4464 const ptr_mcv = try self.resolveInst(bin_op.lhs);
4465 const elem_ptr_reg = if (ptr_mcv.isRegister() and self.liveness.operandDies(inst, 0))
4466 ptr_mcv.register
4467 else
4468 try self.copyToTmpRegister(ptr_ty, ptr_mcv);
4469 const elem_ptr_lock = self.register_manager.lockRegAssumeUnused(elem_ptr_reg);
4470 defer self.register_manager.unlockReg(elem_ptr_lock);
4471 try self.asmRegisterRegister(
4472 .{ ._, .add },
4473 elem_ptr_reg,
4474 offset_reg,
4475 );
4439 const ptr_mcv = try self.resolveInst(bin_op.lhs);
4440 const elem_ptr_reg = if (ptr_mcv.isRegister() and self.liveness.operandDies(inst, 0))
4441 ptr_mcv.register
4442 else
4443 try self.copyToTmpRegister(ptr_ty, ptr_mcv);
4444 const elem_ptr_lock = self.register_manager.lockRegAssumeUnused(elem_ptr_reg);
4445 defer self.register_manager.unlockReg(elem_ptr_lock);
4446 try self.asmRegisterRegister(
4447 .{ ._, .add },
4448 elem_ptr_reg,
4449 offset_reg,
4450 );
44764451
4477 const dst_mcv = try self.allocRegOrMem(inst, true);
4478 const dst_lock = switch (dst_mcv) {
4479 .register => |reg| self.register_manager.lockRegAssumeUnused(reg),
4480 else => null,
4481 };
4482 defer if (dst_lock) |lock| self.register_manager.unlockReg(lock);
4483 try self.load(dst_mcv, ptr_ty, .{ .register = elem_ptr_reg });
4484 break :result dst_mcv;
4452 const dst_mcv = try self.allocRegOrMem(inst, true);
4453 const dst_lock = switch (dst_mcv) {
4454 .register => |reg| self.register_manager.lockRegAssumeUnused(reg),
4455 else => null,
44854456 };
4486 return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none });
4457 defer if (dst_lock) |lock| self.register_manager.unlockReg(lock);
4458 try self.load(dst_mcv, ptr_ty, .{ .register = elem_ptr_reg });
4459
4460 return self.finishAir(inst, dst_mcv, .{ bin_op.lhs, bin_op.rhs, .none });
44874461}
44884462
44894463fn airPtrElemPtr(self: *Self, inst: Air.Inst.Index) !void {
......@@ -4963,7 +4937,7 @@ fn byteSwap(self: *Self, inst: Air.Inst.Index, src_ty: Type, src_mcv: MCValue, m
49634937 const mod = self.bin_file.options.module.?;
49644938 const ty_op = self.air.instructions.items(.data)[inst].ty_op;
49654939
4966 if (src_ty.zigTypeTag(mod) == .Vector) return self.fail(
4940 if (src_ty.zigTypeTag(mod) == .Vector or src_ty.abiSize(mod) > 8) return self.fail(
49674941 "TODO implement byteSwap for {}",
49684942 .{src_ty.fmt(mod)},
49694943 );
......@@ -5814,17 +5788,15 @@ fn packedLoad(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) Inn
58145788 const ptr_info = ptr_ty.ptrInfo(mod);
58155789
58165790 const val_ty = ptr_info.child.toType();
5817 if (!val_ty.hasRuntimeBitsIgnoreComptime(mod)) return;
58185791 const val_abi_size: u32 = @intCast(val_ty.abiSize(mod));
5819
5820 if (val_abi_size > 8) return self.fail("TODO implement packed load of {}", .{val_ty.fmt(mod)});
5821
58225792 const limb_abi_size: u32 = @min(val_abi_size, 8);
58235793 const limb_abi_bits = limb_abi_size * 8;
58245794 const val_byte_off: i32 = @intCast(ptr_info.packed_offset.bit_offset / limb_abi_bits * limb_abi_size);
58255795 const val_bit_off = ptr_info.packed_offset.bit_offset % limb_abi_bits;
58265796 const val_extra_bits = self.regExtraBits(val_ty);
58275797
5798 if (val_abi_size > 8) return self.fail("TODO implement packed load of {}", .{val_ty.fmt(mod)});
5799
58285800 const ptr_reg = try self.copyToTmpRegister(ptr_ty, ptr_mcv);
58295801 const ptr_lock = self.register_manager.lockRegAssumeUnused(ptr_reg);
58305802 defer self.register_manager.unlockReg(ptr_lock);
......@@ -5887,7 +5859,6 @@ fn packedLoad(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) Inn
58875859fn load(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) InnerError!void {
58885860 const mod = self.bin_file.options.module.?;
58895861 const dst_ty = ptr_ty.childType(mod);
5890 if (!dst_ty.hasRuntimeBitsIgnoreComptime(mod)) return;
58915862 switch (ptr_mcv) {
58925863 .none,
58935864 .unreach,
......@@ -5964,7 +5935,6 @@ fn packedStore(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) In
59645935 const mod = self.bin_file.options.module.?;
59655936 const ptr_info = ptr_ty.ptrInfo(mod);
59665937 const src_ty = ptr_ty.childType(mod);
5967 if (!src_ty.hasRuntimeBitsIgnoreComptime(mod)) return;
59685938
59695939 const limb_abi_size: u16 = @min(ptr_info.packed_offset.host_size, 8);
59705940 const limb_abi_bits = limb_abi_size * 8;
......@@ -6036,7 +6006,6 @@ fn packedStore(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) In
60366006fn store(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) InnerError!void {
60376007 const mod = self.bin_file.options.module.?;
60386008 const src_ty = ptr_ty.childType(mod);
6039 if (!src_ty.hasRuntimeBitsIgnoreComptime(mod)) return;
60406009 switch (ptr_mcv) {
60416010 .none,
60426011 .unreach,
......@@ -10507,44 +10476,39 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void {
1050710476 },
1050810477 else => return self.fail("invalid constraint: '{s}'", .{constraint}),
1050910478 };
10510 const arg_mcv: MCValue = arg_mcv: {
10511 const arg_maybe_reg: ?Register = if (mem.eql(u8, constraint[1..], "r"))
10512 self.register_manager.tryAllocReg(maybe_inst, self.regClassForType(ty)) orelse
10513 return self.fail("ran out of registers lowering inline asm", .{})
10514 else if (mem.eql(u8, constraint[1..], "m"))
10515 if (output != .none) null else return self.fail(
10516 "memory constraint unsupported for asm result: '{s}'",
10517 .{constraint},
10518 )
10519 else if (mem.eql(u8, constraint[1..], "g") or
10520 mem.eql(u8, constraint[1..], "rm") or mem.eql(u8, constraint[1..], "mr") or
10521 mem.eql(u8, constraint[1..], "r,m") or mem.eql(u8, constraint[1..], "m,r"))
10522 self.register_manager.tryAllocReg(maybe_inst, self.regClassForType(ty)) orelse
10523 if (output != .none)
10524 null
10525 else
10526 return self.fail("ran out of registers lowering inline asm", .{})
10527 else if (mem.startsWith(u8, constraint[1..], "{") and mem.endsWith(u8, constraint[1..], "}"))
10528 parseRegName(constraint[1 + "{".len .. constraint.len - "}".len]) orelse
10529 return self.fail("invalid register constraint: '{s}'", .{constraint})
10530 else if (constraint.len == 2 and std.ascii.isDigit(constraint[1])) {
10531 const index = std.fmt.charToDigit(constraint[0], 10) catch unreachable;
10532 if (index >= args.items.len) return self.fail("constraint out of bounds: '{s}'", .{constraint});
10533 break :arg_mcv args.items[index];
10534 } else return self.fail("invalid constraint: '{s}'", .{constraint});
10535 break :arg_mcv if (arg_maybe_reg) |reg| .{ .register = reg } else arg: {
10536 const ptr_mcv = try self.resolveInst(output);
10537 switch (ptr_mcv) {
10538 .immediate => |addr| if (math.cast(i32, @as(i64, @bitCast(addr)))) |_|
10539 break :arg ptr_mcv.deref(),
10540 .register, .register_offset, .lea_frame => break :arg ptr_mcv.deref(),
10541 else => {},
10542 }
10543 break :arg .{ .indirect = .{ .reg = try self.copyToTmpRegister(Type.usize, ptr_mcv) } };
10544 };
10479 const arg_maybe_reg: ?Register = if (mem.eql(u8, constraint[1..], "r"))
10480 self.register_manager.tryAllocReg(maybe_inst, self.regClassForType(ty)) orelse
10481 return self.fail("ran out of registers lowering inline asm", .{})
10482 else if (mem.eql(u8, constraint[1..], "m"))
10483 if (output != .none) null else return self.fail(
10484 "memory constraint unsupported for asm result: '{s}'",
10485 .{constraint},
10486 )
10487 else if (mem.eql(u8, constraint[1..], "g") or
10488 mem.eql(u8, constraint[1..], "rm") or mem.eql(u8, constraint[1..], "mr") or
10489 mem.eql(u8, constraint[1..], "r,m") or mem.eql(u8, constraint[1..], "m,r"))
10490 self.register_manager.tryAllocReg(maybe_inst, self.regClassForType(ty)) orelse
10491 if (output != .none)
10492 null
10493 else
10494 return self.fail("ran out of registers lowering inline asm", .{})
10495 else if (mem.startsWith(u8, constraint[1..], "{") and mem.endsWith(u8, constraint[1..], "}"))
10496 parseRegName(constraint[1 + "{".len .. constraint.len - "}".len]) orelse
10497 return self.fail("invalid register constraint: '{s}'", .{constraint})
10498 else
10499 return self.fail("invalid constraint: '{s}'", .{constraint});
10500 const arg_mcv: MCValue = if (arg_maybe_reg) |reg| .{ .register = reg } else arg: {
10501 const ptr_mcv = try self.resolveInst(output);
10502 switch (ptr_mcv) {
10503 .immediate => |addr| if (math.cast(i32, @as(i64, @bitCast(addr)))) |_|
10504 break :arg ptr_mcv.deref(),
10505 .register, .register_offset, .lea_frame => break :arg ptr_mcv.deref(),
10506 else => {},
10507 }
10508 break :arg .{ .indirect = .{ .reg = try self.copyToTmpRegister(Type.usize, ptr_mcv) } };
1054510509 };
1054610510 if (arg_mcv.getReg()) |reg| if (RegisterManager.indexOfRegIntoTracked(reg)) |_| {
10547 _ = self.register_manager.lockReg(reg);
10511 _ = self.register_manager.lockRegAssumeUnused(reg);
1054810512 };
1054910513 if (!mem.eql(u8, name, "_"))
1055010514 arg_map.putAssumeCapacityNoClobber(name, @intCast(args.items.len));
......@@ -10606,10 +10570,6 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void {
1060610570 try self.register_manager.getReg(reg, null);
1060710571 try self.genSetReg(reg, ty, input_mcv);
1060810572 break :arg .{ .register = reg };
10609 } else if (constraint.len == 1 and std.ascii.isDigit(constraint[0])) arg: {
10610 const index = std.fmt.charToDigit(constraint[0], 10) catch unreachable;
10611 if (index >= args.items.len) return self.fail("constraint out of bounds: '{s}'", .{constraint});
10612 break :arg args.items[index];
1061310573 } else return self.fail("invalid constraint: '{s}'", .{constraint});
1061410574 if (arg_mcv.getReg()) |reg| if (RegisterManager.indexOfRegIntoTracked(reg)) |_| {
1061510575 _ = self.register_manager.lockReg(reg);
......@@ -10735,7 +10695,7 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void {
1073510695 mnem_name[mnem_prefix.len .. mnem_name.len - mnem_suffix.len],
1073610696 ) orelse continue };
1073710697 } else {
10738 assert(prefix != .none); // no combination of fixes produced a known mnemonic
10698 assert(prefix != .none);
1073910699 return self.fail("invalid prefix for mnemonic: '{s} {s}'", .{
1074010700 @tagName(prefix), mnem_str,
1074110701 });
......@@ -10966,7 +10926,6 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void {
1096610926
1096710927 if (output == .none) continue;
1096810928 if (arg_mcv != .register) continue;
10969 if (constraint.len == 2 and std.ascii.isDigit(constraint[1])) continue;
1097010929 try self.store(self.typeOf(output), .{ .air_ref = output }, arg_mcv);
1097110930 }
1097210931
......@@ -11060,7 +11019,6 @@ fn moveStrategy(self: *Self, ty: Type, aligned: bool) !MoveStrategy {
1106011019 else => {},
1106111020 },
1106211021 .Vector => switch (ty.childType(mod).zigTypeTag(mod)) {
11063 .Bool => return .{ .move = .{ ._, .mov } },
1106411022 .Int => switch (ty.childType(mod).intInfo(mod).bits) {
1106511023 8 => switch (ty.vectorLen(mod)) {
1106611024 1 => if (self.hasFeature(.avx)) return .{ .vex_insert_extract = .{
......@@ -11326,6 +11284,7 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr
1132611284 .none,
1132711285 .unreach,
1132811286 .dead,
11287 .register_pair,
1132911288 .register_overflow,
1133011289 .reserved_frame,
1133111290 => unreachable,
......@@ -11429,7 +11388,6 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr
1142911388 },
1143011389 .x87, .mmx => unreachable,
1143111390 },
11432 .register_pair => |src_regs| try self.genSetReg(dst_reg, ty, .{ .register = src_regs[0] }),
1143311391 .register_offset,
1143411392 .indirect,
1143511393 .load_frame,
......@@ -11563,13 +11521,10 @@ fn genSetMem(self: *Self, base: Memory.Base, disp: i32, ty: Type, src_mcv: MCVal
1156311521 .undef => {},
1156411522 .immediate => |imm| switch (abi_size) {
1156511523 1, 2, 4 => {
11566 const immediate = switch (if (ty.isAbiInt(mod))
11567 ty.intInfo(mod).signedness
11524 const immediate = if (ty.isSignedInt(mod))
11525 Immediate.s(@truncate(@as(i64, @bitCast(imm))))
1156811526 else
11569 .unsigned) {
11570 .signed => Immediate.s(@truncate(@as(i64, @bitCast(imm)))),
11571 .unsigned => Immediate.u(@as(u32, @intCast(imm))),
11572 };
11527 Immediate.u(@as(u32, @intCast(imm)));
1157311528 try self.asmMemoryImmediate(
1157411529 .{ ._, .mov },
1157511530 Memory.sib(Memory.PtrSize.fromSize(abi_size), .{ .base = base, .disp = disp }),
......@@ -11631,35 +11586,19 @@ fn genSetMem(self: *Self, base: Memory.Base, disp: i32, ty: Type, src_mcv: MCVal
1163111586 .{ .base = base, .disp = disp + @as(i32, @intCast(src_reg_i * 8)) },
1163211587 ), registerAlias(src_reg, part_size));
1163311588 },
11634 .register_overflow => |ro| switch (ty.zigTypeTag(mod)) {
11635 .Struct => {
11636 try self.genSetMem(
11637 base,
11638 disp + @as(i32, @intCast(ty.structFieldOffset(0, mod))),
11639 ty.structFieldType(0, mod),
11640 .{ .register = ro.reg },
11641 );
11642 try self.genSetMem(
11643 base,
11644 disp + @as(i32, @intCast(ty.structFieldOffset(1, mod))),
11645 ty.structFieldType(1, mod),
11646 .{ .eflags = ro.eflags },
11647 );
11648 },
11649 .Optional => {
11650 assert(!ty.optionalReprIsPayload(mod));
11651 const child_ty = ty.optionalChild(mod);
11652 try self.genSetMem(base, disp, child_ty, .{ .register = ro.reg });
11653 try self.genSetMem(
11654 base,
11655 disp + @as(i32, @intCast(child_ty.abiSize(mod))),
11656 Type.bool,
11657 .{ .eflags = ro.eflags },
11658 );
11659 },
11660 else => return self.fail("TODO implement genSetMem for {s} of {}", .{
11661 @tagName(src_mcv), ty.fmt(mod),
11662 }),
11589 .register_overflow => |ro| {
11590 try self.genSetMem(
11591 base,
11592 disp + @as(i32, @intCast(ty.structFieldOffset(0, mod))),
11593 ty.structFieldType(0, mod),
11594 .{ .register = ro.reg },
11595 );
11596 try self.genSetMem(
11597 base,
11598 disp + @as(i32, @intCast(ty.structFieldOffset(1, mod))),
11599 ty.structFieldType(1, mod),
11600 .{ .eflags = ro.eflags },
11601 );
1166311602 },
1166411603 .register_offset,
1166511604 .memory,
src/arch/x86_64/Encoding.zig+3-3
......@@ -232,7 +232,7 @@ pub const Mnemonic = enum {
232232 cmp,
233233 cmps, cmpsb, cmpsd, cmpsq, cmpsw,
234234 cmpxchg, cmpxchg8b, cmpxchg16b,
235 cpuid, cqo, cwd, cwde,
235 cqo, cwd, cwde,
236236 div,
237237 idiv, imul, int3,
238238 ja, jae, jb, jbe, jc, jrcxz, je, jg, jge, jl, jle, jna, jnae, jnb, jnbe,
......@@ -246,7 +246,7 @@ pub const Mnemonic = enum {
246246 movsx, movsxd, movzx, mul,
247247 neg, nop, not,
248248 @"or",
249 pause, pop, popcnt, push,
249 pop, popcnt, push,
250250 rcl, rcr, ret, rol, ror,
251251 sal, sar, sbb,
252252 scas, scasb, scasd, scasq, scasw,
......@@ -258,7 +258,7 @@ pub const Mnemonic = enum {
258258 stos, stosb, stosd, stosq, stosw,
259259 @"test", tzcnt,
260260 ud2,
261 xadd, xchg, xgetbv, xor,
261 xadd, xchg, xor,
262262 // X87
263263 fabs, fchs, ffree, fisttp, fld, fst, fstp,
264264 // MMX
src/arch/x86_64/Mir.zig-6
......@@ -327,8 +327,6 @@ pub const Inst = struct {
327327 /// Compare and exchange
328328 /// Compare and exchange bytes
329329 cmpxchg,
330 /// CPU identification
331 cpuid,
332330 /// Convert doubleword to quadword
333331 cqo,
334332 /// Convert word to doubleword
......@@ -388,8 +386,6 @@ pub const Inst = struct {
388386 /// Bitwise logical or of packed single-precision floating-point values
389387 /// Bitwise logical or of packed double-precision floating-point values
390388 @"or",
391 /// Spin loop hint
392 pause,
393389 /// Pop
394390 pop,
395391 /// Return the count of number of bits set to 1
......@@ -441,8 +437,6 @@ pub const Inst = struct {
441437 xadd,
442438 /// Exchange register/memory with register
443439 xchg,
444 /// Get value of extended control register
445 xgetbv,
446440 /// Logical exclusive-or
447441 /// Bitwise logical xor of packed single-precision floating-point values
448442 /// Bitwise logical xor of packed double-precision floating-point values
src/arch/x86_64/encodings.zig-6
......@@ -266,8 +266,6 @@ pub const table = [_]Entry{
266266 .{ .cmpxchg8b, .m, &.{ .m64 }, &.{ 0x0f, 0xc7 }, 1, .none, .none },
267267 .{ .cmpxchg16b, .m, &.{ .m128 }, &.{ 0x0f, 0xc7 }, 1, .long, .none },
268268
269 .{ .cpuid, .np, &.{}, &.{ 0x0f, 0xa2 }, 0, .none, .none },
270
271269 .{ .div, .m, &.{ .rm8 }, &.{ 0xf6 }, 6, .none, .none },
272270 .{ .div, .m, &.{ .rm8 }, &.{ 0xf6 }, 6, .rex, .none },
273271 .{ .div, .m, &.{ .rm16 }, &.{ 0xf7 }, 6, .short, .none },
......@@ -471,8 +469,6 @@ pub const table = [_]Entry{
471469 .{ .@"or", .rm, &.{ .r32, .rm32 }, &.{ 0x0b }, 0, .none, .none },
472470 .{ .@"or", .rm, &.{ .r64, .rm64 }, &.{ 0x0b }, 0, .long, .none },
473471
474 .{ .pause, .np, &.{}, &.{ 0xf3, 0x90 }, 0, .none, .none },
475
476472 .{ .pop, .o, &.{ .r16 }, &.{ 0x58 }, 0, .short, .none },
477473 .{ .pop, .o, &.{ .r64 }, &.{ 0x58 }, 0, .none, .none },
478474 .{ .pop, .m, &.{ .rm16 }, &.{ 0x8f }, 0, .short, .none },
......@@ -809,8 +805,6 @@ pub const table = [_]Entry{
809805 .{ .xchg, .rm, &.{ .r32, .rm32 }, &.{ 0x87 }, 0, .none, .none },
810806 .{ .xchg, .rm, &.{ .r64, .rm64 }, &.{ 0x87 }, 0, .long, .none },
811807
812 .{ .xgetbv, .np, &.{}, &.{ 0x0f, 0x01 }, 0, .none, .none },
813
814808 .{ .xor, .zi, &.{ .al, .imm8 }, &.{ 0x34 }, 0, .none, .none },
815809 .{ .xor, .zi, &.{ .ax, .imm16 }, &.{ 0x35 }, 0, .short, .none },
816810 .{ .xor, .zi, &.{ .eax, .imm32 }, &.{ 0x35 }, 0, .none, .none },
src/codegen.zig+2-2
......@@ -545,7 +545,7 @@ pub fn generateSymbol(
545545
546546 if (layout.payload_size == 0) {
547547 return generateSymbol(bin_file, src_loc, .{
548 .ty = typed_value.ty.unionTagTypeSafety(mod).?,
548 .ty = typed_value.ty.unionTagType(mod).?,
549549 .val = un.tag.toValue(),
550550 }, code, debug_output, reloc_info);
551551 }
......@@ -553,7 +553,7 @@ pub fn generateSymbol(
553553 // Check if we should store the tag first.
554554 if (layout.tag_size > 0 and layout.tag_align.compare(.gte, layout.payload_align)) {
555555 switch (try generateSymbol(bin_file, src_loc, .{
556 .ty = typed_value.ty.unionTagTypeSafety(mod).?,
556 .ty = typed_value.ty.unionTagType(mod).?,
557557 .val = un.tag.toValue(),
558558 }, code, debug_output, reloc_info)) {
559559 .ok => {},
test/behavior/basic.zig+1-1
......@@ -745,12 +745,12 @@ test "auto created variables have correct alignment" {
745745
746746test "extern variable with non-pointer opaque type" {
747747 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
748 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
748749 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
749750 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
750751 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
751752 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
752753 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
753 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
754754
755755 @export(var_to_export, .{ .name = "opaque_extern_var" });
756756 try expect(@as(*align(1) u32, @ptrCast(&opaque_extern_var)).* == 42);
test/behavior/bitcast.zig+1-2
......@@ -411,9 +411,8 @@ test "bitcast nan float does not modify signaling bit" {
411411 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
412412 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
413413 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
414 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
414415 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
415 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
416
417416 // TODO: https://github.com/ziglang/zig/issues/14366
418417 if (builtin.zig_backend == .stage2_llvm and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest;
419418
test/behavior/bugs/6781.zig+1-1
......@@ -64,11 +64,11 @@ pub const JournalHeader = packed struct {
6464test "fixed" {
6565 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
6666 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
67 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
6768 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
6869 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
6970 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
7071 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
71 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
7272
7373 var buffer align(@alignOf(JournalHeader)) = [_]u8{0} ** 65536;
7474 var entry = std.mem.bytesAsValue(JournalHeader, buffer[0..@sizeOf(JournalHeader)]);
test/behavior/bugs/920.zig+1-1
......@@ -57,11 +57,11 @@ const NormalDist = blk: {
5757};
5858
5959test "bug 920 fixed" {
60 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
6061 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
6162 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
6263 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
6364 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
64 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
6565
6666 const NormalDist1 = blk: {
6767 break :blk ZigTableGen(true, norm_r, norm_v, norm_f, norm_f_inv, norm_zero_case);
test/behavior/cast.zig+4-3
......@@ -1606,8 +1606,8 @@ test "peer type resolution: const sentinel slice and mutable non-sentinel slice"
16061606test "peer type resolution: float and comptime-known fixed-width integer" {
16071607 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
16081608 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
1609 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
16091610 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
1610 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
16111611
16121612 const i: u8 = 100;
16131613 var f: f32 = 1.234;
......@@ -2372,7 +2372,7 @@ test "@intFromBool on vector" {
23722372}
23732373
23742374test "numeric coercions with undefined" {
2375 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
2375 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
23762376
23772377 const from: i32 = undefined;
23782378 var to: f32 = from;
......@@ -2383,6 +2383,7 @@ test "numeric coercions with undefined" {
23832383
23842384test "15-bit int to float" {
23852385 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
2386 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
23862387
23872388 var a: u15 = 42;
23882389 var b: f32 = @floatFromInt(a);
......@@ -2390,11 +2391,11 @@ test "15-bit int to float" {
23902391}
23912392
23922393test "@as does not corrupt values with incompatible representations" {
2394 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
23932395 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
23942396 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
23952397 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
23962398 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
2397 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
23982399
23992400 const x: f32 = @as(f16, blk: {
24002401 if (false) {
test/behavior/cast_int.zig+1
......@@ -199,6 +199,7 @@ test "load non byte-sized value in union" {
199199 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
200200 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest;
201201 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
202 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
202203 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
203204
204205 // note: this bug is triggered by the == operator, expectEqual will hide it
test/behavior/fn.zig+1-1
......@@ -425,8 +425,8 @@ test "implicit cast function to function ptr" {
425425 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
426426 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
427427 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
428 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
428429 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
429 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
430430
431431 const S1 = struct {
432432 export fn someFunctionThatReturnsAValue() c_int {
test/behavior/int128.zig+1
......@@ -66,6 +66,7 @@ test "int128" {
6666
6767test "truncate int128" {
6868 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
69 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
6970 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
7071 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
7172 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
test/behavior/packed-struct.zig+2-2
......@@ -659,12 +659,12 @@ test "optional pointer in packed struct" {
659659test "nested packed struct field access test" {
660660 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
661661 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO packed structs larger than 64 bits
662 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
662663 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
663664 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
664665 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
665666 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
666 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
667
667 //
668668 const Vec2 = packed struct {
669669 x: f32,
670670 y: f32,
test/behavior/translate_c_macros.zig+1-1
......@@ -151,11 +151,11 @@ test "string and char literals that are not UTF-8 encoded. Issue #12784" {
151151
152152test "Macro that uses division operator. Issue #13162" {
153153 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
154 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
154155 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
155156 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
156157 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
157158 if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
158 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
159159
160160 try expectEqual(@as(c_int, 42), h.DIVIDE_CONSTANT(@as(c_int, 42_000)));
161161 try expectEqual(@as(c_uint, 42), h.DIVIDE_CONSTANT(@as(c_uint, 42_000)));
test/behavior/tuple.zig+1-1
......@@ -370,8 +370,8 @@ test "tuple initialized with a runtime known value" {
370370test "tuple of struct concatenation and coercion to array" {
371371 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
372372 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
373 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
373374 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
374 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
375375
376376 const StructWithDefault = struct { value: f32 = 42 };
377377 const SomeStruct = struct { array: [4]StructWithDefault };
test/behavior/vector.zig+1-1
......@@ -1329,8 +1329,8 @@ test "store to vector in slice" {
13291329 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
13301330 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
13311331 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
1332 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
13321333 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
1333 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
13341334
13351335 var v = [_]@Vector(3, f32){
13361336 .{ 1, 1, 1 },
test/tests.zig+3-7
......@@ -985,9 +985,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
985985 continue;
986986
987987 // TODO get compiler-rt tests passing for self-hosted backends.
988 if ((test_target.target.getCpuArch() != .x86_64 or
989 test_target.target.getObjectFormat() != .elf) and
990 test_target.use_llvm == false and mem.eql(u8, options.name, "compiler-rt"))
988 if (test_target.use_llvm == false and mem.eql(u8, options.name, "compiler-rt"))
991989 continue;
992990
993991 // TODO get compiler-rt tests passing for wasm32-wasi
......@@ -1004,10 +1002,8 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
10041002 test_target.use_llvm == false and mem.eql(u8, options.name, "universal-libc"))
10051003 continue;
10061004
1007 // TODO get std lib tests passing for other self-hosted backends.
1008 if ((test_target.target.getCpuArch() != .x86_64 or
1009 test_target.target.getObjectFormat() != .elf) and
1010 test_target.use_llvm == false and mem.eql(u8, options.name, "std"))
1005 // TODO get std lib tests passing for self-hosted backends.
1006 if (test_target.use_llvm == false and mem.eql(u8, options.name, "std"))
10111007 continue;
10121008
10131009 const want_this_mode = for (options.optimize_modes) |m| {
tools/lldb_pretty_printers.py+8-19
......@@ -355,28 +355,17 @@ class Module_Decl__Module_Decl_Index_SynthProvider:
355355 def __init__(self, value, _=None): self.value = value
356356 def update(self):
357357 try:
358 ip = InternPool_Find(self.value.thread)
359 if not ip: return
360 self.ptr = ip.GetChildMemberWithName('allocated_decls').GetChildAtIndex(self.value.unsigned).address_of.Clone('decl')
358 for frame in self.value.thread:
359 mod = frame.FindVariable('mod') or frame.FindVariable('module')
360 if mod: break
361 else: return
362 self.ptr = mod.GetChildMemberWithName('allocated_decls').GetChildAtIndex(self.value.unsigned).address_of.Clone('decl')
361363 except: pass
362364 def has_children(self): return True
363365 def num_children(self): return 1
364366 def get_child_index(self, name): return 0 if name == 'decl' else -1
365367 def get_child_at_index(self, index): return self.ptr if index == 0 else None
366368
367class Module_Namespace__Module_Namespace_Index_SynthProvider:
368 def __init__(self, value, _=None): self.value = value
369 def update(self):
370 try:
371 ip = InternPool_Find(self.value.thread)
372 if not ip: return
373 self.ptr = ip.GetChildMemberWithName('allocated_namespaces').GetChildAtIndex(self.value.unsigned).address_of.Clone('namespace')
374 except: pass
375 def has_children(self): return True
376 def num_children(self): return 1
377 def get_child_index(self, name): return 0 if name == 'namespace' else -1
378 def get_child_at_index(self, index): return self.ptr if index == 0 else None
379
380369class TagOrPayloadPtr_SynthProvider:
381370 def __init__(self, value, _=None): self.value = value
382371 def update(self):
......@@ -451,9 +440,10 @@ class InternPool_Index_SynthProvider:
451440 for encoding_field in encoding_type.fields:
452441 if encoding_field.name == 'data':
453442 if encoding_field.type.IsPointerType():
443 data_type = encoding_field.type.GetPointeeType()
454444 extra_index = data.unsigned
455 self.data = extra.GetChildAtIndex(extra_index).address_of.Cast(encoding_field.type).deref.Clone('data')
456 extra_index += encoding_field.type.GetPointeeType().num_fields
445 self.data = extra.GetChildAtIndex(extra_index).Cast(data_type).Clone('data')
446 extra_index += data_type.num_fields
457447 else:
458448 self.data = data.Cast(encoding_field.type).Clone('data')
459449 elif encoding_field.name == 'trailing':
......@@ -710,7 +700,6 @@ def __lldb_init_module(debugger, _=None):
710700 add(debugger, category='zig.stage2', regex=True, type=MultiArrayList_Entry('Air\\.Inst'), identifier='TagAndPayload', synth=True, inline_children=True, summary=True)
711701 add(debugger, category='zig.stage2', regex=True, type='^Air\\.Inst\\.Data\\.Data__struct_[1-9][0-9]*$', inline_children=True, summary=True)
712702 add(debugger, category='zig.stage2', type='Module.Decl::Module.Decl.Index', synth=True)
713 add(debugger, category='zig.stage2', type='Module.Namespace::Module.Namespace.Index', synth=True)
714703 add(debugger, category='zig.stage2', type='Module.LazySrcLoc', identifier='zig_TaggedUnion', synth=True)
715704 add(debugger, category='zig.stage2', type='InternPool.Index', synth=True)
716705 add(debugger, category='zig.stage2', type='InternPool.NullTerminatedString', summary=True)