summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-02-20 18:03:44 +0000
committerChad Rosier <mcrosier@apple.com>2013-02-20 18:03:44 +0000
commita018cfd10c5a5566b2a3aa59141126b41afd1666 (patch)
tree46c6e1e68bb610984dca9c73aa2ca37305d39ea9
parent14a32d86826fa4560fe540a601d30b94b7c5ee1f (diff)
downloadbcm5719-llvm-a018cfd10c5a5566b2a3aa59141126b41afd1666.tar.gz
bcm5719-llvm-a018cfd10c5a5566b2a3aa59141126b41afd1666.zip
[ms-inline asm] Make the comment a bit more verbose.
llvm-svn: 175641
-rw-r--r--llvm/lib/Target/X86/X86RegisterInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp
index fbe6331e845..3b9144dc0b8 100644
--- a/llvm/lib/Target/X86/X86RegisterInfo.cpp
+++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp
@@ -389,8 +389,12 @@ bool X86RegisterInfo::hasBasePointer(const MachineFunction &MF) const {
return false;
// When we need stack realignment and there are dynamic allocas, we can't
- // reference off of the stack pointer, so we reserve a base pointer. This
- // is also true if the function contain MS-style inline assembly.
+ // reference off of the stack pointer, so we reserve a base pointer.
+ //
+ // This is also true if the function contain MS-style inline assembly. We
+ // do this because if any stack changes occur in the inline assembly, e.g.,
+ // "pusha", then any C local variable or C argument references in the
+ // inline assembly will be wrong because the SP is not properly tracked.
if ((needsStackRealignment(MF) && MFI->hasVarSizedObjects()) ||
MF.hasMSInlineAsm())
return true;
OpenPOWER on IntegriCloud