mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 05:20:34 +00:00
LLVM: zeroext/signext does happen on macos
Fixes a regression introduced in 3ce7fee9dd8bbb6f56e47758a9a8ada028400c71.
This commit is contained in:
parent
7e1cba73fc
commit
e9efed9ed1
@ -11577,30 +11577,36 @@ fn ccAbiPromoteInt(
|
||||
.Int, .Enum, .ErrorSet => ty.intInfo(mod),
|
||||
else => return null,
|
||||
};
|
||||
return switch (target.cpu.arch) {
|
||||
.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,
|
||||
else => null,
|
||||
},
|
||||
|
||||
.sparc64,
|
||||
.powerpc64,
|
||||
.powerpc64le,
|
||||
=> switch (int_info.bits) {
|
||||
0...63 => int_info.signedness,
|
||||
else => null,
|
||||
},
|
||||
|
||||
.aarch64,
|
||||
.aarch64_be,
|
||||
=> null,
|
||||
|
||||
else => switch (int_info.bits) {
|
||||
return switch (target.os.tag) {
|
||||
.macos => switch (int_info.bits) {
|
||||
0...16 => int_info.signedness,
|
||||
else => null,
|
||||
},
|
||||
else => switch (target.cpu.arch) {
|
||||
.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,
|
||||
else => null,
|
||||
},
|
||||
|
||||
.sparc64,
|
||||
.powerpc64,
|
||||
.powerpc64le,
|
||||
=> switch (int_info.bits) {
|
||||
0...63 => int_info.signedness,
|
||||
else => null,
|
||||
},
|
||||
|
||||
.aarch64,
|
||||
.aarch64_be,
|
||||
=> null,
|
||||
|
||||
else => switch (int_info.bits) {
|
||||
0...16 => int_info.signedness,
|
||||
else => null,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user