From a5714ddb973305b38703a69093af066514bdd8f8 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 9 Oct 2019 15:06:22 -0400 Subject: [PATCH] add comments about why we choose pentium4 for i386 target See #3389 --- src/codegen.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/codegen.cpp b/src/codegen.cpp index c7acdc992a..fdc67b4dd6 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8728,6 +8728,11 @@ static void init(CodeGen *g) { target_specific_cpu_args = ""; target_specific_features = riscv_default_features; } else if (g->zig_target->arch == ZigLLVM_x86) { + // This is because we're really targeting i686 rather than i386. + // It's pretty much impossible to use many of the language features + // such as fp16 if you stick use the x87 only. This is also what clang + // uses as base cpu. + // TODO https://github.com/ziglang/zig/issues/2883 target_specific_cpu_args = "pentium4"; target_specific_features = ""; } else {