From c8fec7e21f5c24303eab8a8592f3b8faff347d86 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 23 Nov 2012 16:59:41 +0000 Subject: Implement .cfi_undefined. Based on a patch from PaX team, updated by Roman Divacky. I just added the testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168520 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCDwarf.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/MC/MCDwarf.cpp') diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp index bb9ed4952e..85b47fe437 100644 --- a/lib/MC/MCDwarf.cpp +++ b/lib/MC/MCDwarf.cpp @@ -938,6 +938,16 @@ void FrameEmitterImpl::EmitCFIInstruction(MCStreamer &Streamer, bool VerboseAsm = Streamer.isVerboseAsm(); switch (Instr.getOperation()) { + case MCCFIInstruction::Undefined: { + unsigned Reg = Instr.getDestination().getReg(); + if (VerboseAsm) { + Streamer.AddComment("DW_CFA_undefined"); + Streamer.AddComment(Twine("Reg ") + Twine(Reg)); + } + Streamer.EmitIntValue(dwarf::DW_CFA_undefined, 1); + Streamer.EmitULEB128IntValue(Reg); + return; + } case MCCFIInstruction::Move: case MCCFIInstruction::RelMove: { const MachineLocation &Dst = Instr.getDestination(); -- cgit v1.2.3