Skip to content

Commit 76558f8

Browse files
committed
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 ziglang#21671.
1 parent 68bd82d commit 76558f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codegen/llvm.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12578,7 +12578,7 @@ fn ccAbiPromoteInt(
1257812578
else => null,
1257912579
},
1258012580
else => switch (target.cpu.arch) {
12581-
.riscv64 => switch (int_info.bits) {
12581+
.loongarch64, .riscv64 => switch (int_info.bits) {
1258212582
0...16 => int_info.signedness,
1258312583
32 => .signed, // LLVM always signextends 32 bit ints, unsure if bug.
1258412584
17...31, 33...63 => int_info.signedness,

0 commit comments

Comments
 (0)