1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-30 08:19:09 +00:00

Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as

the FreeBSD ABI requires.  This is essentially a revert of upstream llvm
commit r126226, and it will be reverted by upstream too.

MFC after:	1 week
This commit is contained in:
Dimitry Andric 2012-11-09 18:56:27 +00:00
parent 73332e7c82
commit 39d9149396
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242835

View File

@ -416,12 +416,12 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU,
assert((!In64BitMode || HasX86_64) &&
"64-bit code requested on a subtarget that doesn't support it!");
// Stack alignment is 16 bytes on Darwin, FreeBSD, Linux and Solaris (both
// 32 and 64 bit) and for all 64-bit targets.
// Stack alignment is 16 bytes on Darwin, Linux and Solaris (both 32 and 64
// bit) and for all 64-bit targets.
if (StackAlignOverride)
stackAlignment = StackAlignOverride;
else if (isTargetDarwin() || isTargetFreeBSD() || isTargetLinux() ||
isTargetSolaris() || In64BitMode)
else if (isTargetDarwin() || isTargetLinux() || isTargetSolaris() ||
In64BitMode)
stackAlignment = 16;
}