summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9bb247813aae7cda7b883f1bd0bff2697877dbb1 (patch)
tree3b031af5668926a732fd029920ae420f644ef68e /llvm/lib/MC/MCDwarf.cpp
parent99e3bfbd17eee1a29b8bfee70b76ff2779632735 (diff)
downloadbcm5719-llvm-9bb247813aae7cda7b883f1bd0bff2697877dbb1.tar.gz
bcm5719-llvm-9bb247813aae7cda7b883f1bd0bff2697877dbb1.zip
Implement .cfi_undefined. Based on a patch from PaX team, updated by
Roman Divacky. I just added the testcase. llvm-svn: 168520
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index bb9ed4952ef..85b47fe4379 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud