From 76558f8c6b8361ab520ea77e4b4cd2bfc8f688ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 22 Feb 2025 12:23:53 +0100 Subject: [PATCH] llvm: Fix C ABI integer promotion for loongarch64. It appears to just be a 1:1 copy of riscv64, including the super weird sign extension quirk for u32. Contributes to #21671. --- src/codegen/llvm.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index a6dbb08a42..fe68721665 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -12578,7 +12578,7 @@ fn ccAbiPromoteInt( else => null, }, else => switch (target.cpu.arch) { - .riscv64 => switch (int_info.bits) { + .loongarch64, .riscv64 => switch (int_info.bits) { 0...16 => int_info.signedness, 32 => .signed, // LLVM always signextends 32 bit ints, unsure if bug. 17...31, 33...63 => int_info.signedness,