diff options
| author | Travis Staloch <twostepted@gmail.com> | 2021-09-09 14:17:59 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-09-28 17:03:43 -0700 |
| commit | 487059535242e2b94303502806feaa99d560c63b (patch) | |
| tree | d0940ca8756bb848b30dcd8a6c59566ff3a44921 /src/codegen/c.zig | |
| parent | 1d86eae5269edcac5f32d166f13ed27483f07688 (diff) | |
| download | zig-487059535242e2b94303502806feaa99d560c63b.tar.gz zig-487059535242e2b94303502806feaa99d560c63b.zip | |
sat-arithmetic: add additional tokenizer tests
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 37e19d9e1a..6101740eea 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -1347,6 +1347,7 @@ fn airSatOp( .c_longlong => "LLONG_MIN", .isize => "INTPTR_MIN", else => blk: { + // compute the type minimum based on the bitcount (bits) const val = -1 * std.math.pow(i65, 2, @intCast(i65, bits - 1)); break :blk std.fmt.bufPrint(&min_buf, "{d}", .{val}) catch |err| switch (err) { error.NoSpaceLeft => unreachable, |
