authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-24 12:28:08-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-24 17:10:08-07:00
log546c75ca46eff73e5f038e2b894ff96c65cd8960
tree309279828f67aaee8126577cd7081a2c24b0c6bd
parent4624c818991f161fc6a7021119e4d071b6e40e6c

LLVM: notice the soft_float CPU feature

when deciding whether to lower to x86_fp80 instructions, or softfloat instructions. Closes #10847 Closes #12090

1 files changed, 1 insertions(+), 1 deletions(-)

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