]> granicus.if.org Git - llvm/commit
[AsmPrinterDwarf] Add support for .cfi_restore directive
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Thu, 2 Nov 2017 12:00:58 +0000 (12:00 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Thu, 2 Nov 2017 12:00:58 +0000 (12:00 +0000)
commit4352a046c591aec0915c4f16d54d03b1d00c1efa
tree52b09d6e31d27dcdf6e4036cdafce6ee069e9a1c
parent1e702fd9054b0c7b66e16c5e3d67ed75f44b3a22
[AsmPrinterDwarf] Add support for .cfi_restore directive

As of today we only use .cfi_offset to specify the offset of a CSR, but
we never use .cfi_restore when the CSR is restored.

If we want to perform a more advanced type of shrink-wrapping, we need
to use .cfi_restore in order to switch the CFI state between blocks.

This patch only aims at adding support for the directive.

Differential Revision: https://reviews.llvm.org/D36114

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317199 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
lib/CodeGen/MIRParser/MILexer.cpp
lib/CodeGen/MIRParser/MILexer.h
lib/CodeGen/MIRParser/MIParser.cpp
lib/CodeGen/MIRPrinter.cpp
lib/MC/MCAsmStreamer.cpp
test/CodeGen/AArch64/cfi_restore.mir [new file with mode: 0644]
test/CodeGen/MIR/AArch64/cfi-def-cfa.mir [deleted file]
test/CodeGen/MIR/AArch64/cfi.mir [new file with mode: 0644]
test/MC/AArch64/cfi.s [new file with mode: 0644]