From 10c47c5ab1c77cb59b64b6162cb70ec684248033 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 8e793ed45f10..01f63f2f9422 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -404,6 +404,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);