From: Evan Cheng Date: Fri, 27 Jan 2006 21:49:34 +0000 (+0000) Subject: Added a temporary option -enable-x86-sse to enable sse support. It is used by X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=dbd38d7f64697b72364387e25dd062c5ce276466;p=oota-llvm.git Added a temporary option -enable-x86-sse to enable sse support. It is used by llc-beta. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25701 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index faa090718b9..32574d10536 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -16,6 +16,13 @@ #include "X86GenSubtarget.inc" using namespace llvm; +// FIXME: temporary. +#include "llvm/Support/CommandLine.h" +namespace { + cl::opt EnableSSE("enable-x86-sse", cl::Hidden, + cl::desc("Enable sse on X86")); +} + static void GetCpuIDAndInfo(unsigned value, unsigned *EAX, unsigned *EBX, unsigned *ECX, unsigned *EDX) { #if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86) @@ -96,8 +103,10 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS) // FIXME: Force these off until they work. An llc-beta option should turn // them back on. - X86SSELevel = NoMMXSSE; - X863DNowLevel = NoThreeDNow; + if (!EnableSSE) { + X86SSELevel = NoMMXSSE; + X863DNowLevel = NoThreeDNow; + } // Set the boolean corresponding to the current target triple, or the default // if one cannot be determined, to true.