LLVM: notice the soft_float CPU feature

when deciding whether to lower to x86_fp80 instructions, or softfloat
instructions.

Closes #10847
Closes #12090
This commit is contained in:
Andrew Kelley 2022-07-24 12:28:08 -07:00
parent 4624c81899
commit 546c75ca46

View File

@ -9514,7 +9514,7 @@ fn isByRef(ty: Type) bool {
/// and false if we expect LLVM to crash if it counters an x86_fp80 type.
fn backendSupportsF80(target: std.Target) bool {
return switch (target.cpu.arch) {
.x86_64, .i386 => true,
.x86_64, .i386 => !std.Target.x86.featureSetHas(target.cpu.features, .soft_float),
else => false,
};
}