authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-10-27 01:39:06-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-10-27 01:40:27-04:00
log434a7db986d1ffd2d1e6b7d4bb69873ed05c7980
treef924dd3a3017b2870e21eb1157471784e9364f35
parent6ad22cd964741ec646eb551877591d719e0c41f5

x86_64: add missing spill


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

lib/std/zig/parser_test.zig-302
...@@ -26,8 +26,6 @@ test "zig fmt: tuple struct" {...@@ -26,8 +26,6 @@ test "zig fmt: tuple struct" {
26}26}
2727
28test "zig fmt: preserves clobbers in inline asm with stray comma" {28test "zig fmt: preserves clobbers in inline asm with stray comma" {
29 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
30
31 try testCanonical(29 try testCanonical(
32 \\fn foo() void {30 \\fn foo() void {
33 \\ asm volatile (""31 \\ asm volatile (""
...@@ -46,8 +44,6 @@ test "zig fmt: preserves clobbers in inline asm with stray comma" {...@@ -46,8 +44,6 @@ test "zig fmt: preserves clobbers in inline asm with stray comma" {
46}44}
4745
48test "zig fmt: remove trailing comma at the end of assembly clobber" {46test "zig fmt: remove trailing comma at the end of assembly clobber" {
49 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
50
51 try testTransform(47 try testTransform(
52 \\fn foo() void {48 \\fn foo() void {
53 \\ asm volatile (""49 \\ asm volatile (""
...@@ -70,8 +66,6 @@ test "zig fmt: remove trailing comma at the end of assembly clobber" {...@@ -70,8 +66,6 @@ test "zig fmt: remove trailing comma at the end of assembly clobber" {
70}66}
7167
72test "zig fmt: respect line breaks in struct field value declaration" {68test "zig fmt: respect line breaks in struct field value declaration" {
73 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
74
75 try testCanonical(69 try testCanonical(
76 \\const Foo = struct {70 \\const Foo = struct {
77 \\ bar: u32 =71 \\ bar: u32 =
...@@ -226,8 +220,6 @@ test "zig fmt: file ends in comment after var decl" {...@@ -226,8 +220,6 @@ test "zig fmt: file ends in comment after var decl" {
226}220}
227221
228test "zig fmt: if statement" {222test "zig fmt: if statement" {
229 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
230
231 try testCanonical(223 try testCanonical(
232 \\test "" {224 \\test "" {
233 \\ if (optional()) |some|225 \\ if (optional()) |some|
...@@ -326,8 +318,6 @@ test "zig fmt: decl between fields" {...@@ -326,8 +318,6 @@ test "zig fmt: decl between fields" {
326}318}
327319
328test "zig fmt: errdefer with payload" {320test "zig fmt: errdefer with payload" {
329 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
330
331 try testCanonical(321 try testCanonical(
332 \\pub fn main() anyerror!void {322 \\pub fn main() anyerror!void {
333 \\ errdefer |a| x += 1;323 \\ errdefer |a| x += 1;
...@@ -341,8 +331,6 @@ test "zig fmt: errdefer with payload" {...@@ -341,8 +331,6 @@ test "zig fmt: errdefer with payload" {
341}331}
342332
343test "zig fmt: nosuspend block" {333test "zig fmt: nosuspend block" {
344 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
345
346 try testCanonical(334 try testCanonical(
347 \\pub fn main() anyerror!void {335 \\pub fn main() anyerror!void {
348 \\ nosuspend {336 \\ nosuspend {
...@@ -354,8 +342,6 @@ test "zig fmt: nosuspend block" {...@@ -354,8 +342,6 @@ test "zig fmt: nosuspend block" {
354}342}
355343
356test "zig fmt: nosuspend await" {344test "zig fmt: nosuspend await" {
357 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
358
359 try testCanonical(345 try testCanonical(
360 \\fn foo() void {346 \\fn foo() void {
361 \\ x = nosuspend await y;347 \\ x = nosuspend await y;
...@@ -376,8 +362,6 @@ test "zig fmt: container declaration, single line" {...@@ -376,8 +362,6 @@ test "zig fmt: container declaration, single line" {
376}362}
377363
378test "zig fmt: container declaration, one item, multi line trailing comma" {364test "zig fmt: container declaration, one item, multi line trailing comma" {
379 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
380
381 try testCanonical(365 try testCanonical(
382 \\test "" {366 \\test "" {
383 \\ comptime {367 \\ comptime {
...@@ -391,8 +375,6 @@ test "zig fmt: container declaration, one item, multi line trailing comma" {...@@ -391,8 +375,6 @@ test "zig fmt: container declaration, one item, multi line trailing comma" {
391}375}
392376
393test "zig fmt: container declaration, no trailing comma on separate line" {377test "zig fmt: container declaration, no trailing comma on separate line" {
394 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
395
396 try testTransform(378 try testTransform(
397 \\test "" {379 \\test "" {
398 \\ comptime {380 \\ comptime {
...@@ -519,8 +501,6 @@ test "zig fmt: remove empty lines at start/end of container decl" {...@@ -519,8 +501,6 @@ test "zig fmt: remove empty lines at start/end of container decl" {
519}501}
520502
521test "zig fmt: remove empty lines at start/end of block" {503test "zig fmt: remove empty lines at start/end of block" {
522 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
523
524 try testTransform(504 try testTransform(
525 \\test {505 \\test {
526 \\506 \\
...@@ -541,8 +521,6 @@ test "zig fmt: remove empty lines at start/end of block" {...@@ -541,8 +521,6 @@ test "zig fmt: remove empty lines at start/end of block" {
541}521}
542522
543test "zig fmt: allow empty line before comment at start of block" {523test "zig fmt: allow empty line before comment at start of block" {
544 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
545
546 try testCanonical(524 try testCanonical(
547 \\test {525 \\test {
548 \\526 \\
...@@ -606,8 +584,6 @@ test "zig fmt: comptime struct field" {...@@ -606,8 +584,6 @@ test "zig fmt: comptime struct field" {
606}584}
607585
608test "zig fmt: break from block" {586test "zig fmt: break from block" {
609 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
610
611 try testCanonical(587 try testCanonical(
612 \\const a = blk: {588 \\const a = blk: {
613 \\ break :blk 42;589 \\ break :blk 42;
...@@ -640,8 +616,6 @@ test "zig fmt: c pointer type" {...@@ -640,8 +616,6 @@ test "zig fmt: c pointer type" {
640}616}
641617
642test "zig fmt: builtin call with trailing comma" {618test "zig fmt: builtin call with trailing comma" {
643 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
644
645 try testCanonical(619 try testCanonical(
646 \\pub fn main() void {620 \\pub fn main() void {
647 \\ @breakpoint();621 \\ @breakpoint();
...@@ -657,8 +631,6 @@ test "zig fmt: builtin call with trailing comma" {...@@ -657,8 +631,6 @@ test "zig fmt: builtin call with trailing comma" {
657}631}
658632
659test "zig fmt: asm expression with comptime content" {633test "zig fmt: asm expression with comptime content" {
660 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
661
662 try testCanonical(634 try testCanonical(
663 \\comptime {635 \\comptime {
664 \\ asm ("foo" ++ "bar");636 \\ asm ("foo" ++ "bar");
...@@ -683,8 +655,6 @@ test "zig fmt: asm expression with comptime content" {...@@ -683,8 +655,6 @@ test "zig fmt: asm expression with comptime content" {
683}655}
684656
685test "zig fmt: array types last token" {657test "zig fmt: array types last token" {
686 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
687
688 try testCanonical(658 try testCanonical(
689 \\test {659 \\test {
690 \\ const x = [40]u32;660 \\ const x = [40]u32;
...@@ -698,8 +668,6 @@ test "zig fmt: array types last token" {...@@ -698,8 +668,6 @@ test "zig fmt: array types last token" {
698}668}
699669
700test "zig fmt: sentinel-terminated array type" {670test "zig fmt: sentinel-terminated array type" {
701 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
702
703 try testCanonical(671 try testCanonical(
704 \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 {672 \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 {
705 \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s));673 \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s));
...@@ -709,8 +677,6 @@ test "zig fmt: sentinel-terminated array type" {...@@ -709,8 +677,6 @@ test "zig fmt: sentinel-terminated array type" {
709}677}
710678
711test "zig fmt: sentinel-terminated slice type" {679test "zig fmt: sentinel-terminated slice type" {
712 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
713
714 try testCanonical(680 try testCanonical(
715 \\pub fn toSlice(self: Buffer) [:0]u8 {681 \\pub fn toSlice(self: Buffer) [:0]u8 {
716 \\ return self.list.toSlice()[0..self.len()];682 \\ return self.list.toSlice()[0..self.len()];
...@@ -802,8 +768,6 @@ test "zig fmt: alignment in anonymous literal" {...@@ -802,8 +768,6 @@ test "zig fmt: alignment in anonymous literal" {
802}768}
803769
804test "zig fmt: anon struct literal 0 element" {770test "zig fmt: anon struct literal 0 element" {
805 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
806
807 try testCanonical(771 try testCanonical(
808 \\test {772 \\test {
809 \\ const x = .{};773 \\ const x = .{};
...@@ -813,8 +777,6 @@ test "zig fmt: anon struct literal 0 element" {...@@ -813,8 +777,6 @@ test "zig fmt: anon struct literal 0 element" {
813}777}
814778
815test "zig fmt: anon struct literal 1 element" {779test "zig fmt: anon struct literal 1 element" {
816 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
817
818 try testCanonical(780 try testCanonical(
819 \\test {781 \\test {
820 \\ const x = .{ .a = b };782 \\ const x = .{ .a = b };
...@@ -824,8 +786,6 @@ test "zig fmt: anon struct literal 1 element" {...@@ -824,8 +786,6 @@ test "zig fmt: anon struct literal 1 element" {
824}786}
825787
826test "zig fmt: anon struct literal 1 element comma" {788test "zig fmt: anon struct literal 1 element comma" {
827 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
828
829 try testCanonical(789 try testCanonical(
830 \\test {790 \\test {
831 \\ const x = .{791 \\ const x = .{
...@@ -837,8 +797,6 @@ test "zig fmt: anon struct literal 1 element comma" {...@@ -837,8 +797,6 @@ test "zig fmt: anon struct literal 1 element comma" {
837}797}
838798
839test "zig fmt: anon struct literal 2 element" {799test "zig fmt: anon struct literal 2 element" {
840 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
841
842 try testCanonical(800 try testCanonical(
843 \\test {801 \\test {
844 \\ const x = .{ .a = b, .c = d };802 \\ const x = .{ .a = b, .c = d };
...@@ -848,8 +806,6 @@ test "zig fmt: anon struct literal 2 element" {...@@ -848,8 +806,6 @@ test "zig fmt: anon struct literal 2 element" {
848}806}
849807
850test "zig fmt: anon struct literal 2 element comma" {808test "zig fmt: anon struct literal 2 element comma" {
851 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
852
853 try testCanonical(809 try testCanonical(
854 \\test {810 \\test {
855 \\ const x = .{811 \\ const x = .{
...@@ -862,8 +818,6 @@ test "zig fmt: anon struct literal 2 element comma" {...@@ -862,8 +818,6 @@ test "zig fmt: anon struct literal 2 element comma" {
862}818}
863819
864test "zig fmt: anon struct literal 3 element" {820test "zig fmt: anon struct literal 3 element" {
865 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
866
867 try testCanonical(821 try testCanonical(
868 \\test {822 \\test {
869 \\ const x = .{ .a = b, .c = d, .e = f };823 \\ const x = .{ .a = b, .c = d, .e = f };
...@@ -873,8 +827,6 @@ test "zig fmt: anon struct literal 3 element" {...@@ -873,8 +827,6 @@ test "zig fmt: anon struct literal 3 element" {
873}827}
874828
875test "zig fmt: anon struct literal 3 element comma" {829test "zig fmt: anon struct literal 3 element comma" {
876 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
877
878 try testCanonical(830 try testCanonical(
879 \\test {831 \\test {
880 \\ const x = .{832 \\ const x = .{
...@@ -888,8 +840,6 @@ test "zig fmt: anon struct literal 3 element comma" {...@@ -888,8 +840,6 @@ test "zig fmt: anon struct literal 3 element comma" {
888}840}
889841
890test "zig fmt: struct literal 0 element" {842test "zig fmt: struct literal 0 element" {
891 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
892
893 try testCanonical(843 try testCanonical(
894 \\test {844 \\test {
895 \\ const x = X{};845 \\ const x = X{};
...@@ -899,8 +849,6 @@ test "zig fmt: struct literal 0 element" {...@@ -899,8 +849,6 @@ test "zig fmt: struct literal 0 element" {
899}849}
900850
901test "zig fmt: struct literal 1 element" {851test "zig fmt: struct literal 1 element" {
902 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
903
904 try testCanonical(852 try testCanonical(
905 \\test {853 \\test {
906 \\ const x = X{ .a = b };854 \\ const x = X{ .a = b };
...@@ -910,8 +858,6 @@ test "zig fmt: struct literal 1 element" {...@@ -910,8 +858,6 @@ test "zig fmt: struct literal 1 element" {
910}858}
911859
912test "zig fmt: Unicode code point literal larger than u8" {860test "zig fmt: Unicode code point literal larger than u8" {
913 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
914
915 try testCanonical(861 try testCanonical(
916 \\test {862 \\test {
917 \\ const x = X{863 \\ const x = X{
...@@ -923,8 +869,6 @@ test "zig fmt: Unicode code point literal larger than u8" {...@@ -923,8 +869,6 @@ test "zig fmt: Unicode code point literal larger than u8" {
923}869}
924870
925test "zig fmt: struct literal 2 element" {871test "zig fmt: struct literal 2 element" {
926 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
927
928 try testCanonical(872 try testCanonical(
929 \\test {873 \\test {
930 \\ const x = X{ .a = b, .c = d };874 \\ const x = X{ .a = b, .c = d };
...@@ -934,8 +878,6 @@ test "zig fmt: struct literal 2 element" {...@@ -934,8 +878,6 @@ test "zig fmt: struct literal 2 element" {
934}878}
935879
936test "zig fmt: struct literal 2 element comma" {880test "zig fmt: struct literal 2 element comma" {
937 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
938
939 try testCanonical(881 try testCanonical(
940 \\test {882 \\test {
941 \\ const x = X{883 \\ const x = X{
...@@ -948,8 +890,6 @@ test "zig fmt: struct literal 2 element comma" {...@@ -948,8 +890,6 @@ test "zig fmt: struct literal 2 element comma" {
948}890}
949891
950test "zig fmt: struct literal 3 element" {892test "zig fmt: struct literal 3 element" {
951 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
952
953 try testCanonical(893 try testCanonical(
954 \\test {894 \\test {
955 \\ const x = X{ .a = b, .c = d, .e = f };895 \\ const x = X{ .a = b, .c = d, .e = f };
...@@ -959,8 +899,6 @@ test "zig fmt: struct literal 3 element" {...@@ -959,8 +899,6 @@ test "zig fmt: struct literal 3 element" {
959}899}
960900
961test "zig fmt: struct literal 3 element comma" {901test "zig fmt: struct literal 3 element comma" {
962 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
963
964 try testCanonical(902 try testCanonical(
965 \\test {903 \\test {
966 \\ const x = X{904 \\ const x = X{
...@@ -974,8 +912,6 @@ test "zig fmt: struct literal 3 element comma" {...@@ -974,8 +912,6 @@ test "zig fmt: struct literal 3 element comma" {
974}912}
975913
976test "zig fmt: anon list literal 1 element" {914test "zig fmt: anon list literal 1 element" {
977 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
978
979 try testCanonical(915 try testCanonical(
980 \\test {916 \\test {
981 \\ const x = .{a};917 \\ const x = .{a};
...@@ -996,8 +932,6 @@ test "zig fmt: anon list literal 1 element comma" {...@@ -996,8 +932,6 @@ test "zig fmt: anon list literal 1 element comma" {
996}932}
997933
998test "zig fmt: anon list literal 2 element" {934test "zig fmt: anon list literal 2 element" {
999 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1000
1001 try testCanonical(935 try testCanonical(
1002 \\test {936 \\test {
1003 \\ const x = .{ a, b };937 \\ const x = .{ a, b };
...@@ -1019,8 +953,6 @@ test "zig fmt: anon list literal 2 element comma" {...@@ -1019,8 +953,6 @@ test "zig fmt: anon list literal 2 element comma" {
1019}953}
1020954
1021test "zig fmt: anon list literal 3 element" {955test "zig fmt: anon list literal 3 element" {
1022 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1023
1024 try testCanonical(956 try testCanonical(
1025 \\test {957 \\test {
1026 \\ const x = .{ a, b, c };958 \\ const x = .{ a, b, c };
...@@ -1045,8 +977,6 @@ test "zig fmt: anon list literal 3 element comma" {...@@ -1045,8 +977,6 @@ test "zig fmt: anon list literal 3 element comma" {
1045}977}
1046978
1047test "zig fmt: array literal 0 element" {979test "zig fmt: array literal 0 element" {
1048 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1049
1050 try testCanonical(980 try testCanonical(
1051 \\test {981 \\test {
1052 \\ const x = [_]u32{};982 \\ const x = [_]u32{};
...@@ -1056,8 +986,6 @@ test "zig fmt: array literal 0 element" {...@@ -1056,8 +986,6 @@ test "zig fmt: array literal 0 element" {
1056}986}
1057987
1058test "zig fmt: array literal 1 element" {988test "zig fmt: array literal 1 element" {
1059 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1060
1061 try testCanonical(989 try testCanonical(
1062 \\test {990 \\test {
1063 \\ const x = [_]u32{a};991 \\ const x = [_]u32{a};
...@@ -1078,8 +1006,6 @@ test "zig fmt: array literal 1 element comma" {...@@ -1078,8 +1006,6 @@ test "zig fmt: array literal 1 element comma" {
1078}1006}
10791007
1080test "zig fmt: array literal 2 element" {1008test "zig fmt: array literal 2 element" {
1081 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1082
1083 try testCanonical(1009 try testCanonical(
1084 \\test {1010 \\test {
1085 \\ const x = [_]u32{ a, b };1011 \\ const x = [_]u32{ a, b };
...@@ -1101,8 +1027,6 @@ test "zig fmt: array literal 2 element comma" {...@@ -1101,8 +1027,6 @@ test "zig fmt: array literal 2 element comma" {
1101}1027}
11021028
1103test "zig fmt: array literal 3 element" {1029test "zig fmt: array literal 3 element" {
1104 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1105
1106 try testCanonical(1030 try testCanonical(
1107 \\test {1031 \\test {
1108 \\ const x = [_]u32{ a, b, c };1032 \\ const x = [_]u32{ a, b, c };
...@@ -1125,8 +1049,6 @@ test "zig fmt: array literal 3 element comma" {...@@ -1125,8 +1049,6 @@ test "zig fmt: array literal 3 element comma" {
1125}1049}
11261050
1127test "zig fmt: sentinel array literal 1 element" {1051test "zig fmt: sentinel array literal 1 element" {
1128 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1129
1130 try testCanonical(1052 try testCanonical(
1131 \\test {1053 \\test {
1132 \\ const x = [_:9000]u32{a};1054 \\ const x = [_:9000]u32{a};
...@@ -1156,8 +1078,6 @@ test "zig fmt: slices with spaces in bounds" {...@@ -1156,8 +1078,6 @@ test "zig fmt: slices with spaces in bounds" {
1156}1078}
11571079
1158test "zig fmt: block in slice expression" {1080test "zig fmt: block in slice expression" {
1159 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1160
1161 try testCanonical(1081 try testCanonical(
1162 \\const a = b[{1082 \\const a = b[{
1163 \\ _ = x;1083 \\ _ = x;
...@@ -1176,8 +1096,6 @@ test "zig fmt: block in slice expression" {...@@ -1176,8 +1096,6 @@ test "zig fmt: block in slice expression" {
1176}1096}
11771097
1178test "zig fmt: async function" {1098test "zig fmt: async function" {
1179 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1180
1181 try testCanonical(1099 try testCanonical(
1182 \\pub const Server = struct {1100 \\pub const Server = struct {
1183 \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.Async) void,1101 \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.Async) void,
...@@ -1190,8 +1108,6 @@ test "zig fmt: async function" {...@@ -1190,8 +1108,6 @@ test "zig fmt: async function" {
1190}1108}
11911109
1192test "zig fmt: whitespace fixes" {1110test "zig fmt: whitespace fixes" {
1193 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1194
1195 try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n",1111 try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n",
1196 \\test "" {1112 \\test "" {
1197 \\ const hi = x;1113 \\ const hi = x;
...@@ -1204,8 +1120,6 @@ test "zig fmt: whitespace fixes" {...@@ -1204,8 +1120,6 @@ test "zig fmt: whitespace fixes" {
1204}1120}
12051121
1206test "zig fmt: while else err prong with no block" {1122test "zig fmt: while else err prong with no block" {
1207 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1208
1209 try testCanonical(1123 try testCanonical(
1210 \\test "" {1124 \\test "" {
1211 \\ const result = while (returnError()) |value| {1125 \\ const result = while (returnError()) |value| {
...@@ -1235,8 +1149,6 @@ test "zig fmt: tagged union with enum values" {...@@ -1235,8 +1149,6 @@ test "zig fmt: tagged union with enum values" {
1235}1149}
12361150
1237test "zig fmt: tagged union enum tag last token" {1151test "zig fmt: tagged union enum tag last token" {
1238 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1239
1240 try testCanonical(1152 try testCanonical(
1241 \\test {1153 \\test {
1242 \\ const U = union(enum(u32)) {};1154 \\ const U = union(enum(u32)) {};
...@@ -1572,8 +1484,6 @@ test "zig fmt: doc and line comment following 'zig fmt: on'" {...@@ -1572,8 +1484,6 @@ test "zig fmt: doc and line comment following 'zig fmt: on'" {
1572}1484}
15731485
1574test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" {1486test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" {
1575 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1576
1577 try testTransform(1487 try testTransform(
1578 \\test "" {1488 \\test "" {
1579 \\ const x = 42;1489 \\ const x = 42;
...@@ -1600,8 +1510,6 @@ test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" {...@@ -1600,8 +1510,6 @@ test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" {
1600}1510}
16011511
1602test "zig fmt: 'zig fmt: on' indentation is unchanged" {1512test "zig fmt: 'zig fmt: on' indentation is unchanged" {
1603 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1604
1605 try testCanonical(1513 try testCanonical(
1606 \\fn initOptionsAndLayouts(output: *Output, context: *Context) !void {1514 \\fn initOptionsAndLayouts(output: *Output, context: *Context) !void {
1607 \\ // zig fmt: off1515 \\ // zig fmt: off
...@@ -1644,8 +1552,6 @@ test "zig fmt: spaces around slice operator" {...@@ -1644,8 +1552,6 @@ test "zig fmt: spaces around slice operator" {
1644}1552}
16451553
1646test "zig fmt: async call in if condition" {1554test "zig fmt: async call in if condition" {
1647 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1648
1649 try testCanonical(1555 try testCanonical(
1650 \\comptime {1556 \\comptime {
1651 \\ if (async b()) {1557 \\ if (async b()) {
...@@ -1657,8 +1563,6 @@ test "zig fmt: async call in if condition" {...@@ -1657,8 +1563,6 @@ test "zig fmt: async call in if condition" {
1657}1563}
16581564
1659test "zig fmt: 2nd arg multiline string" {1565test "zig fmt: 2nd arg multiline string" {
1660 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1661
1662 try testCanonical(1566 try testCanonical(
1663 \\comptime {1567 \\comptime {
1664 \\ cases.addAsm("hello world linux x86_64",1568 \\ cases.addAsm("hello world linux x86_64",
...@@ -1687,8 +1591,6 @@ test "zig fmt: 2nd arg multiline string" {...@@ -1687,8 +1591,6 @@ test "zig fmt: 2nd arg multiline string" {
1687}1591}
16881592
1689test "zig fmt: 2nd arg multiline string many args" {1593test "zig fmt: 2nd arg multiline string many args" {
1690 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1691
1692 try testCanonical(1594 try testCanonical(
1693 \\comptime {1595 \\comptime {
1694 \\ cases.addAsm("hello world linux x86_64",1596 \\ cases.addAsm("hello world linux x86_64",
...@@ -1700,8 +1602,6 @@ test "zig fmt: 2nd arg multiline string many args" {...@@ -1700,8 +1602,6 @@ test "zig fmt: 2nd arg multiline string many args" {
1700}1602}
17011603
1702test "zig fmt: final arg multiline string" {1604test "zig fmt: final arg multiline string" {
1703 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1704
1705 try testCanonical(1605 try testCanonical(
1706 \\comptime {1606 \\comptime {
1707 \\ cases.addAsm("hello world linux x86_64", "Hello, world!\n",1607 \\ cases.addAsm("hello world linux x86_64", "Hello, world!\n",
...@@ -1713,8 +1613,6 @@ test "zig fmt: final arg multiline string" {...@@ -1713,8 +1613,6 @@ test "zig fmt: final arg multiline string" {
1713}1613}
17141614
1715test "zig fmt: if condition wraps" {1615test "zig fmt: if condition wraps" {
1716 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1717
1718 try testTransform(1616 try testTransform(
1719 \\comptime {1617 \\comptime {
1720 \\ if (cond and1618 \\ if (cond and
...@@ -1796,8 +1694,6 @@ test "zig fmt: if condition wraps" {...@@ -1796,8 +1694,6 @@ test "zig fmt: if condition wraps" {
1796}1694}
17971695
1798test "zig fmt: if condition has line break but must not wrap" {1696test "zig fmt: if condition has line break but must not wrap" {
1799 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1800
1801 try testCanonical(1697 try testCanonical(
1802 \\comptime {1698 \\comptime {
1803 \\ if (self.user_input_options.put(1699 \\ if (self.user_input_options.put(
...@@ -1822,8 +1718,6 @@ test "zig fmt: if condition has line break but must not wrap" {...@@ -1822,8 +1718,6 @@ test "zig fmt: if condition has line break but must not wrap" {
1822}1718}
18231719
1824test "zig fmt: if condition has line break but must not wrap (no fn call comma)" {1720test "zig fmt: if condition has line break but must not wrap (no fn call comma)" {
1825 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1826
1827 try testCanonical(1721 try testCanonical(
1828 \\comptime {1722 \\comptime {
1829 \\ if (self.user_input_options.put(name, UserInputOption{1723 \\ if (self.user_input_options.put(name, UserInputOption{
...@@ -1845,8 +1739,6 @@ test "zig fmt: if condition has line break but must not wrap (no fn call comma)"...@@ -1845,8 +1739,6 @@ test "zig fmt: if condition has line break but must not wrap (no fn call comma)"
1845}1739}
18461740
1847test "zig fmt: function call with multiline argument" {1741test "zig fmt: function call with multiline argument" {
1848 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1849
1850 try testCanonical(1742 try testCanonical(
1851 \\comptime {1743 \\comptime {
1852 \\ self.user_input_options.put(name, UserInputOption{1744 \\ self.user_input_options.put(name, UserInputOption{
...@@ -1859,8 +1751,6 @@ test "zig fmt: function call with multiline argument" {...@@ -1859,8 +1751,6 @@ test "zig fmt: function call with multiline argument" {
1859}1751}
18601752
1861test "zig fmt: if-else with comment before else" {1753test "zig fmt: if-else with comment before else" {
1862 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1863
1864 try testCanonical(1754 try testCanonical(
1865 \\comptime {1755 \\comptime {
1866 \\ // cexp(finite|nan +- i inf|nan) = nan + i nan1756 \\ // cexp(finite|nan +- i inf|nan) = nan + i nan
...@@ -1879,8 +1769,6 @@ test "zig fmt: if-else with comment before else" {...@@ -1879,8 +1769,6 @@ test "zig fmt: if-else with comment before else" {
1879}1769}
18801770
1881test "zig fmt: if nested" {1771test "zig fmt: if nested" {
1882 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1883
1884 try testCanonical(1772 try testCanonical(
1885 \\pub fn foo() void {1773 \\pub fn foo() void {
1886 \\ return if ((aInt & bInt) >= 0)1774 \\ return if ((aInt & bInt) >= 0)
...@@ -1904,8 +1792,6 @@ test "zig fmt: if nested" {...@@ -1904,8 +1792,6 @@ test "zig fmt: if nested" {
1904}1792}
19051793
1906test "zig fmt: respect line breaks in if-else" {1794test "zig fmt: respect line breaks in if-else" {
1907 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1908
1909 try testCanonical(1795 try testCanonical(
1910 \\comptime {1796 \\comptime {
1911 \\ return if (cond) a else b;1797 \\ return if (cond) a else b;
...@@ -1925,8 +1811,6 @@ test "zig fmt: respect line breaks in if-else" {...@@ -1925,8 +1811,6 @@ test "zig fmt: respect line breaks in if-else" {
1925}1811}
19261812
1927test "zig fmt: respect line breaks after infix operators" {1813test "zig fmt: respect line breaks after infix operators" {
1928 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1929
1930 try testCanonical(1814 try testCanonical(
1931 \\comptime {1815 \\comptime {
1932 \\ self.crc =1816 \\ self.crc =
...@@ -1990,8 +1874,6 @@ test "zig fmt: switch comment after prong" {...@@ -1990,8 +1874,6 @@ test "zig fmt: switch comment after prong" {
1990}1874}
19911875
1992test "zig fmt: struct literal no trailing comma" {1876test "zig fmt: struct literal no trailing comma" {
1993 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1994
1995 try testTransform(1877 try testTransform(
1996 \\const a = foo{ .x = 1, .y = 2 };1878 \\const a = foo{ .x = 1, .y = 2 };
1997 \\const a = foo{ .x = 1,1879 \\const a = foo{ .x = 1,
...@@ -2010,8 +1892,6 @@ test "zig fmt: struct literal no trailing comma" {...@@ -2010,8 +1892,6 @@ test "zig fmt: struct literal no trailing comma" {
2010}1892}
20111893
2012test "zig fmt: struct literal containing a multiline expression" {1894test "zig fmt: struct literal containing a multiline expression" {
2013 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2014
2015 try testTransform(1895 try testTransform(
2016 \\const a = A{ .x = if (f1()) 10 else 20 };1896 \\const a = A{ .x = if (f1()) 10 else 20 };
2017 \\const a = A{ .x = if (f1()) 10 else 20, };1897 \\const a = A{ .x = if (f1()) 10 else 20, };
...@@ -2201,8 +2081,6 @@ test "zig fmt: array literal vertical column alignment" {...@@ -2201,8 +2081,6 @@ test "zig fmt: array literal vertical column alignment" {
2201}2081}
22022082
2203test "zig fmt: multiline string with backslash at end of line" {2083test "zig fmt: multiline string with backslash at end of line" {
2204 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2205
2206 try testCanonical(2084 try testCanonical(
2207 \\comptime {2085 \\comptime {
2208 \\ err(2086 \\ err(
...@@ -2234,8 +2112,6 @@ test "zig fmt: multiline string parameter in fn call with trailing comma" {...@@ -2234,8 +2112,6 @@ test "zig fmt: multiline string parameter in fn call with trailing comma" {
2234}2112}
22352113
2236test "zig fmt: trailing comma on fn call" {2114test "zig fmt: trailing comma on fn call" {
2237 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2238
2239 try testCanonical(2115 try testCanonical(
2240 \\comptime {2116 \\comptime {
2241 \\ var module = try Module.create(2117 \\ var module = try Module.create(
...@@ -2249,8 +2125,6 @@ test "zig fmt: trailing comma on fn call" {...@@ -2249,8 +2125,6 @@ test "zig fmt: trailing comma on fn call" {
2249}2125}
22502126
2251test "zig fmt: multi line arguments without last comma" {2127test "zig fmt: multi line arguments without last comma" {
2252 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2253
2254 try testTransform(2128 try testTransform(
2255 \\pub fn foo(2129 \\pub fn foo(
2256 \\ a: usize,2130 \\ a: usize,
...@@ -2312,8 +2186,6 @@ test "zig fmt: extra newlines at the end" {...@@ -2312,8 +2186,6 @@ test "zig fmt: extra newlines at the end" {
2312}2186}
23132187
2314test "zig fmt: simple asm" {2188test "zig fmt: simple asm" {
2315 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2316
2317 try testTransform(2189 try testTransform(
2318 \\comptime {2190 \\comptime {
2319 \\ asm volatile (2191 \\ asm volatile (
...@@ -2351,8 +2223,6 @@ test "zig fmt: simple asm" {...@@ -2351,8 +2223,6 @@ test "zig fmt: simple asm" {
2351}2223}
23522224
2353test "zig fmt: nested struct literal with one item" {2225test "zig fmt: nested struct literal with one item" {
2354 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2355
2356 try testCanonical(2226 try testCanonical(
2357 \\const a = foo{2227 \\const a = foo{
2358 \\ .item = bar{ .a = b },2228 \\ .item = bar{ .a = b },
...@@ -2439,8 +2309,6 @@ test "zig fmt: line comment after doc comment" {...@@ -2439,8 +2309,6 @@ test "zig fmt: line comment after doc comment" {
2439}2309}
24402310
2441test "zig fmt: bit field alignment" {2311test "zig fmt: bit field alignment" {
2442 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2443
2444 try testCanonical(2312 try testCanonical(
2445 \\test {2313 \\test {
2446 \\ assert(@TypeOf(&blah.b) == *align(1:3:6) const u3);2314 \\ assert(@TypeOf(&blah.b) == *align(1:3:6) const u3);
...@@ -2472,8 +2340,6 @@ test "zig fmt: float literal with exponent" {...@@ -2472,8 +2340,6 @@ test "zig fmt: float literal with exponent" {
2472}2340}
24732341
2474test "zig fmt: if-else end of comptime" {2342test "zig fmt: if-else end of comptime" {
2475 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2476
2477 try testCanonical(2343 try testCanonical(
2478 \\comptime {2344 \\comptime {
2479 \\ if (a) {2345 \\ if (a) {
...@@ -2487,8 +2353,6 @@ test "zig fmt: if-else end of comptime" {...@@ -2487,8 +2353,6 @@ test "zig fmt: if-else end of comptime" {
2487}2353}
24882354
2489test "zig fmt: nested blocks" {2355test "zig fmt: nested blocks" {
2490 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2491
2492 try testCanonical(2356 try testCanonical(
2493 \\comptime {2357 \\comptime {
2494 \\ {2358 \\ {
...@@ -2504,8 +2368,6 @@ test "zig fmt: nested blocks" {...@@ -2504,8 +2368,6 @@ test "zig fmt: nested blocks" {
2504}2368}
25052369
2506test "zig fmt: block with same line comment after end brace" {2370test "zig fmt: block with same line comment after end brace" {
2507 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2508
2509 try testCanonical(2371 try testCanonical(
2510 \\comptime {2372 \\comptime {
2511 \\ {2373 \\ {
...@@ -2517,8 +2379,6 @@ test "zig fmt: block with same line comment after end brace" {...@@ -2517,8 +2379,6 @@ test "zig fmt: block with same line comment after end brace" {
2517}2379}
25182380
2519test "zig fmt: statements with comment between" {2381test "zig fmt: statements with comment between" {
2520 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2521
2522 try testCanonical(2382 try testCanonical(
2523 \\comptime {2383 \\comptime {
2524 \\ a = b;2384 \\ a = b;
...@@ -2530,8 +2390,6 @@ test "zig fmt: statements with comment between" {...@@ -2530,8 +2390,6 @@ test "zig fmt: statements with comment between" {
2530}2390}
25312391
2532test "zig fmt: statements with empty line between" {2392test "zig fmt: statements with empty line between" {
2533 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2534
2535 try testCanonical(2393 try testCanonical(
2536 \\comptime {2394 \\comptime {
2537 \\ a = b;2395 \\ a = b;
...@@ -2551,8 +2409,6 @@ test "zig fmt: ptr deref operator and unwrap optional operator" {...@@ -2551,8 +2409,6 @@ test "zig fmt: ptr deref operator and unwrap optional operator" {
2551}2409}
25522410
2553test "zig fmt: comment after if before another if" {2411test "zig fmt: comment after if before another if" {
2554 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2555
2556 try testCanonical(2412 try testCanonical(
2557 \\test "aoeu" {2413 \\test "aoeu" {
2558 \\ // comment2414 \\ // comment
...@@ -2575,8 +2431,6 @@ test "zig fmt: comment after if before another if" {...@@ -2575,8 +2431,6 @@ test "zig fmt: comment after if before another if" {
2575}2431}
25762432
2577test "zig fmt: line comment between if block and else keyword" {2433test "zig fmt: line comment between if block and else keyword" {
2578 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2579
2580 try testCanonical(2434 try testCanonical(
2581 \\test "aoeu" {2435 \\test "aoeu" {
2582 \\ // cexp(finite|nan +- i inf|nan) = nan + i nan2436 \\ // cexp(finite|nan +- i inf|nan) = nan + i nan
...@@ -2598,8 +2452,6 @@ test "zig fmt: line comment between if block and else keyword" {...@@ -2598,8 +2452,6 @@ test "zig fmt: line comment between if block and else keyword" {
2598}2452}
25992453
2600test "zig fmt: same line comments in expression" {2454test "zig fmt: same line comments in expression" {
2601 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2602
2603 try testCanonical(2455 try testCanonical(
2604 \\test "aoeu" {2456 \\test "aoeu" {
2605 \\ const x = ( // a2457 \\ const x = ( // a
...@@ -2640,8 +2492,6 @@ test "zig fmt: add comma on last switch prong" {...@@ -2640,8 +2492,6 @@ test "zig fmt: add comma on last switch prong" {
2640}2492}
26412493
2642test "zig fmt: same-line comment after a statement" {2494test "zig fmt: same-line comment after a statement" {
2643 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2644
2645 try testCanonical(2495 try testCanonical(
2646 \\test "" {2496 \\test "" {
2647 \\ a = b;2497 \\ a = b;
...@@ -2687,8 +2537,6 @@ test "zig fmt: same-line comment after switch prong" {...@@ -2687,8 +2537,6 @@ test "zig fmt: same-line comment after switch prong" {
2687}2537}
26882538
2689test "zig fmt: same-line comment after non-block if expression" {2539test "zig fmt: same-line comment after non-block if expression" {
2690 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2691
2692 try testCanonical(2540 try testCanonical(
2693 \\comptime {2541 \\comptime {
2694 \\ if (sr > n_uword_bits - 1) // d > r2542 \\ if (sr > n_uword_bits - 1) // d > r
...@@ -2699,8 +2547,6 @@ test "zig fmt: same-line comment after non-block if expression" {...@@ -2699,8 +2547,6 @@ test "zig fmt: same-line comment after non-block if expression" {
2699}2547}
27002548
2701test "zig fmt: same-line comment on comptime expression" {2549test "zig fmt: same-line comment on comptime expression" {
2702 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2703
2704 try testCanonical(2550 try testCanonical(
2705 \\test "" {2551 \\test "" {
2706 \\ comptime assert(@typeInfo(T) == .Int); // must pass an integer to absInt2552 \\ comptime assert(@typeInfo(T) == .Int); // must pass an integer to absInt
...@@ -2710,8 +2556,6 @@ test "zig fmt: same-line comment on comptime expression" {...@@ -2710,8 +2556,6 @@ test "zig fmt: same-line comment on comptime expression" {
2710}2556}
27112557
2712test "zig fmt: switch with empty body" {2558test "zig fmt: switch with empty body" {
2713 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2714
2715 try testCanonical(2559 try testCanonical(
2716 \\test "" {2560 \\test "" {
2717 \\ foo() catch |err| switch (err) {};2561 \\ foo() catch |err| switch (err) {};
...@@ -2721,8 +2565,6 @@ test "zig fmt: switch with empty body" {...@@ -2721,8 +2565,6 @@ test "zig fmt: switch with empty body" {
2721}2565}
27222566
2723test "zig fmt: line comments in struct initializer" {2567test "zig fmt: line comments in struct initializer" {
2724 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2725
2726 try testCanonical(2568 try testCanonical(
2727 \\fn foo() void {2569 \\fn foo() void {
2728 \\ return Self{2570 \\ return Self{
...@@ -2745,8 +2587,6 @@ test "zig fmt: line comments in struct initializer" {...@@ -2745,8 +2587,6 @@ test "zig fmt: line comments in struct initializer" {
2745}2587}
27462588
2747test "zig fmt: first line comment in struct initializer" {2589test "zig fmt: first line comment in struct initializer" {
2748 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2749
2750 try testCanonical(2590 try testCanonical(
2751 \\pub fn acquire(self: *Self) HeldLock {2591 \\pub fn acquire(self: *Self) HeldLock {
2752 \\ return HeldLock{2592 \\ return HeldLock{
...@@ -2815,8 +2655,6 @@ test "zig fmt: union(enum(u32)) with assigned enum values" {...@@ -2815,8 +2655,6 @@ test "zig fmt: union(enum(u32)) with assigned enum values" {
2815}2655}
28162656
2817test "zig fmt: resume from suspend block" {2657test "zig fmt: resume from suspend block" {
2818 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2819
2820 try testCanonical(2658 try testCanonical(
2821 \\fn foo() void {2659 \\fn foo() void {
2822 \\ suspend {2660 \\ suspend {
...@@ -2902,8 +2740,6 @@ test "zig fmt: comments before global variables" {...@@ -2902,8 +2740,6 @@ test "zig fmt: comments before global variables" {
2902}2740}
29032741
2904test "zig fmt: comments in statements" {2742test "zig fmt: comments in statements" {
2905 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2906
2907 try testCanonical(2743 try testCanonical(
2908 \\test "std" {2744 \\test "std" {
2909 \\ // statement comment2745 \\ // statement comment
...@@ -2931,8 +2767,6 @@ test "zig fmt: comments before test decl" {...@@ -2931,8 +2767,6 @@ test "zig fmt: comments before test decl" {
2931}2767}
29322768
2933test "zig fmt: preserve spacing" {2769test "zig fmt: preserve spacing" {
2934 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2935
2936 try testCanonical(2770 try testCanonical(
2937 \\const std = @import("std");2771 \\const std = @import("std");
2938 \\2772 \\
...@@ -3001,8 +2835,6 @@ test "zig fmt: alignment" {...@@ -3001,8 +2835,6 @@ test "zig fmt: alignment" {
3001}2835}
30022836
3003test "zig fmt: C main" {2837test "zig fmt: C main" {
3004 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3005
3006 try testCanonical(2838 try testCanonical(
3007 \\fn main(argc: c_int, argv: **u8) c_int {2839 \\fn main(argc: c_int, argv: **u8) c_int {
3008 \\ const a = b;2840 \\ const a = b;
...@@ -3012,8 +2844,6 @@ test "zig fmt: C main" {...@@ -3012,8 +2844,6 @@ test "zig fmt: C main" {
3012}2844}
30132845
3014test "zig fmt: return" {2846test "zig fmt: return" {
3015 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3016
3017 try testCanonical(2847 try testCanonical(
3018 \\fn foo(argc: c_int, argv: **u8) c_int {2848 \\fn foo(argc: c_int, argv: **u8) c_int {
3019 \\ return 0;2849 \\ return 0;
...@@ -3076,8 +2906,6 @@ test "zig fmt: slice attributes" {...@@ -3076,8 +2906,6 @@ test "zig fmt: slice attributes" {
3076}2906}
30772907
3078test "zig fmt: test declaration" {2908test "zig fmt: test declaration" {
3079 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3080
3081 try testCanonical(2909 try testCanonical(
3082 \\test "test name" {2910 \\test "test name" {
3083 \\ const a = 1;2911 \\ const a = 1;
...@@ -3088,8 +2916,6 @@ test "zig fmt: test declaration" {...@@ -3088,8 +2916,6 @@ test "zig fmt: test declaration" {
3088}2916}
30892917
3090test "zig fmt: infix operators" {2918test "zig fmt: infix operators" {
3091 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3092
3093 try testCanonical(2919 try testCanonical(
3094 \\test {2920 \\test {
3095 \\ var i = undefined;2921 \\ var i = undefined;
...@@ -3142,8 +2968,6 @@ test "zig fmt: infix operators" {...@@ -3142,8 +2968,6 @@ test "zig fmt: infix operators" {
3142}2968}
31432969
3144test "zig fmt: precedence" {2970test "zig fmt: precedence" {
3145 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3146
3147 try testCanonical(2971 try testCanonical(
3148 \\test "precedence" {2972 \\test "precedence" {
3149 \\ a!b();2973 \\ a!b();
...@@ -3176,8 +3000,6 @@ test "zig fmt: precedence" {...@@ -3176,8 +3000,6 @@ test "zig fmt: precedence" {
3176}3000}
31773001
3178test "zig fmt: prefix operators" {3002test "zig fmt: prefix operators" {
3179 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3180
3181 try testCanonical(3003 try testCanonical(
3182 \\test "prefix operators" {3004 \\test "prefix operators" {
3183 \\ try return --%~!&0;3005 \\ try return --%~!&0;
...@@ -3187,8 +3009,6 @@ test "zig fmt: prefix operators" {...@@ -3187,8 +3009,6 @@ test "zig fmt: prefix operators" {
3187}3009}
31883010
3189test "zig fmt: call expression" {3011test "zig fmt: call expression" {
3190 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3191
3192 try testCanonical(3012 try testCanonical(
3193 \\test "test calls" {3013 \\test "test calls" {
3194 \\ a();3014 \\ a();
...@@ -3208,8 +3028,6 @@ test "zig fmt: anytype type" {...@@ -3208,8 +3028,6 @@ test "zig fmt: anytype type" {
3208}3028}
32093029
3210test "zig fmt: functions" {3030test "zig fmt: functions" {
3211 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3212
3213 try testCanonical(3031 try testCanonical(
3214 \\extern fn puts(s: *const u8) c_int;3032 \\extern fn puts(s: *const u8) c_int;
3215 \\extern "c" fn puts(s: *const u8) c_int;3033 \\extern "c" fn puts(s: *const u8) c_int;
...@@ -3234,8 +3052,6 @@ test "zig fmt: functions" {...@@ -3234,8 +3052,6 @@ test "zig fmt: functions" {
3234}3052}
32353053
3236test "zig fmt: multiline string" {3054test "zig fmt: multiline string" {
3237 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3238
3239 try testCanonical(3055 try testCanonical(
3240 \\test "" {3056 \\test "" {
3241 \\ const s1 =3057 \\ const s1 =
...@@ -3254,8 +3070,6 @@ test "zig fmt: multiline string" {...@@ -3254,8 +3070,6 @@ test "zig fmt: multiline string" {
3254}3070}
32553071
3256test "zig fmt: values" {3072test "zig fmt: values" {
3257 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3258
3259 try testCanonical(3073 try testCanonical(
3260 \\test "values" {3074 \\test "values" {
3261 \\ 1;3075 \\ 1;
...@@ -3275,8 +3089,6 @@ test "zig fmt: values" {...@@ -3275,8 +3089,6 @@ test "zig fmt: values" {
3275}3089}
32763090
3277test "zig fmt: indexing" {3091test "zig fmt: indexing" {
3278 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3279
3280 try testCanonical(3092 try testCanonical(
3281 \\test "test index" {3093 \\test "test index" {
3282 \\ a[0];3094 \\ a[0];
...@@ -3297,8 +3109,6 @@ test "zig fmt: indexing" {...@@ -3297,8 +3109,6 @@ test "zig fmt: indexing" {
3297}3109}
32983110
3299test "zig fmt: struct declaration" {3111test "zig fmt: struct declaration" {
3300 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3301
3302 try testCanonical(3112 try testCanonical(
3303 \\const S = struct {3113 \\const S = struct {
3304 \\ const Self = @This();3114 \\ const Self = @This();
...@@ -3405,8 +3215,6 @@ test "zig fmt: union declaration" {...@@ -3405,8 +3215,6 @@ test "zig fmt: union declaration" {
3405}3215}
34063216
3407test "zig fmt: arrays" {3217test "zig fmt: arrays" {
3408 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3409
3410 try testCanonical(3218 try testCanonical(
3411 \\test "test array" {3219 \\test "test array" {
3412 \\ const a: [2]u8 = [2]u8{3220 \\ const a: [2]u8 = [2]u8{
...@@ -3425,8 +3233,6 @@ test "zig fmt: arrays" {...@@ -3425,8 +3233,6 @@ test "zig fmt: arrays" {
3425}3233}
34263234
3427test "zig fmt: container initializers" {3235test "zig fmt: container initializers" {
3428 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3429
3430 try testCanonical(3236 try testCanonical(
3431 \\const a0 = []u8{};3237 \\const a0 = []u8{};
3432 \\const a1 = []u8{1};3238 \\const a1 = []u8{1};
...@@ -3447,8 +3253,6 @@ test "zig fmt: container initializers" {...@@ -3447,8 +3253,6 @@ test "zig fmt: container initializers" {
3447}3253}
34483254
3449test "zig fmt: catch" {3255test "zig fmt: catch" {
3450 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3451
3452 try testCanonical(3256 try testCanonical(
3453 \\test "catch" {3257 \\test "catch" {
3454 \\ const a: anyerror!u8 = 0;3258 \\ const a: anyerror!u8 = 0;
...@@ -3464,8 +3268,6 @@ test "zig fmt: catch" {...@@ -3464,8 +3268,6 @@ test "zig fmt: catch" {
3464}3268}
34653269
3466test "zig fmt: blocks" {3270test "zig fmt: blocks" {
3467 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3468
3469 try testCanonical(3271 try testCanonical(
3470 \\test "blocks" {3272 \\test "blocks" {
3471 \\ {3273 \\ {
...@@ -3488,8 +3290,6 @@ test "zig fmt: blocks" {...@@ -3488,8 +3290,6 @@ test "zig fmt: blocks" {
3488}3290}
34893291
3490test "zig fmt: switch" {3292test "zig fmt: switch" {
3491 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3492
3493 try testCanonical(3293 try testCanonical(
3494 \\test "switch" {3294 \\test "switch" {
3495 \\ switch (0) {3295 \\ switch (0) {
...@@ -3545,8 +3345,6 @@ test "zig fmt: switch" {...@@ -3545,8 +3345,6 @@ test "zig fmt: switch" {
3545}3345}
35463346
3547test "zig fmt: switch multiline string" {3347test "zig fmt: switch multiline string" {
3548 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3549
3550 try testCanonical(3348 try testCanonical(
3551 \\test "switch multiline string" {3349 \\test "switch multiline string" {
3552 \\ const x: u32 = 0;3350 \\ const x: u32 = 0;
...@@ -3578,8 +3376,6 @@ test "zig fmt: switch multiline string" {...@@ -3578,8 +3376,6 @@ test "zig fmt: switch multiline string" {
3578}3376}
35793377
3580test "zig fmt: while" {3378test "zig fmt: while" {
3581 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3582
3583 try testCanonical(3379 try testCanonical(
3584 \\test "while" {3380 \\test "while" {
3585 \\ while (10 < 1) unreachable;3381 \\ while (10 < 1) unreachable;
...@@ -3655,8 +3451,6 @@ test "zig fmt: while" {...@@ -3655,8 +3451,6 @@ test "zig fmt: while" {
3655}3451}
36563452
3657test "zig fmt: for" {3453test "zig fmt: for" {
3658 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3659
3660 try testCanonical(3454 try testCanonical(
3661 \\test "for" {3455 \\test "for" {
3662 \\ for (a) |v| {3456 \\ for (a) |v| {
...@@ -3758,8 +3552,6 @@ test "zig fmt: for" {...@@ -3758,8 +3552,6 @@ test "zig fmt: for" {
3758}3552}
37593553
3760test "zig fmt: for if" {3554test "zig fmt: for if" {
3761 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3762
3763 try testCanonical(3555 try testCanonical(
3764 \\test {3556 \\test {
3765 \\ for (a) |x| if (x) f(x);3557 \\ for (a) |x| if (x) f(x);
...@@ -3785,8 +3577,6 @@ test "zig fmt: for if" {...@@ -3785,8 +3577,6 @@ test "zig fmt: for if" {
3785}3577}
37863578
3787test "zig fmt: if for" {3579test "zig fmt: if for" {
3788 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3789
3790 try testCanonical(3580 try testCanonical(
3791 \\test {3581 \\test {
3792 \\ if (a) for (x) |x| f(x);3582 \\ if (a) for (x) |x| f(x);
...@@ -3812,8 +3602,6 @@ test "zig fmt: if for" {...@@ -3812,8 +3602,6 @@ test "zig fmt: if for" {
3812}3602}
38133603
3814test "zig fmt: while if" {3604test "zig fmt: while if" {
3815 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3816
3817 try testCanonical(3605 try testCanonical(
3818 \\test {3606 \\test {
3819 \\ while (a) if (x) f(x);3607 \\ while (a) if (x) f(x);
...@@ -3839,8 +3627,6 @@ test "zig fmt: while if" {...@@ -3839,8 +3627,6 @@ test "zig fmt: while if" {
3839}3627}
38403628
3841test "zig fmt: if while" {3629test "zig fmt: if while" {
3842 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3843
3844 try testCanonical(3630 try testCanonical(
3845 \\test {3631 \\test {
3846 \\ if (a) while (x) : (cont) f(x);3632 \\ if (a) while (x) : (cont) f(x);
...@@ -3866,8 +3652,6 @@ test "zig fmt: if while" {...@@ -3866,8 +3652,6 @@ test "zig fmt: if while" {
3866}3652}
38673653
3868test "zig fmt: while for" {3654test "zig fmt: while for" {
3869 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3870
3871 try testCanonical(3655 try testCanonical(
3872 \\test {3656 \\test {
3873 \\ while (a) for (x) |x| f(x);3657 \\ while (a) for (x) |x| f(x);
...@@ -3893,8 +3677,6 @@ test "zig fmt: while for" {...@@ -3893,8 +3677,6 @@ test "zig fmt: while for" {
3893}3677}
38943678
3895test "zig fmt: for while" {3679test "zig fmt: for while" {
3896 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3897
3898 try testCanonical(3680 try testCanonical(
3899 \\test {3681 \\test {
3900 \\ for (a) |a| while (x) |x| f(x);3682 \\ for (a) |a| while (x) |x| f(x);
...@@ -3920,8 +3702,6 @@ test "zig fmt: for while" {...@@ -3920,8 +3702,6 @@ test "zig fmt: for while" {
3920}3702}
39213703
3922test "zig fmt: if" {3704test "zig fmt: if" {
3923 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3924
3925 try testCanonical(3705 try testCanonical(
3926 \\test "if" {3706 \\test "if" {
3927 \\ if (10 < 0) {3707 \\ if (10 < 0) {
...@@ -3971,8 +3751,6 @@ test "zig fmt: if" {...@@ -3971,8 +3751,6 @@ test "zig fmt: if" {
3971}3751}
39723752
3973test "zig fmt: fix single statement if/for/while line breaks" {3753test "zig fmt: fix single statement if/for/while line breaks" {
3974 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3975
3976 try testTransform(3754 try testTransform(
3977 \\test {3755 \\test {
3978 \\ if (cond) a3756 \\ if (cond) a
...@@ -4051,8 +3829,6 @@ test "zig fmt: anon struct/array literal in if" {...@@ -4051,8 +3829,6 @@ test "zig fmt: anon struct/array literal in if" {
4051}3829}
40523830
4053test "zig fmt: defer" {3831test "zig fmt: defer" {
4054 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4055
4056 try testCanonical(3832 try testCanonical(
4057 \\test "defer" {3833 \\test "defer" {
4058 \\ var i: usize = 0;3834 \\ var i: usize = 0;
...@@ -4073,8 +3849,6 @@ test "zig fmt: defer" {...@@ -4073,8 +3849,6 @@ test "zig fmt: defer" {
4073}3849}
40743850
4075test "zig fmt: comptime" {3851test "zig fmt: comptime" {
4076 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4077
4078 try testCanonical(3852 try testCanonical(
4079 \\fn a() u8 {3853 \\fn a() u8 {
4080 \\ return 5;3854 \\ return 5;
...@@ -4114,8 +3888,6 @@ test "zig fmt: comptime" {...@@ -4114,8 +3888,6 @@ test "zig fmt: comptime" {
4114}3888}
41153889
4116test "zig fmt: fn type" {3890test "zig fmt: fn type" {
4117 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4118
4119 try testCanonical(3891 try testCanonical(
4120 \\fn a(i: u8) u8 {3892 \\fn a(i: u8) u8 {
4121 \\ return i + 1;3893 \\ return i + 1;
...@@ -4129,8 +3901,6 @@ test "zig fmt: fn type" {...@@ -4129,8 +3901,6 @@ test "zig fmt: fn type" {
4129}3901}
41303902
4131test "zig fmt: inline asm" {3903test "zig fmt: inline asm" {
4132 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4133
4134 try testCanonical(3904 try testCanonical(
4135 \\pub fn syscall1(number: usize, arg1: usize) usize {3905 \\pub fn syscall1(number: usize, arg1: usize) usize {
4136 \\ return asm volatile ("syscall"3906 \\ return asm volatile ("syscall"
...@@ -4145,8 +3915,6 @@ test "zig fmt: inline asm" {...@@ -4145,8 +3915,6 @@ test "zig fmt: inline asm" {
4145}3915}
41463916
4147test "zig fmt: async functions" {3917test "zig fmt: async functions" {
4148 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4149
4150 try testCanonical(3918 try testCanonical(
4151 \\fn simpleAsyncFn() void {3919 \\fn simpleAsyncFn() void {
4152 \\ const a = async a.b();3920 \\ const a = async a.b();
...@@ -4175,8 +3943,6 @@ test "zig fmt: nosuspend" {...@@ -4175,8 +3943,6 @@ test "zig fmt: nosuspend" {
4175}3943}
41763944
4177test "zig fmt: Block after if" {3945test "zig fmt: Block after if" {
4178 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4179
4180 try testCanonical(3946 try testCanonical(
4181 \\test {3947 \\test {
4182 \\ if (true) {3948 \\ if (true) {
...@@ -4208,8 +3974,6 @@ test "zig fmt: string identifier" {...@@ -4208,8 +3974,6 @@ test "zig fmt: string identifier" {
4208}3974}
42093975
4210test "zig fmt: error return" {3976test "zig fmt: error return" {
4211 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4212
4213 try testCanonical(3977 try testCanonical(
4214 \\fn err() anyerror {3978 \\fn err() anyerror {
4215 \\ call();3979 \\ call();
...@@ -4220,8 +3984,6 @@ test "zig fmt: error return" {...@@ -4220,8 +3984,6 @@ test "zig fmt: error return" {
4220}3984}
42213985
4222test "zig fmt: comptime block in container" {3986test "zig fmt: comptime block in container" {
4223 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4224
4225 try testCanonical(3987 try testCanonical(
4226 \\pub fn container() type {3988 \\pub fn container() type {
4227 \\ return struct {3989 \\ return struct {
...@@ -4237,8 +3999,6 @@ test "zig fmt: comptime block in container" {...@@ -4237,8 +3999,6 @@ test "zig fmt: comptime block in container" {
4237}3999}
42384000
4239test "zig fmt: inline asm parameter alignment" {4001test "zig fmt: inline asm parameter alignment" {
4240 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4241
4242 try testCanonical(4002 try testCanonical(
4243 \\pub fn main() void {4003 \\pub fn main() void {
4244 \\ asm volatile (4004 \\ asm volatile (
...@@ -4277,8 +4037,6 @@ test "zig fmt: inline asm parameter alignment" {...@@ -4277,8 +4037,6 @@ test "zig fmt: inline asm parameter alignment" {
4277}4037}
42784038
4279test "zig fmt: multiline string in array" {4039test "zig fmt: multiline string in array" {
4280 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4281
4282 try testCanonical(4040 try testCanonical(
4283 \\const Foo = [][]const u8{4041 \\const Foo = [][]const u8{
4284 \\ \\aaa4042 \\ \\aaa
...@@ -4304,8 +4062,6 @@ test "zig fmt: multiline string in array" {...@@ -4304,8 +4062,6 @@ test "zig fmt: multiline string in array" {
4304}4062}
43054063
4306test "zig fmt: if type expr" {4064test "zig fmt: if type expr" {
4307 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4308
4309 try testCanonical(4065 try testCanonical(
4310 \\const mycond = true;4066 \\const mycond = true;
4311 \\pub fn foo() if (mycond) i32 else void {4067 \\pub fn foo() if (mycond) i32 else void {
...@@ -4334,8 +4090,6 @@ test "zig fmt: comment after empty comment" {...@@ -4334,8 +4090,6 @@ test "zig fmt: comment after empty comment" {
4334}4090}
43354091
4336test "zig fmt: line comment in array" {4092test "zig fmt: line comment in array" {
4337 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4338
4339 try testTransform(4093 try testTransform(
4340 \\test "a" {4094 \\test "a" {
4341 \\ var arr = [_]u32{4095 \\ var arr = [_]u32{
...@@ -4394,8 +4148,6 @@ test "zig fmt: comment after params" {...@@ -4394,8 +4148,6 @@ test "zig fmt: comment after params" {
4394}4148}
43954149
4396test "zig fmt: comment in array initializer/access" {4150test "zig fmt: comment in array initializer/access" {
4397 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4398
4399 try testCanonical(4151 try testCanonical(
4400 \\test "a" {4152 \\test "a" {
4401 \\ var a = x{ //aa4153 \\ var a = x{ //aa
...@@ -4432,8 +4184,6 @@ test "zig fmt: comment in array initializer/access" {...@@ -4432,8 +4184,6 @@ test "zig fmt: comment in array initializer/access" {
4432}4184}
44334185
4434test "zig fmt: comments at several places in struct init" {4186test "zig fmt: comments at several places in struct init" {
4435 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4436
4437 try testTransform(4187 try testTransform(
4438 \\var bar = Bar{4188 \\var bar = Bar{
4439 \\ .x = 10, // test4189 \\ .x = 10, // test
...@@ -4657,8 +4407,6 @@ test "zig fmt: integer literals with underscore separators" {...@@ -4657,8 +4407,6 @@ test "zig fmt: integer literals with underscore separators" {
4657}4407}
46584408
4659test "zig fmt: hex literals with underscore separators" {4409test "zig fmt: hex literals with underscore separators" {
4660 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4661
4662 try testTransform(4410 try testTransform(
4663 \\pub fn orMask(a: [ 1_000 ]u64, b: [ 1_000] u64) [1_000]u64 {4411 \\pub fn orMask(a: [ 1_000 ]u64, b: [ 1_000] u64) [1_000]u64 {
4664 \\ var c: [1_000]u64 = [1]u64{ 0xFFFF_FFFF_FFFF_FFFF}**1_000;4412 \\ var c: [1_000]u64 = [1]u64{ 0xFFFF_FFFF_FFFF_FFFF}**1_000;
...@@ -4682,8 +4430,6 @@ test "zig fmt: hex literals with underscore separators" {...@@ -4682,8 +4430,6 @@ test "zig fmt: hex literals with underscore separators" {
4682}4430}
46834431
4684test "zig fmt: decimal float literals with underscore separators" {4432test "zig fmt: decimal float literals with underscore separators" {
4685 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4686
4687 try testTransform(4433 try testTransform(
4688 \\pub fn main() void {4434 \\pub fn main() void {
4689 \\ const a:f64=(10.0e-0+(10.0e+0))+10_00.00_00e-2+20_00.00_10e+4;4435 \\ const a:f64=(10.0e-0+(10.0e+0))+10_00.00_00e-2+20_00.00_10e+4;
...@@ -4701,8 +4447,6 @@ test "zig fmt: decimal float literals with underscore separators" {...@@ -4701,8 +4447,6 @@ test "zig fmt: decimal float literals with underscore separators" {
4701}4447}
47024448
4703test "zig fmt: hexadeciaml float literals with underscore separators" {4449test "zig fmt: hexadeciaml float literals with underscore separators" {
4704 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4705
4706 try testTransform(4450 try testTransform(
4707 \\pub fn main() void {4451 \\pub fn main() void {
4708 \\ const a: f64 = (0x10.0p-0+(0x10.0p+0))+0x10_00.00_00p-8+0x00_00.00_10p+16;4452 \\ const a: f64 = (0x10.0p-0+(0x10.0p+0))+0x10_00.00_00p-8+0x00_00.00_10p+16;
...@@ -4727,8 +4471,6 @@ test "zig fmt: C var args" {...@@ -4727,8 +4471,6 @@ test "zig fmt: C var args" {
4727}4471}
47284472
4729test "zig fmt: Only indent multiline string literals in function calls" {4473test "zig fmt: Only indent multiline string literals in function calls" {
4730 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4731
4732 try testCanonical(4474 try testCanonical(
4733 \\test "zig fmt:" {4475 \\test "zig fmt:" {
4734 \\ try testTransform(4476 \\ try testTransform(
...@@ -4746,8 +4488,6 @@ test "zig fmt: Only indent multiline string literals in function calls" {...@@ -4746,8 +4488,6 @@ test "zig fmt: Only indent multiline string literals in function calls" {
4746}4488}
47474489
4748test "zig fmt: Don't add extra newline after if" {4490test "zig fmt: Don't add extra newline after if" {
4749 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4750
4751 try testCanonical(4491 try testCanonical(
4752 \\pub fn atomicSymLink(allocator: Allocator, existing_path: []const u8, new_path: []const u8) !void {4492 \\pub fn atomicSymLink(allocator: Allocator, existing_path: []const u8, new_path: []const u8) !void {
4753 \\ if (cwd().symLink(existing_path, new_path, .{})) {4493 \\ if (cwd().symLink(existing_path, new_path, .{})) {
...@@ -4759,8 +4499,6 @@ test "zig fmt: Don't add extra newline after if" {...@@ -4759,8 +4499,6 @@ test "zig fmt: Don't add extra newline after if" {
4759}4499}
47604500
4761test "zig fmt: comments in ternary ifs" {4501test "zig fmt: comments in ternary ifs" {
4762 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4763
4764 try testCanonical(4502 try testCanonical(
4765 \\const x = if (true) {4503 \\const x = if (true) {
4766 \\ 1;4504 \\ 1;
...@@ -4780,8 +4518,6 @@ test "zig fmt: comments in ternary ifs" {...@@ -4780,8 +4518,6 @@ test "zig fmt: comments in ternary ifs" {
4780}4518}
47814519
4782test "zig fmt: while statement in blockless if" {4520test "zig fmt: while statement in blockless if" {
4783 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4784
4785 try testCanonical(4521 try testCanonical(
4786 \\pub fn main() void {4522 \\pub fn main() void {
4787 \\ const zoom_node = if (focused_node == layout_first)4523 \\ const zoom_node = if (focused_node == layout_first)
...@@ -4831,8 +4567,6 @@ test "zig fmt: test comments in field access chain" {...@@ -4831,8 +4567,6 @@ test "zig fmt: test comments in field access chain" {
4831}4567}
48324568
4833test "zig fmt: allow line break before field access" {4569test "zig fmt: allow line break before field access" {
4834 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4835
4836 try testCanonical(4570 try testCanonical(
4837 \\test {4571 \\test {
4838 \\ const w = foo.bar().zippy(zag).iguessthisisok();4572 \\ const w = foo.bar().zippy(zag).iguessthisisok();
...@@ -4908,8 +4642,6 @@ test "zig fmt: Indent comma correctly after multiline string literals in arg lis...@@ -4908,8 +4642,6 @@ test "zig fmt: Indent comma correctly after multiline string literals in arg lis
4908}4642}
49094643
4910test "zig fmt: Control flow statement as body of blockless if" {4644test "zig fmt: Control flow statement as body of blockless if" {
4911 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4912
4913 try testCanonical(4645 try testCanonical(
4914 \\pub fn main() void {4646 \\pub fn main() void {
4915 \\ const zoom_node = if (focused_node == layout_first)4647 \\ const zoom_node = if (focused_node == layout_first)
...@@ -4945,8 +4677,6 @@ test "zig fmt: Control flow statement as body of blockless if" {...@@ -4945,8 +4677,6 @@ test "zig fmt: Control flow statement as body of blockless if" {
4945}4677}
49464678
4947test "zig fmt: regression test for #5722" {4679test "zig fmt: regression test for #5722" {
4948 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4949
4950 try testCanonical(4680 try testCanonical(
4951 \\pub fn sendViewTags(self: Self) void {4681 \\pub fn sendViewTags(self: Self) void {
4952 \\ var it = ViewStack(View).iterator(self.output.views.first, std.math.maxInt(u32));4682 \\ var it = ViewStack(View).iterator(self.output.views.first, std.math.maxInt(u32));
...@@ -5077,8 +4807,6 @@ test "zig fmt: multiline string literals should play nice with array initializer...@@ -5077,8 +4807,6 @@ test "zig fmt: multiline string literals should play nice with array initializer
5077}4807}
50784808
5079test "zig fmt: use of comments and multiline string literals may force the parameters over multiple lines" {4809test "zig fmt: use of comments and multiline string literals may force the parameters over multiple lines" {
5080 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5081
5082 try testCanonical(4810 try testCanonical(
5083 \\pub fn makeMemUndefined(qzz: []u8) i1 {4811 \\pub fn makeMemUndefined(qzz: []u8) i1 {
5084 \\ cases.add( // fixed bug foo4812 \\ cases.add( // fixed bug foo
...@@ -5119,8 +4847,6 @@ test "zig fmt: use of comments and multiline string literals may force the param...@@ -5119,8 +4847,6 @@ test "zig fmt: use of comments and multiline string literals may force the param
5119}4847}
51204848
5121test "zig fmt: single argument trailing commas in @builtins()" {4849test "zig fmt: single argument trailing commas in @builtins()" {
5122 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5123
5124 try testCanonical(4850 try testCanonical(
5125 \\pub fn foo(qzz: []u8) i1 {4851 \\pub fn foo(qzz: []u8) i1 {
5126 \\ @panic(4852 \\ @panic(
...@@ -5154,8 +4880,6 @@ test "zig fmt: trailing comma should force multiline 1 column" {...@@ -5154,8 +4880,6 @@ test "zig fmt: trailing comma should force multiline 1 column" {
5154}4880}
51554881
5156test "zig fmt: function params should align nicely" {4882test "zig fmt: function params should align nicely" {
5157 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5158
5159 try testCanonical(4883 try testCanonical(
5160 \\pub fn foo() void {4884 \\pub fn foo() void {
5161 \\ cases.addRuntimeSafety("slicing operator with sentinel",4885 \\ cases.addRuntimeSafety("slicing operator with sentinel",
...@@ -5212,8 +4936,6 @@ test "zig fmt: remove trailing whitespace after doc comment" {...@@ -5212,8 +4936,6 @@ test "zig fmt: remove trailing whitespace after doc comment" {
5212}4936}
52134937
5214test "zig fmt: for loop with ptr payload and index" {4938test "zig fmt: for loop with ptr payload and index" {
5215 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5216
5217 try testCanonical(4939 try testCanonical(
5218 \\test {4940 \\test {
5219 \\ for (self.entries.items, 0..) |*item, i| {}4941 \\ for (self.entries.items, 0..) |*item, i| {}
...@@ -5226,8 +4948,6 @@ test "zig fmt: for loop with ptr payload and index" {...@@ -5226,8 +4948,6 @@ test "zig fmt: for loop with ptr payload and index" {
5226}4948}
52274949
5228test "zig fmt: proper indent line comment after multi-line single expr while loop" {4950test "zig fmt: proper indent line comment after multi-line single expr while loop" {
5229 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5230
5231 try testCanonical(4951 try testCanonical(
5232 \\test {4952 \\test {
5233 \\ while (a) : (b)4953 \\ while (a) : (b)
...@@ -5241,8 +4961,6 @@ test "zig fmt: proper indent line comment after multi-line single expr while loo...@@ -5241,8 +4961,6 @@ test "zig fmt: proper indent line comment after multi-line single expr while loo
5241}4961}
52424962
5243test "zig fmt: function with labeled block as return type" {4963test "zig fmt: function with labeled block as return type" {
5244 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5245
5246 try testCanonical(4964 try testCanonical(
5247 \\fn foo() t: {4965 \\fn foo() t: {
5248 \\ break :t bar;4966 \\ break :t bar;
...@@ -5265,8 +4983,6 @@ test "zig fmt: extern function with missing param name" {...@@ -5265,8 +4983,6 @@ test "zig fmt: extern function with missing param name" {
5265}4983}
52664984
5267test "zig fmt: line comment after multiline single expr if statement with multiline string" {4985test "zig fmt: line comment after multiline single expr if statement with multiline string" {
5268 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5269
5270 try testCanonical(4986 try testCanonical(
5271 \\test {4987 \\test {
5272 \\ if (foo)4988 \\ if (foo)
...@@ -5299,8 +5015,6 @@ test "zig fmt: line comment after multiline single expr if statement with multil...@@ -5299,8 +5015,6 @@ test "zig fmt: line comment after multiline single expr if statement with multil
5299}5015}
53005016
5301test "zig fmt: respect extra newline between fn and pub usingnamespace" {5017test "zig fmt: respect extra newline between fn and pub usingnamespace" {
5302 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5303
5304 try testCanonical(5018 try testCanonical(
5305 \\fn foo() void {5019 \\fn foo() void {
5306 \\ bar();5020 \\ bar();
...@@ -5425,8 +5139,6 @@ test "zig fmt: insert trailing comma if comments in array init" {...@@ -5425,8 +5139,6 @@ test "zig fmt: insert trailing comma if comments in array init" {
5425}5139}
54265140
5427test "zig fmt: make single-line if no trailing comma" {5141test "zig fmt: make single-line if no trailing comma" {
5428 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5429
5430 try testTransform(5142 try testTransform(
5431 \\test "function call no trailing comma" {5143 \\test "function call no trailing comma" {
5432 \\ foo(5144 \\ foo(
...@@ -5606,8 +5318,6 @@ test "zig fmt: missing const/var before local variable" {...@@ -5606,8 +5318,6 @@ test "zig fmt: missing const/var before local variable" {
5606}5318}
56075319
5608test "zig fmt: while continue expr" {5320test "zig fmt: while continue expr" {
5609 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5610
5611 try testCanonical(5321 try testCanonical(
5612 \\test {5322 \\test {
5613 \\ while (i > 0)5323 \\ while (i > 0)
...@@ -5627,8 +5337,6 @@ test "zig fmt: while continue expr" {...@@ -5627,8 +5337,6 @@ test "zig fmt: while continue expr" {
5627}5337}
56285338
5629test "zig fmt: canonicalize symbols (simple)" {5339test "zig fmt: canonicalize symbols (simple)" {
5630 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5631
5632 try testTransform(5340 try testTransform(
5633 \\const val_normal: Normal = .{};5341 \\const val_normal: Normal = .{};
5634 \\const @"val_unesc_me": @"UnescMe" = .{};5342 \\const @"val_unesc_me": @"UnescMe" = .{};
...@@ -5778,8 +5486,6 @@ test "zig fmt: canonicalize symbols (simple)" {...@@ -5778,8 +5486,6 @@ test "zig fmt: canonicalize symbols (simple)" {
57785486
5779// Contextually unescape when shadowing primitive types and values.5487// Contextually unescape when shadowing primitive types and values.
5780test "zig fmt: canonicalize symbols (primitive types)" {5488test "zig fmt: canonicalize symbols (primitive types)" {
5781 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5782
5783 try testTransform(5489 try testTransform(
5784 \\const @"anyopaque" = struct {5490 \\const @"anyopaque" = struct {
5785 \\ @"u8": @"type" = true,5491 \\ @"u8": @"type" = true,
...@@ -5889,8 +5595,6 @@ test "zig fmt: canonicalize symbols (primitive types)" {...@@ -5889,8 +5595,6 @@ test "zig fmt: canonicalize symbols (primitive types)" {
58895595
5890// Never unescape names spelled like keywords.5596// Never unescape names spelled like keywords.
5891test "zig fmt: canonicalize symbols (keywords)" {5597test "zig fmt: canonicalize symbols (keywords)" {
5892 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5893
5894 try testCanonical(5598 try testCanonical(
5895 \\const @"enum" = struct {5599 \\const @"enum" = struct {
5896 \\ @"error": @"struct" = true,5600 \\ @"error": @"struct" = true,
...@@ -5918,8 +5622,6 @@ test "zig fmt: canonicalize symbols (keywords)" {...@@ -5918,8 +5622,6 @@ test "zig fmt: canonicalize symbols (keywords)" {
5918}5622}
59195623
5920test "zig fmt: no space before newline before multiline string" {5624test "zig fmt: no space before newline before multiline string" {
5921 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5922
5923 try testCanonical(5625 try testCanonical(
5924 \\const S = struct {5626 \\const S = struct {
5925 \\ text: []const u8,5627 \\ text: []const u8,
...@@ -5950,8 +5652,6 @@ test "zig fmt: no space before newline before multiline string" {...@@ -5950,8 +5652,6 @@ test "zig fmt: no space before newline before multiline string" {
59505652
5951// Normalize \xNN and \u{NN} escapes and unicode inside @"" escapes.5653// Normalize \xNN and \u{NN} escapes and unicode inside @"" escapes.
5952test "zig fmt: canonicalize symbols (character escapes)" {5654test "zig fmt: canonicalize symbols (character escapes)" {
5953 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5954
5955 try testTransform(5655 try testTransform(
5956 \\const @"\x46\x6f\x6f\x64" = struct {5656 \\const @"\x46\x6f\x6f\x64" = struct {
5957 \\ @"\x62\x61\x72\x6E": @"\x43\x72\x61\x62" = false,5657 \\ @"\x62\x61\x72\x6E": @"\x43\x72\x61\x62" = false,
...@@ -5994,8 +5694,6 @@ test "zig fmt: canonicalize symbols (character escapes)" {...@@ -5994,8 +5694,6 @@ test "zig fmt: canonicalize symbols (character escapes)" {
5994}5694}
59955695
5996test "zig fmt: canonicalize symbols (asm)" {5696test "zig fmt: canonicalize symbols (asm)" {
5997 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
5998
5999 try testTransform(5697 try testTransform(
6000 \\test "asm" {5698 \\test "asm" {
6001 \\ const @"null" = usize;5699 \\ const @"null" = usize;
src/arch/x86_64/CodeGen.zig+1
...@@ -9553,6 +9553,7 @@ fn genBinOpMir(...@@ -9553,6 +9553,7 @@ fn genBinOpMir(
9553fn genIntMulComplexOpMir(self: *Self, dst_ty: Type, dst_mcv: MCValue, src_mcv: MCValue) InnerError!void {9553fn genIntMulComplexOpMir(self: *Self, dst_ty: Type, dst_mcv: MCValue, src_mcv: MCValue) InnerError!void {
9554 const mod = self.bin_file.options.module.?;9554 const mod = self.bin_file.options.module.?;
9555 const abi_size: u32 = @intCast(dst_ty.abiSize(mod));9555 const abi_size: u32 = @intCast(dst_ty.abiSize(mod));
9556 try self.spillEflagsIfOccupied();
9556 switch (dst_mcv) {9557 switch (dst_mcv) {
9557 .none,9558 .none,
9558 .unreach,9559 .unreach,