| author | |
| committer | |
| log | a7029496d153bd2ba4e91ef561a399cad6d77307 |
| tree | 29303e2708ab86d31c2070ad96939e6aa58d7a67 |
| parent | 377e8579f9539c56fc5988c9a452a01438af89f3 |
these are illegal according to the spec7 files changed, 107 insertions(+), 111 deletions(-)
lib/std/crypto/ml_kem.zig+3-3| ... | @@ -677,10 +677,10 @@ fn montReduce(x: i32) i16 { | ... | @@ -677,10 +677,10 @@ fn montReduce(x: i32) i16 { |
| 677 | // Note gcd(2¹⁶, q) = 1 as q is prime. Write q' := 62209 = q⁻¹ mod R. | 677 | // Note gcd(2¹⁶, q) = 1 as q is prime. Write q' := 62209 = q⁻¹ mod R. |
| 678 | // First we compute | 678 | // First we compute |
| 679 | // | 679 | // |
| 680 | //	m := ((x mod R) q') mod R | 680 | // m := ((x mod R) q') mod R |
| 681 | // = x q' mod R | 681 | // = x q' mod R |
| 682 | //	 = int16(x q') | 682 | // = int16(x q') |
| 683 | //	 = int16(int32(x) * int32(q')) | 683 | // = int16(int32(x) * int32(q')) |
| 684 | // | 684 | // |
| 685 | // Note that x q' might be as big as 2³² and could overflow the int32 | 685 | // Note that x q' might be as big as 2³² and could overflow the int32 |
| 686 | // multiplication in the last line. However for any int32s a and b, | 686 | // multiplication in the last line. However for any int32s a and b, |
lib/std/macho.zig+4-5| ... | @@ -203,8 +203,7 @@ pub const symtab_command = extern struct { | ... | @@ -203,8 +203,7 @@ pub const symtab_command = extern struct { |
| 203 | /// local symbols (static and debugging symbols) - grouped by module | 203 | /// local symbols (static and debugging symbols) - grouped by module |
| 204 | /// defined external symbols - grouped by module (sorted by name if not lib) | 204 | /// defined external symbols - grouped by module (sorted by name if not lib) |
| 205 | /// undefined external symbols (sorted by name if MH_BINDATLOAD is not set, | 205 | /// undefined external symbols (sorted by name if MH_BINDATLOAD is not set, |
| 206 | /// 			 and in order the were seen by the static | 206 | /// and in order the were seen by the static linker if MH_BINDATLOAD is set) |
| 207 | /// 			 linker if MH_BINDATLOAD is set) | ||
| 208 | /// In this load command there are offsets and counts to each of the three groups | 207 | /// In this load command there are offsets and counts to each of the three groups |
| 209 | /// of symbols. | 208 | /// of symbols. |
| 210 | /// | 209 | /// |
| ... | @@ -219,9 +218,9 @@ pub const symtab_command = extern struct { | ... | @@ -219,9 +218,9 @@ pub const symtab_command = extern struct { |
| 219 | /// shared library. For executable and object modules, which are files | 218 | /// shared library. For executable and object modules, which are files |
| 220 | /// containing only one module, the information that would be in these three | 219 | /// containing only one module, the information that would be in these three |
| 221 | /// tables is determined as follows: | 220 | /// tables is determined as follows: |
| 222 | /// 	table of contents - the defined external symbols are sorted by name | 221 | /// table of contents - the defined external symbols are sorted by name |
| 223 | /// module table - the file contains only one module so everything in the | 222 | /// module table - the file contains only one module so everything in the file |
| 224 | /// 	 file is part of the module. | 223 | /// is part of the module. |
| 225 | /// reference symbol table - is the defined and undefined external symbols | 224 | /// reference symbol table - is the defined and undefined external symbols |
| 226 | /// | 225 | /// |
| 227 | /// For dynamically linked shared library files this load command also contains | 226 | /// For dynamically linked shared library files this load command also contains |
lib/std/zig/system/darwin/macos.zig+46-46| ... | @@ -303,16 +303,16 @@ test "detect" { | ... | @@ -303,16 +303,16 @@ test "detect" { |
| 303 | \\<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | 303 | \\<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 304 | \\<plist version="1.0"> | 304 | \\<plist version="1.0"> |
| 305 | \\<dict> | 305 | \\<dict> |
| 306 | \\	<key>ProductBuildVersion</key> | 306 | \\ <key>ProductBuildVersion</key> |
| 307 | \\	<string>7W98</string> | 307 | \\ <string>7W98</string> |
| 308 | \\	<key>ProductCopyright</key> | 308 | \\ <key>ProductCopyright</key> |
| 309 | \\	<string>Apple Computer, Inc. 1983-2004</string> | 309 | \\ <string>Apple Computer, Inc. 1983-2004</string> |
| 310 | \\	<key>ProductName</key> | 310 | \\ <key>ProductName</key> |
| 311 | \\	<string>Mac OS X</string> | 311 | \\ <string>Mac OS X</string> |
| 312 | \\	<key>ProductUserVisibleVersion</key> | 312 | \\ <key>ProductUserVisibleVersion</key> |
| 313 | \\	<string>10.3.9</string> | 313 | \\ <string>10.3.9</string> |
| 314 | \\	<key>ProductVersion</key> | 314 | \\ <key>ProductVersion</key> |
| 315 | \\	<string>10.3.9</string> | 315 | \\ <string>10.3.9</string> |
| 316 | \\</dict> | 316 | \\</dict> |
| 317 | \\</plist> | 317 | \\</plist> |
| 318 | , | 318 | , |
| ... | @@ -323,18 +323,18 @@ test "detect" { | ... | @@ -323,18 +323,18 @@ test "detect" { |
| 323 | \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | 323 | \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 324 | \\<plist version="1.0"> | 324 | \\<plist version="1.0"> |
| 325 | \\<dict> | 325 | \\<dict> |
| 326 | \\	<key>ProductBuildVersion</key> | 326 | \\ <key>ProductBuildVersion</key> |
| 327 | \\	<string>19G68</string> | 327 | \\ <string>19G68</string> |
| 328 | \\	<key>ProductCopyright</key> | 328 | \\ <key>ProductCopyright</key> |
| 329 | \\	<string>1983-2020 Apple Inc.</string> | 329 | \\ <string>1983-2020 Apple Inc.</string> |
| 330 | \\	<key>ProductName</key> | 330 | \\ <key>ProductName</key> |
| 331 | \\	<string>Mac OS X</string> | 331 | \\ <string>Mac OS X</string> |
| 332 | \\	<key>ProductUserVisibleVersion</key> | 332 | \\ <key>ProductUserVisibleVersion</key> |
| 333 | \\	<string>10.15.6</string> | 333 | \\ <string>10.15.6</string> |
| 334 | \\	<key>ProductVersion</key> | 334 | \\ <key>ProductVersion</key> |
| 335 | \\	<string>10.15.6</string> | 335 | \\ <string>10.15.6</string> |
| 336 | \\	<key>iOSSupportVersion</key> | 336 | \\ <key>iOSSupportVersion</key> |
| 337 | \\	<string>13.6</string> | 337 | \\ <string>13.6</string> |
| 338 | \\</dict> | 338 | \\</dict> |
| 339 | \\</plist> | 339 | \\</plist> |
| 340 | , | 340 | , |
| ... | @@ -345,18 +345,18 @@ test "detect" { | ... | @@ -345,18 +345,18 @@ test "detect" { |
| 345 | \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | 345 | \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 346 | \\<plist version="1.0"> | 346 | \\<plist version="1.0"> |
| 347 | \\<dict> | 347 | \\<dict> |
| 348 | \\	<key>ProductBuildVersion</key> | 348 | \\ <key>ProductBuildVersion</key> |
| 349 | \\	<string>20A2408</string> | 349 | \\ <string>20A2408</string> |
| 350 | \\	<key>ProductCopyright</key> | 350 | \\ <key>ProductCopyright</key> |
| 351 | \\	<string>1983-2020 Apple Inc.</string> | 351 | \\ <string>1983-2020 Apple Inc.</string> |
| 352 | \\	<key>ProductName</key> | 352 | \\ <key>ProductName</key> |
| 353 | \\	<string>macOS</string> | 353 | \\ <string>macOS</string> |
| 354 | \\	<key>ProductUserVisibleVersion</key> | 354 | \\ <key>ProductUserVisibleVersion</key> |
| 355 | \\	<string>11.0</string> | 355 | \\ <string>11.0</string> |
| 356 | \\	<key>ProductVersion</key> | 356 | \\ <key>ProductVersion</key> |
| 357 | \\	<string>11.0</string> | 357 | \\ <string>11.0</string> |
| 358 | \\	<key>iOSSupportVersion</key> | 358 | \\ <key>iOSSupportVersion</key> |
| 359 | \\	<string>14.2</string> | 359 | \\ <string>14.2</string> |
| 360 | \\</dict> | 360 | \\</dict> |
| 361 | \\</plist> | 361 | \\</plist> |
| 362 | , | 362 | , |
| ... | @@ -367,18 +367,18 @@ test "detect" { | ... | @@ -367,18 +367,18 @@ test "detect" { |
| 367 | \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | 367 | \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 368 | \\<plist version="1.0"> | 368 | \\<plist version="1.0"> |
| 369 | \\<dict> | 369 | \\<dict> |
| 370 | \\	<key>ProductBuildVersion</key> | 370 | \\ <key>ProductBuildVersion</key> |
| 371 | \\	<string>20C63</string> | 371 | \\ <string>20C63</string> |
| 372 | \\	<key>ProductCopyright</key> | 372 | \\ <key>ProductCopyright</key> |
| 373 | \\	<string>1983-2020 Apple Inc.</string> | 373 | \\ <string>1983-2020 Apple Inc.</string> |
| 374 | \\	<key>ProductName</key> | 374 | \\ <key>ProductName</key> |
| 375 | \\	<string>macOS</string> | 375 | \\ <string>macOS</string> |
| 376 | \\	<key>ProductUserVisibleVersion</key> | 376 | \\ <key>ProductUserVisibleVersion</key> |
| 377 | \\	<string>11.1</string> | 377 | \\ <string>11.1</string> |
| 378 | \\	<key>ProductVersion</key> | 378 | \\ <key>ProductVersion</key> |
| 379 | \\	<string>11.1</string> | 379 | \\ <string>11.1</string> |
| 380 | \\	<key>iOSSupportVersion</key> | 380 | \\ <key>iOSSupportVersion</key> |
| 381 | \\	<string>14.3</string> | 381 | \\ <string>14.3</string> |
| 382 | \\</dict> | 382 | \\</dict> |
| 383 | \\</plist> | 383 | \\</plist> |
| 384 | , | 384 | , |
lib/std/zig/system/linux.zig+30-30| ... | @@ -109,12 +109,12 @@ const RiscvCpuinfoParser = CpuinfoParser(RiscvCpuinfoImpl); | ... | @@ -109,12 +109,12 @@ const RiscvCpuinfoParser = CpuinfoParser(RiscvCpuinfoImpl); |
| 109 | 109 | ||
| 110 | test "cpuinfo: RISC-V" { | 110 | test "cpuinfo: RISC-V" { |
| 111 | try testParser(RiscvCpuinfoParser, .riscv64, &Target.riscv.cpu.sifive_u74, | 111 | try testParser(RiscvCpuinfoParser, .riscv64, &Target.riscv.cpu.sifive_u74, |
| 112 | \\processor	: 0 | 112 | \\processor : 0 |
| 113 | \\hart		: 1 | 113 | \\hart : 1 |
| 114 | \\isa		: rv64imafdc | 114 | \\isa : rv64imafdc |
| 115 | \\mmu		: sv39 | 115 | \\mmu : sv39 |
| 116 | \\isa-ext : | 116 | \\isa-ext : |
| 117 | \\uarch		: sifive,u74-mc | 117 | \\uarch : sifive,u74-mc |
| 118 | ); | 118 | ); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| ... | @@ -177,16 +177,16 @@ const PowerpcCpuinfoParser = CpuinfoParser(PowerpcCpuinfoImpl); | ... | @@ -177,16 +177,16 @@ const PowerpcCpuinfoParser = CpuinfoParser(PowerpcCpuinfoImpl); |
| 177 | 177 | ||
| 178 | test "cpuinfo: PowerPC" { | 178 | test "cpuinfo: PowerPC" { |
| 179 | try testParser(PowerpcCpuinfoParser, .powerpc, &Target.powerpc.cpu.@"970", | 179 | try testParser(PowerpcCpuinfoParser, .powerpc, &Target.powerpc.cpu.@"970", |
| 180 | \\processor	: 0 | 180 | \\processor : 0 |
| 181 | \\cpu		: PPC970MP, altivec supported | 181 | \\cpu : PPC970MP, altivec supported |
| 182 | \\clock		: 1250.000000MHz | 182 | \\clock : 1250.000000MHz |
| 183 | \\revision	: 1.1 (pvr 0044 0101) | 183 | \\revision : 1.1 (pvr 0044 0101) |
| 184 | ); | 184 | ); |
| 185 | try testParser(PowerpcCpuinfoParser, .powerpc64le, &Target.powerpc.cpu.pwr8, | 185 | try testParser(PowerpcCpuinfoParser, .powerpc64le, &Target.powerpc.cpu.pwr8, |
| 186 | \\processor	: 0 | 186 | \\processor : 0 |
| 187 | \\cpu		: POWER8 (raw), altivec supported | 187 | \\cpu : POWER8 (raw), altivec supported |
| 188 | \\clock		: 2926.000000MHz | 188 | \\clock : 2926.000000MHz |
| 189 | \\revision	: 2.0 (pvr 004d 0200) | 189 | \\revision : 2.0 (pvr 004d 0200) |
| 190 | ); | 190 | ); |
| 191 | } | 191 | } |
| 192 | 192 | ||
| ... | @@ -304,25 +304,25 @@ test "cpuinfo: ARM" { | ... | @@ -304,25 +304,25 @@ test "cpuinfo: ARM" { |
| 304 | \\CPU revision : 7 | 304 | \\CPU revision : 7 |
| 305 | ); | 305 | ); |
| 306 | try testParser(ArmCpuinfoParser, .arm, &Target.arm.cpu.cortex_a7, | 306 | try testParser(ArmCpuinfoParser, .arm, &Target.arm.cpu.cortex_a7, |
| 307 | \\processor	: 0 | 307 | \\processor : 0 |
| 308 | \\model name	: ARMv7 Processor rev 3 (v7l) | 308 | \\model name : ARMv7 Processor rev 3 (v7l) |
| 309 | \\BogoMIPS	: 18.00 | 309 | \\BogoMIPS : 18.00 |
| 310 | \\Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae | 310 | \\Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae |
| 311 | \\CPU implementer	: 0x41 | 311 | \\CPU implementer : 0x41 |
| 312 | \\CPU architecture: 7 | 312 | \\CPU architecture: 7 |
| 313 | \\CPU variant	: 0x0 | 313 | \\CPU variant : 0x0 |
| 314 | \\CPU part	: 0xc07 | 314 | \\CPU part : 0xc07 |
| 315 | \\CPU revision	: 3 | 315 | \\CPU revision : 3 |
| 316 | \\ | 316 | \\ |
| 317 | \\processor	: 4 | 317 | \\processor : 4 |
| 318 | \\model name	: ARMv7 Processor rev 3 (v7l) | 318 | \\model name : ARMv7 Processor rev 3 (v7l) |
| 319 | \\BogoMIPS	: 90.00 | 319 | \\BogoMIPS : 90.00 |
| 320 | \\Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae | 320 | \\Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae |
| 321 | \\CPU implementer	: 0x41 | 321 | \\CPU implementer : 0x41 |
| 322 | \\CPU architecture: 7 | 322 | \\CPU architecture: 7 |
| 323 | \\CPU variant	: 0x2 | 323 | \\CPU variant : 0x2 |
| 324 | \\CPU part	: 0xc0f | 324 | \\CPU part : 0xc0f |
| 325 | \\CPU revision	: 3 | 325 | \\CPU revision : 3 |
| 326 | ); | 326 | ); |
| 327 | try testParser(ArmCpuinfoParser, .aarch64, &Target.aarch64.cpu.cortex_a72, | 327 | try testParser(ArmCpuinfoParser, .aarch64, &Target.aarch64.cpu.cortex_a72, |
| 328 | \\processor : 0 | 328 | \\processor : 0 |
src/link/tapi/yaml/test.zig+1-4| ... | @@ -237,10 +237,7 @@ test "double quoted string" { | ... | @@ -237,10 +237,7 @@ test "double quoted string" { |
| 237 | try testing.expectEqualStrings( | 237 | try testing.expectEqualStrings( |
| 238 | \\"here" are some escaped quotes | 238 | \\"here" are some escaped quotes |
| 239 | , arr[1]); | 239 | , arr[1]); |
| 240 | try testing.expectEqualStrings( | 240 | try testing.expectEqualStrings("newlines and tabs\nare\tsupported", arr[2]); |
| 241 | \\newlines and tabs | ||
| 242 | \\are	supported | ||
| 243 | , arr[2]); | ||
| 244 | try testing.expectEqualStrings( | 241 | try testing.expectEqualStrings( |
| 245 | \\let's have | 242 | \\let's have |
| 246 | \\some fun! | 243 | \\some fun! |
test/run_translated_c.zig+6-6| ... | @@ -26,17 +26,17 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void { | ... | @@ -26,17 +26,17 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void { |
| 26 | \\void baz(void); | 26 | \\void baz(void); |
| 27 | \\struct foo { int x; }; | 27 | \\struct foo { int x; }; |
| 28 | \\void bar() { | 28 | \\void bar() { |
| 29 | \\	struct foo tmp; | 29 | \\ struct foo tmp; |
| 30 | \\} | 30 | \\} |
| 31 | \\ | 31 | \\ |
| 32 | \\void baz() { | 32 | \\void baz() { |
| 33 | \\	struct foo tmp; | 33 | \\ struct foo tmp; |
| 34 | \\} | 34 | \\} |
| 35 | \\ | 35 | \\ |
| 36 | \\int main(void) { | 36 | \\int main(void) { |
| 37 | \\	bar(); | 37 | \\ bar(); |
| 38 | \\	baz(); | 38 | \\ baz(); |
| 39 | \\	return 0; | 39 | \\ return 0; |
| 40 | \\} | 40 | \\} |
| 41 | , ""); | 41 | , ""); |
| 42 | 42 | ||
| ... | @@ -53,7 +53,7 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void { | ... | @@ -53,7 +53,7 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void { |
| 53 | cases.add("parenthesized string literal", | 53 | cases.add("parenthesized string literal", |
| 54 | \\void foo(const char *s) {} | 54 | \\void foo(const char *s) {} |
| 55 | \\int main(void) { | 55 | \\int main(void) { |
| 56 | \\	foo(("bar")); | 56 | \\ foo(("bar")); |
| 57 | \\} | 57 | \\} |
| 58 | , ""); | 58 | , ""); |
| 59 | 59 |
test/translate_c.zig+17-17| ... | @@ -133,20 +133,20 @@ pub fn addCases(cases: *tests.TranslateCContext) void { | ... | @@ -133,20 +133,20 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 133 | 133 | ||
| 134 | cases.add("scoped typedef", | 134 | cases.add("scoped typedef", |
| 135 | \\void foo() { | 135 | \\void foo() { |
| 136 | \\	typedef union { | 136 | \\ typedef union { |
| 137 | \\		int A; | 137 | \\ int A; |
| 138 | \\		int B; | 138 | \\ int B; |
| 139 | \\		int C; | 139 | \\ int C; |
| 140 | \\	} Foo; | 140 | \\ } Foo; |
| 141 | \\	Foo a = {0}; | 141 | \\ Foo a = {0}; |
| 142 | \\	{ | 142 | \\ { |
| 143 | \\		typedef union { | 143 | \\ typedef union { |
| 144 | \\			int A; | 144 | \\ int A; |
| 145 | \\			int B; | 145 | \\ int B; |
| 146 | \\			int C; | 146 | \\ int C; |
| 147 | \\		} Foo; | 147 | \\ } Foo; |
| 148 | \\		Foo a = {0}; | 148 | \\ Foo a = {0}; |
| 149 | \\	} | 149 | \\ } |
| 150 | \\} | 150 | \\} |
| 151 | , &[_][]const u8{ | 151 | , &[_][]const u8{ |
| 152 | \\pub export fn foo() void { | 152 | \\pub export fn foo() void { |
| ... | @@ -2043,18 +2043,18 @@ pub fn addCases(cases: *tests.TranslateCContext) void { | ... | @@ -2043,18 +2043,18 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 2043 | \\ break; | 2043 | \\ break; |
| 2044 | \\ } | 2044 | \\ } |
| 2045 | \\ case 4: | 2045 | \\ case 4: |
| 2046 | \\		case 5: | 2046 | \\ case 5: |
| 2047 | \\ res = 69; | 2047 | \\ res = 69; |
| 2048 | \\ { | 2048 | \\ { |
| 2049 | \\ res = 5; | 2049 | \\ res = 5; |
| 2050 | \\			 return; | 2050 | \\ return; |
| 2051 | \\ } | 2051 | \\ } |
| 2052 | \\ case 6: | 2052 | \\ case 6: |
| 2053 | \\ switch (res) { | 2053 | \\ switch (res) { |
| 2054 | \\ case 9: break; | 2054 | \\ case 9: break; |
| 2055 | \\ } | 2055 | \\ } |
| 2056 | \\ res = 1; | 2056 | \\ res = 1; |
| 2057 | \\			 return; | 2057 | \\ return; |
| 2058 | \\ } | 2058 | \\ } |
| 2059 | \\} | 2059 | \\} |
| 2060 | , &[_][]const u8{ | 2060 | , &[_][]const u8{ |