aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-11-23 16:59:41 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-11-23 16:59:41 +0000
commitc8fec7e21f5c24303eab8a8592f3b8faff347d86 (patch)
tree5c9f44272f1e6deecb8b325ab238d5acbbc8f0d4 /lib/MC/MCDwarf.cpp
parent834518f1cea15796a377afb31844638e3c483e78 (diff)
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
Diffstat (limited to 'lib/MC/MCDwarf.cpp')
-rw-r--r--lib/MC/MCDwarf.cpp10
1 files changed, 10 insertions, 0 deletions
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();