summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-11-25 15:14:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-11-25 15:14:49 +0000
commitcdb9a538d6d4d71fe0e3ba2252005d6f42551c58 (patch)
treef76fea526912d1056f54eccb84b3bb63476b7342 /llvm/lib/MC/MCStreamer.cpp
parentbefe130dd24cbacd66f9975c5151389634abd0dd (diff)
downloadbcm5719-llvm-cdb9a538d6d4d71fe0e3ba2252005d6f42551c58.tar.gz
bcm5719-llvm-cdb9a538d6d4d71fe0e3ba2252005d6f42551c58.zip
Add support for .cfi_register now that it is easy to extent the representation
to support it. Original patch with the parsing and plumbing by the PaX team and Roman Divacky. I added the bits in MCDwarf.cpp and the test. llvm-svn: 168565
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 4f6b6239cc8..cdfd5246f30 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -356,6 +356,14 @@ void MCStreamer::EmitCFIUndefined(int64_t Register) {
CurFrame->Instructions.push_back(Instruction);
}
+void MCStreamer::EmitCFIRegister(int64_t Register1, int64_t Register2) {
+ MCSymbol *Label = EmitCFICommon();
+ MCCFIInstruction Instruction =
+ MCCFIInstruction::createRegister(Label, Register1, Register2);
+ MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
+ CurFrame->Instructions.push_back(Instruction);
+}
+
void MCStreamer::setCurrentW64UnwindInfo(MCWin64EHUnwindInfo *Frame) {
W64UnwindInfos.push_back(Frame);
CurrentW64UnwindInfo = W64UnwindInfos.back();
OpenPOWER on IntegriCloud