1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/DebugInfo/COFF
David Majnemer 93803262f4 [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.

llvm-svn: 256685
2016-01-01 06:50:01 +00:00
..
asan-module-ctor.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
asan-module-without-functions.ll
asm.ll [X86] Add intrinsics for reading and writing to the flags register 2016-01-01 06:50:01 +00:00
cpp-mangling.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
lit.local.cfg
multifile.ll Reland "[llvm-readobj] Simplify usage of -codeview flag" 2015-12-16 18:28:12 +00:00
multifunction.ll Reland "[llvm-readobj] Simplify usage of -codeview flag" 2015-12-16 18:28:12 +00:00
simple.ll Reland "[llvm-readobj] Simplify usage of -codeview flag" 2015-12-16 18:28:12 +00:00
tail-call-without-lexical-scopes.ll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00