mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 23:53:15 +00:00
Merge pull request #11180 from jmc-88/cbe3
CBE: amending an incorrect test name, plus two small fixes
This commit is contained in:
commit
ea4d2759a5
@ -2541,7 +2541,7 @@ fn airMinMax(f: *Function, inst: Air.Inst.Index, operator: [*:0]const u8) !CValu
|
||||
try f.writeCValue(writer, lhs);
|
||||
try writer.print("{s}", .{operator});
|
||||
try f.writeCValue(writer, rhs);
|
||||
try writer.writeAll(") ");
|
||||
try writer.writeAll(") ? ");
|
||||
try f.writeCValue(writer, lhs);
|
||||
try writer.writeAll(" : ");
|
||||
try f.writeCValue(writer, rhs);
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#undef linux
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
#define zig_noreturn _Noreturn
|
||||
#define zig_threadlocal thread_local
|
||||
|
||||
@ -7,11 +7,11 @@ fn ctz(x: anytype) usize {
|
||||
}
|
||||
|
||||
test "fixed" {
|
||||
try testClz();
|
||||
comptime try testClz();
|
||||
try testCtz();
|
||||
comptime try testCtz();
|
||||
}
|
||||
|
||||
fn testClz() !void {
|
||||
fn testCtz() !void {
|
||||
try expect(ctz(@as(u128, 0x40000000000000000000000000000000)) == 126);
|
||||
try expect(math.rotl(u128, @as(u128, 0x40000000000000000000000000000000), @as(u8, 1)) == @as(u128, 0x80000000000000000000000000000000));
|
||||
try expect(ctz(@as(u128, 0x80000000000000000000000000000000)) == 127);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user