| author | |
| committer | |
| log | ea4d2759a51f2805e8345fe85500feefef3f504c |
| tree | 575aa81d0fa002c6f9396c62b8f3c4fb5774c1a4 |
| parent | 6de8b4bc3d105c15cd473c5bf100db4c9328dd54 |
| parent | 71ca0b176f7a643ef7606d12f4001b445a115092 |
| signature |
CBE: amending an incorrect test name, plus two small fixes3 files changed, 6 insertions(+), 4 deletions(-)
src/codegen/c.zig+1-1| ... | @@ -2541,7 +2541,7 @@ fn airMinMax(f: *Function, inst: Air.Inst.Index, operator: [*:0]const u8) !CValu | ... | @@ -2541,7 +2541,7 @@ fn airMinMax(f: *Function, inst: Air.Inst.Index, operator: [*:0]const u8) !CValu |
| 2541 | try f.writeCValue(writer, lhs); | 2541 | try f.writeCValue(writer, lhs); |
| 2542 | try writer.print("{s}", .{operator}); | 2542 | try writer.print("{s}", .{operator}); |
| 2543 | try f.writeCValue(writer, rhs); | 2543 | try f.writeCValue(writer, rhs); |
| 2544 | try writer.writeAll(") "); | 2544 | try writer.writeAll(") ? "); |
| 2545 | try f.writeCValue(writer, lhs); | 2545 | try f.writeCValue(writer, lhs); |
| 2546 | try writer.writeAll(" : "); | 2546 | try writer.writeAll(" : "); |
| 2547 | try f.writeCValue(writer, rhs); | 2547 | try f.writeCValue(writer, rhs); |
src/link/C/zig.h+2| ... | @@ -1,3 +1,5 @@ | ... | @@ -1,3 +1,5 @@ |
| 1 | #undef linux | ||
| 2 | |||
| 1 | #if __STDC_VERSION__ >= 201112L | 3 | #if __STDC_VERSION__ >= 201112L |
| 2 | #define zig_noreturn _Noreturn | 4 | #define zig_noreturn _Noreturn |
| 3 | #define zig_threadlocal thread_local | 5 | #define zig_threadlocal thread_local |
test/behavior/bugs/2114.zig+3-3| ... | @@ -7,11 +7,11 @@ fn ctz(x: anytype) usize { | ... | @@ -7,11 +7,11 @@ fn ctz(x: anytype) usize { |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | test "fixed" { | 9 | test "fixed" { |
| 10 | try testClz(); | 10 | try testCtz(); |
| 11 | comptime try testClz(); | 11 | comptime try testCtz(); |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | fn testClz() !void { | 14 | fn testCtz() !void { |
| 15 | try expect(ctz(@as(u128, 0x40000000000000000000000000000000)) == 126); | 15 | try expect(ctz(@as(u128, 0x40000000000000000000000000000000)) == 126); |
| 16 | try expect(math.rotl(u128, @as(u128, 0x40000000000000000000000000000000), @as(u8, 1)) == @as(u128, 0x80000000000000000000000000000000)); | 16 | try expect(math.rotl(u128, @as(u128, 0x40000000000000000000000000000000), @as(u8, 1)) == @as(u128, 0x80000000000000000000000000000000)); |
| 17 | try expect(ctz(@as(u128, 0x80000000000000000000000000000000)) == 127); | 17 | try expect(ctz(@as(u128, 0x80000000000000000000000000000000)) == 127); |