Provide option for stack alignment override

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49593 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2008-04-12 22:12:22 +00:00
parent 4b5324ad2c
commit 78c80fdbdd

View File

@ -26,6 +26,10 @@ AsmWriterFlavor("x86-asm-syntax", cl::init(X86Subtarget::Unset),
clEnumValN(X86Subtarget::Intel, "intel", " Emit Intel-style assembly"), clEnumValN(X86Subtarget::Intel, "intel", " Emit Intel-style assembly"),
clEnumValEnd)); clEnumValEnd));
cl::opt<unsigned>
StackAlignment("stack-alignment", cl::init(0),
cl::desc("Override default stack alignment"));
/// True if accessing the GV requires an extra load. For Windows, dllimported /// True if accessing the GV requires an extra load. For Windows, dllimported
/// symbols are indirect, loading the value at address GV rather then the /// symbols are indirect, loading the value at address GV rather then the
@ -316,4 +320,7 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
TargetType == isWindows || TargetType == isWindows ||
(TargetType == isELF && Is64Bit)) (TargetType == isELF && Is64Bit))
stackAlignment = 16; stackAlignment = 16;
if (StackAlignment)
stackAlignment = StackAlignment;
} }