llvm/test
David Majnemer 19d1ebc725 [X86] Add intrinsics for reading and writing to the flags register
LLVM's targets need to know if stack pointer adjustments occur after the
prologue.  This is needed to correctly determine if the red-zone is
appropriate to use or if a frame pointer is required.

Normally, LLVM can figure this out very precisely by reasoning about the
contents of the MachineFunction.  There is an interesting corner case:
inline assembly.

The vast majority of inline assembly which will perform a push or pop is
done so to pair up with pushf or popf as appropriate.  Unfortunately,
this inline assembly doesn't mark the stack pointer as clobbered
because, well, it isn't.  The stack pointer is decremented and then
immediately incremented.  Because of this, LLVM was changed in r256456
to conservatively assume that inline assembly contain a sequence of
stack operations.  This is unfortunate because the vast majority of
inline assembly will not end up manipulating the stack pointer in any
way at all.

Instead, let's provide a more principled solution: an intrinsic.
FWIW, other compilers (MSVC and GCC among them) also provide this
functionality as an intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256685 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-01 06:50:01 +00:00
..
Analysis [ValueTracking] fix bug computing isKnownToBeAPowerOfTwo() with arithmetic shift right (PR25900) 2015-12-30 22:40:52 +00:00
Assembler
Bindings
Bitcode
BugPoint
CodeGen [X86] Add intrinsics for reading and writing to the flags register 2016-01-01 06:50:01 +00:00
DebugInfo [X86] Add intrinsics for reading and writing to the flags register 2016-01-01 06:50:01 +00:00
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
LibDriver
Linker
LTO
MC Accept dwarf version 5 for CIE versions. 2015-12-28 23:02:42 +00:00
Object
Other
SymbolRewriter
TableGen
tools Fix gold test after r256465. 2015-12-29 03:48:37 +00:00
Transforms [LibCallSimplifier] propagate FMF when shrinking binary calls 2015-12-31 23:40:59 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh