diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-09-07 12:23:47 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-09-07 12:23:47 +0000 |
commit | 05a059d5d8d039dbbec3607b313c38fba14f972e (patch) | |
tree | da51d3cac39b1fd6e9d1fb04597afedb5aa0958f /lib/Target/X86/X86Subtarget.cpp | |
parent | 41b3252e797c01f73616c8ba91caa8783620aeb4 (diff) |
Make the x86 asm flavor part of the subtarget info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r-- | lib/Target/X86/X86Subtarget.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 2c2acec299..5107f912f3 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -13,9 +13,24 @@ #include "X86Subtarget.h" #include "llvm/Module.h" +#include "llvm/Support/CommandLine.h" #include "X86GenSubtarget.inc" using namespace llvm; +cl::opt<X86Subtarget::AsmWriterFlavorTy> +AsmWriterFlavor("x86-asm-syntax", + cl::desc("Choose style of code to emit from X86 backend:"), + cl::values( + clEnumValN(X86Subtarget::att, "att", " Emit AT&T-style assembly"), + clEnumValN(X86Subtarget::intel, "intel", " Emit Intel-style assembly"), + clEnumValEnd), +#ifdef _MSC_VER + cl::init(X86Subtarget::intel) +#else + cl::init(X86Subtarget::att) +#endif + ); + /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in the /// specified arguments. If we can't run cpuid on the host, return true. static bool GetCpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX, @@ -151,6 +166,7 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS) { MinRepStrSizeThreshold = 128; X86SSELevel = NoMMXSSE; X863DNowLevel = NoThreeDNow; + AsmFlavor = AsmWriterFlavor; Is64Bit = false; // Determine default and user specified characteristics |