llvm-6502/lib/MC/MCParser
Reid Kleckner ec4d326aad Fix miscompile of MS inline assembly with stack realignment
For stack frames requiring realignment, three pointers may be needed:
- ebp to address incoming arguments
- esi (could be any callee-saved register) to address locals
- esp to address outgoing arguments

We would use esi unconditionally without verifying that it did not
conflict with inline assembly.

This change doesn't do the verification, it simply emits a fatal error
on functions that use stack realignment, dynamic SP adjustments, and
inline assembly.

Because stack realignment is common on Windows, we also no longer assume
that MS inline assembly clobbers esp.  Instead, we analyze the inline
instructions for implicit definitions and check if esp is there.  If so,
we require the use of a base pointer and consider it in the condition
above.

Mostly fixes PR16830, but we could try harder to find a non-conflicting
base pointer.

Reviewers: sunfish

Differential Revision: http://llvm-reviews.chandlerc.com/D1317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196876 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-10 05:12:23 +00:00
..
AsmLexer.cpp Cache AllowAtInIdentifier as class variable in AsmLexer 2013-12-06 23:05:33 +00:00
AsmParser.cpp Fix miscompile of MS inline assembly with stack realignment 2013-12-10 05:12:23 +00:00
CMakeLists.txt
COFFAsmParser.cpp Support multiple COFF sections with the same name but different COMDAT. 2013-11-19 19:52:52 +00:00
DarwinAsmParser.cpp Add Support For .bss Named Section Directive For Darwin Targets. 2013-10-02 14:09:29 +00:00
ELFAsmParser.cpp Move .ident handling to MCStreamer. 2013-10-16 01:05:45 +00:00
LLVMBuild.txt
Makefile
MCAsmLexer.cpp
MCAsmParser.cpp
MCAsmParserExtension.cpp
MCTargetAsmParser.cpp