aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-11-02 12:00:58 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-11-02 12:00:58 +0000
commit66d2c269dc153c36cb35898082a38eb47bbb4ce0 (patch)
tree80a1abeec5edff352463a3b5c6c79ae83d75968f /llvm/lib/CodeGen/MIRPrinter.cpp
parente73b85d1abfe7363164c5a7e5f58c1ceaeeb62f9 (diff)
downloadllvm-66d2c269dc153c36cb35898082a38eb47bbb4ce0.zip
llvm-66d2c269dc153c36cb35898082a38eb47bbb4ce0.tar.gz
llvm-66d2c269dc153c36cb35898082a38eb47bbb4ce0.tar.bz2
[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 llvm-svn: 317199
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index f8da8d3..aae4858 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -1243,6 +1243,12 @@ void MIPrinter::print(const MCCFIInstruction &CFI,
printCFIRegister(CFI.getRegister(), OS, TRI);
OS << ", " << CFI.getOffset();
break;
+ case MCCFIInstruction::OpRestore:
+ OS << "restore ";
+ if (CFI.getLabel())
+ OS << "<mcsymbol> ";
+ printCFIRegister(CFI.getRegister(), OS, TRI);
+ break;
default:
// TODO: Print the other CFI Operations.
OS << "<unserializable cfi operation>";