zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 76558f8c6b8361ab520ea77e4b4cd2bfc8f688ad (tree)
parent 68bd82d0cc9b0cd07cde509c1c89a438b6d297c9
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Sat, 22 Feb 2025 12:23:53 +0100

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.

Diffstat:
Msrc/codegen/llvm.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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,