authorgravatar for reserveblue@protonmail.comdrew <reserveblue@protonmail.com> 2021-11-14 18:31:31-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-16 16:51:31-07:00
log34684725aa728e392368a5743e1a2405328d5788
treeb1315a5017114fa4d2475f43c423bdc1f7adfd42
parent9bf1681990fe87a6b2e5fc644a89f1aece304579

fmt


2 files changed, 4 insertions(+), 4 deletions(-)

src/codegen/c.zig+3-3
...@@ -248,10 +248,10 @@ pub const DeclGen = struct {...@@ -248,10 +248,10 @@ pub const DeclGen = struct {
248 if (is_neg) try writer.writeByte('-');248 if (is_neg) try writer.writeByte('-');
249249
250 assert(high > 0);250 assert(high > 0);
251 try writer.print("(((uint128_t)0x{x}u<<64)", .{ high });251 try writer.print("(((uint128_t)0x{x}u<<64)", .{high});
252252
253 if (low > 0)253 if (low > 0)
254 try writer.print("+(uint128_t)0x{x}u", .{ low });254 try writer.print("+(uint128_t)0x{x}u", .{low});
255255
256 return writer.writeByte(')');256 return writer.writeByte(')');
257 }257 }
...@@ -306,7 +306,7 @@ pub const DeclGen = struct {...@@ -306,7 +306,7 @@ pub const DeclGen = struct {
306 if (ty.isSignedInt())306 if (ty.isSignedInt())
307 return writer.print("{d}", .{val.toSignedInt()});307 return writer.print("{d}", .{val.toSignedInt()});
308 return writer.print("{d}u", .{val.toUnsignedInt()});308 return writer.print("{d}u", .{val.toUnsignedInt()});
309 }309 },
310 },310 },
311 .Float => {311 .Float => {
312 if (ty.floatBits(dg.module.getTarget()) <= 64) {312 if (ty.floatBits(dg.module.getTarget()) <= 64) {
test/behavior/int128.zig+1-1
...@@ -40,4 +40,4 @@ test "int128" {...@@ -40,4 +40,4 @@ test "int128" {
40test "truncate int128" {40test "truncate int128" {
41 var buff: u128 = maxInt(u128);41 var buff: u128 = maxInt(u128);
42 try expect(@truncate(u64, buff) == maxInt(u64));42 try expect(@truncate(u64, buff) == maxInt(u64));
43}
\ No newline at end of file
43}