[llvm-commits] [llvm] r63642 - /llvm/trunk/lib/Target/X86/X86Subtarget.cpp
Dale Johannesen
dalej at apple.com
Tue Feb 3 10:58:24 PST 2009
On Feb 3, 2009, at 10:53 AMPST, Dan Gohman wrote:
> Author: djg
> Date: Tue Feb 3 12:53:21 2009
> New Revision: 63642
>
> URL: http://llvm.org/viewvc/llvm-project?rev=63642&view=rev
> Log:
> Tevert part of the x86 subtarget logic changes: when -march=x86-64
> is given, override the subtarget settings and enable 64-bit support.
> This restores the earlier behavior, and fixes regressions on
> Non-64-bit-capable x86-32 hosts.
>
> This isn't necessarily the best approach, but the most obvious
> alternative is to require -mcpu=x86-64 or -mattr=+64bit to be used
> with -march=x86-64 when the host doesn't have 64-bit support. This
> makes things little more consistent, but it's less convenient, and
> it has the practical drawback of requiring lots of test changes, so
> I opted for the above approach for now.
btw, is the interaction of -mcpu, -mattr and -march documented
anywhere? It should be.
> Modified:
> llvm/trunk/lib/Target/X86/X86Subtarget.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=63642&r1=63641&r2=63642&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Tue Feb 3 12:53:21
> 2009
> @@ -327,15 +327,16 @@
> } else {
> // Otherwise, use CPUID to auto-detect feature set.
> AutoDetectSubtargetFeatures();
> - // If requesting codegen for X86-64, make sure that 64-bit
> features
> - // are enabled.
> - if (Is64Bit)
> - HasX86_64 = true;
> // Make sure SSE2 is enabled; it is available on all X86-64 CPUs.
> if (Is64Bit && X86SSELevel < SSE2)
> X86SSELevel = SSE2;
> }
>
> + // If requesting codegen for X86-64, make sure that 64-bit features
> + // are enabled.
> + if (Is64Bit)
> + HasX86_64 = true;
> +
> DOUT << "Subtarget features: SSELevel " << X86SSELevel
> << ", 3DNowLevel " << X863DNowLevel
> << ", 64bit " << HasX86_64 << "\n";
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list