| ... | ... | @@ -11563,28 +11563,31 @@ fn ccAbiPromoteInt( |
| 11563 | 11563 | .Int, .Enum, .ErrorSet => ty.intInfo(mod), |
| 11564 | 11564 | else => return null, |
| 11565 | 11565 | }; |
| 11566 | | if (int_info.bits <= 16) return int_info.signedness; |
| 11567 | | switch (target.cpu.arch) { |
| 11568 | | .riscv64 => { |
| 11569 | | if (int_info.bits == 32) { |
| 11570 | | // LLVM always signextends 32 bit ints, unsure if bug. |
| 11571 | | return .signed; |
| 11572 | | } |
| 11573 | | if (int_info.bits < 64) { |
| 11574 | | return int_info.signedness; |
| 11575 | | } |
| 11566 | return switch (target.cpu.arch) { |
| 11567 | .riscv64 => switch (int_info.bits) { |
| 11568 | 0...16 => int_info.signedness, |
| 11569 | 32 => .signed, // LLVM always signextends 32 bit ints, unsure if bug. |
| 11570 | 17...31, 33...63 => int_info.signedness, |
| 11571 | else => null, |
| 11576 | 11572 | }, |
| 11573 | |
| 11577 | 11574 | .sparc64, |
| 11578 | 11575 | .powerpc64, |
| 11579 | 11576 | .powerpc64le, |
| 11580 | | => { |
| 11581 | | if (int_info.bits < 64) { |
| 11582 | | return int_info.signedness; |
| 11583 | | } |
| 11577 | => switch (int_info.bits) { |
| 11578 | 0...63 => int_info.signedness, |
| 11579 | else => null, |
| 11584 | 11580 | }, |
| 11585 | | else => {}, |
| 11586 | | } |
| 11587 | | return null; |
| 11581 | |
| 11582 | .aarch64, |
| 11583 | .aarch64_be, |
| 11584 | => null, |
| 11585 | |
| 11586 | else => switch (int_info.bits) { |
| 11587 | 0...16 => int_info.signedness, |
| 11588 | else => null, |
| 11589 | }, |
| 11590 | }; |
| 11588 | 11591 | } |
| 11589 | 11592 | |
| 11590 | 11593 | /// This is the one source of truth for whether a type is passed around as an LLVM pointer, |