From 8492f51027cf290d10ae2fb8e59d89cca327837e Mon Sep 17 00:00:00 2001 From: Jean Dao Date: Fri, 4 Feb 2022 17:42:58 +0100 Subject: [PATCH] C backend: 128-bit ints on big endian arch is not yet supported --- src/codegen/c.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 03eef276a22a..ff1a0fafb77d 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -423,6 +423,9 @@ pub const DeclGen = struct { comptime assert(int_info.bits <= 128); + // TODO support big endian arch + comptime assert(builtin.cpu.arch.endian() == .Little); + // Clang and GCC don't support 128-bit integer constants but will hopefully unfold them // if we construct one manually. const magnitude = std.math.absCast(int_val);