AsmPrinterDwarf.cpp revision 239938ff77ef43c753881b030438f89a3dfc72c4
17e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner//===-- AsmPrinterDwarf.cpp - AsmPrinter Dwarf Support --------------------===// 27e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// 37e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// The LLVM Compiler Infrastructure 47e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// 57e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// This file is distributed under the University of Illinois Open Source 67e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// License. See LICENSE.TXT for details. 77e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// 87e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner//===----------------------------------------------------------------------===// 97e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// 107e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// This file implements the Dwarf emissions parts of AsmPrinter. 117e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner// 127e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner//===----------------------------------------------------------------------===// 137e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner 147e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner#define DEBUG_TYPE "asm-printer" 157e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner#include "llvm/CodeGen/AsmPrinter.h" 162d28617de2b0b731c08d1af9e830f31e14ac75b4Evan Cheng#include "llvm/MC/MachineLocation.h" 177e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner#include "llvm/MC/MCAsmInfo.h" 186189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner#include "llvm/MC/MCSection.h" 197e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner#include "llvm/MC/MCStreamer.h" 206189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner#include "llvm/MC/MCSymbol.h" 213574eca1b02600bac4e625297f4ecf745f4c4f32Micah Villmow#include "llvm/DataLayout.h" 2216c29b5f285f375be53dabaa73e3e91107485fe4Anton Korobeynikov#include "llvm/Target/TargetFrameLowering.h" 23d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner#include "llvm/Target/TargetLoweringObjectFile.h" 24d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner#include "llvm/Target/TargetMachine.h" 2502b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner#include "llvm/Target/TargetRegisterInfo.h" 267e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner#include "llvm/ADT/Twine.h" 277a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner#include "llvm/Support/Dwarf.h" 285e25ee8a1fcf8288d00d731b0f7ab7976f33b123Craig Topper#include "llvm/Support/ErrorHandling.h" 297e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattnerusing namespace llvm; 307e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner 3102b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner//===----------------------------------------------------------------------===// 3202b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner// Dwarf Emission Helper Routines 3302b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner//===----------------------------------------------------------------------===// 3402b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner 357e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner/// EmitSLEB128 - emit the specified signed leb128 value. 367e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattnervoid AsmPrinter::EmitSLEB128(int Value, const char *Desc) const { 377e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner if (isVerbose() && Desc) 387e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner OutStreamer.AddComment(Desc); 397e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner 40c25c90897781f116d5dbabab170bafcf65900fa7Benjamin Kramer OutStreamer.EmitSLEB128IntValue(Value); 417e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner} 427e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner 437e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner/// EmitULEB128 - emit the specified signed leb128 value. 447e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattnervoid AsmPrinter::EmitULEB128(unsigned Value, const char *Desc, 457e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner unsigned PadTo) const { 467e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner if (isVerbose() && Desc) 477e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner OutStreamer.AddComment(Desc); 48738734501635a15d8ed2d1c8d52962ed5f319bd3Rafael Espindola 49c25c90897781f116d5dbabab170bafcf65900fa7Benjamin Kramer OutStreamer.EmitULEB128IntValue(Value, 0/*addrspace*/, PadTo); 507e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner} 517e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner 527a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner/// EmitCFAByte - Emit a .byte 42 directive for a DW_CFA_xxx value. 537a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattnervoid AsmPrinter::EmitCFAByte(unsigned Val) const { 547a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner if (isVerbose()) { 557a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner if (Val >= dwarf::DW_CFA_offset && Val < dwarf::DW_CFA_offset+64) 567a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner OutStreamer.AddComment("DW_CFA_offset + Reg (" + 577a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner Twine(Val-dwarf::DW_CFA_offset) + ")"); 587a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner else 597a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner OutStreamer.AddComment(dwarf::CallFrameString(Val)); 607a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner } 617a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner OutStreamer.EmitIntValue(Val, 1, 0/*addrspace*/); 627a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner} 637a101f45c10082e9765ffec57a2d51f5fd0abc37Chris Lattner 64ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattnerstatic const char *DecodeDWARFEncoding(unsigned Encoding) { 65ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner switch (Encoding) { 66ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_absptr: return "absptr"; 67ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_omit: return "omit"; 68ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_pcrel: return "pcrel"; 69ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_udata4: return "udata4"; 70ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_udata8: return "udata8"; 71ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_sdata4: return "sdata4"; 72ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_sdata8: return "sdata8"; 73ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata4: return "pcrel udata4"; 74ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4: return "pcrel sdata4"; 75ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8: return "pcrel udata8"; 76ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata8: return "pcrel sdata8"; 77ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |dwarf::DW_EH_PE_udata4: 78ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner return "indirect pcrel udata4"; 79ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |dwarf::DW_EH_PE_sdata4: 80ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner return "indirect pcrel sdata4"; 81ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |dwarf::DW_EH_PE_udata8: 82ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner return "indirect pcrel udata8"; 83ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |dwarf::DW_EH_PE_sdata8: 84ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner return "indirect pcrel sdata8"; 85ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner } 86ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner 87ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner return "<unknown encoding>"; 88ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner} 89ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner 90ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner 91ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner/// EmitEncodingByte - Emit a .byte 42 directive that corresponds to an 92ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner/// encoding. If verbose assembly output is enabled, we output comments 93ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner/// describing the encoding. Desc is an optional string saying what the 94ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner/// encoding is specifying (e.g. "LSDA"). 9502b86b93dc4616571fed3473c6da9421c10f2fccChris Lattnervoid AsmPrinter::EmitEncodingByte(unsigned Val, const char *Desc) const { 96ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner if (isVerbose()) { 97ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner if (Desc != 0) 98ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner OutStreamer.AddComment(Twine(Desc)+" Encoding = " + 99ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner Twine(DecodeDWARFEncoding(Val))); 100ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner else 101ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner OutStreamer.AddComment(Twine("Encoding = ") + 102ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner DecodeDWARFEncoding(Val)); 103ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner } 104ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner 105ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner OutStreamer.EmitIntValue(Val, 1, 0/*addrspace*/); 106ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner} 107ca6190b108aeb4a2eeb6f5c6457bb17509b85d9dChris Lattner 108d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner/// GetSizeOfEncodedValue - Return the size of the encoding in bytes. 109d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattnerunsigned AsmPrinter::GetSizeOfEncodedValue(unsigned Encoding) const { 110d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner if (Encoding == dwarf::DW_EH_PE_omit) 111d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner return 0; 112d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner 113d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner switch (Encoding & 0x07) { 1145e25ee8a1fcf8288d00d731b0f7ab7976f33b123Craig Topper default: llvm_unreachable("Invalid encoded value."); 115426c2bf5cdd2173e4a33aea8cb92cf684a724f4bChandler Carruth case dwarf::DW_EH_PE_absptr: return TM.getDataLayout()->getPointerSize(); 116d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner case dwarf::DW_EH_PE_udata2: return 2; 117d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner case dwarf::DW_EH_PE_udata4: return 4; 118d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner case dwarf::DW_EH_PE_udata8: return 8; 119d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner } 120d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner} 121d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner 12225efd6d556718295a63d37f5294985746af354f6Anton Korobeynikovvoid AsmPrinter::EmitTTypeReference(const GlobalValue *GV, unsigned Encoding)const{ 123239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov if (GV) { 124239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov const TargetLoweringObjectFile &TLOF = getObjFileLowering(); 125d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner 126239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov const MCExpr *Exp = 127239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov TLOF.getTTypeGlobalReference(GV, Mang, MMI, Encoding, OutStreamer); 128239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov OutStreamer.EmitValue(Exp, GetSizeOfEncodedValue(Encoding), /*addrspace*/0); 129239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov } else 130239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov OutStreamer.EmitIntValue(0, GetSizeOfEncodedValue(Encoding), 0); 131d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner} 1326189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner 1336189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// EmitSectionOffset - Emit the 4-byte offset of Label from the start of its 1346189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// section. This can be done with a special directive if the target supports 1356189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// it (e.g. cygwin) or by emitting it as an offset from a label at the start 1366189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// of the section. 1376189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// 1386189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// SectionLabel is a temporary label emitted at the start of the section that 1396189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// Label lives in. 1406189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattnervoid AsmPrinter::EmitSectionOffset(const MCSymbol *Label, 1416189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner const MCSymbol *SectionLabel) const { 1426189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // On COFF targets, we have to emit the special .secrel32 directive. 1438f7d12ccfd8feb258bdf4e582592bc00beacc7c6Rafael Espindola if (MAI->getDwarfSectionOffsetDirective()) { 1448f7d12ccfd8feb258bdf4e582592bc00beacc7c6Rafael Espindola OutStreamer.EmitCOFFSecRel32(Label); 1456189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner return; 1466189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner } 1476189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner 1486189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // Get the section that we're referring to, based on SectionLabel. 1496189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner const MCSection &Section = SectionLabel->getSection(); 1506189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner 1516189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // If Label has already been emitted, verify that it is in the same section as 1526189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // section label for sanity. 1536189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner assert((!Label->isInSection() || &Label->getSection() == &Section) && 1546189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner "Section offset using wrong section base for label"); 1556189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner 156ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands // If the section in question will end up with an address of 0 anyway, we can 157ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands // just emit an absolute reference to save a relocation. 158ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands if (Section.isBaseAddressKnownZero()) { 159ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands OutStreamer.EmitSymbolValue(Label, 4, 0/*AddrSpace*/); 160ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands return; 161ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands } 162ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands 1636189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // Otherwise, emit it as a label difference from the start of the section. 1646189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner EmitLabelDifference(Label, SectionLabel, 4); 1656189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner} 1666189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner 16702b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner//===----------------------------------------------------------------------===// 16802b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner// Dwarf Lowering Routines 16902b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner//===----------------------------------------------------------------------===// 17002b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner 171ffa6408f9cb30cd639eb8eb71ee4aa6f48d0c7a7Rafael Espindola/// EmitCFIFrameMove - Emit a frame instruction. 172126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindolavoid AsmPrinter::EmitCFIFrameMove(const MachineMove &Move) const { 173126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola const TargetRegisterInfo *RI = TM.getRegisterInfo(); 174126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola 175126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola const MachineLocation &Dst = Move.getDestination(); 176126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola const MachineLocation &Src = Move.getSource(); 177126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola 178126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola // If advancing cfa. 179126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola if (Dst.isReg() && Dst.getReg() == MachineLocation::VirtualFP) { 180126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola if (Src.getReg() == MachineLocation::VirtualFP) { 181126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola OutStreamer.EmitCFIDefCfaOffset(-Src.getOffset()); 182126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } else { 183126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola // Reg + Offset 1842b6f7117f5be1b8449e63baffe58c52197f19418Jim Grosbach OutStreamer.EmitCFIDefCfa(RI->getDwarfRegNum(Src.getReg(), true), 1852b6f7117f5be1b8449e63baffe58c52197f19418Jim Grosbach Src.getOffset()); 186126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } 187126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } else if (Src.isReg() && Src.getReg() == MachineLocation::VirtualFP) { 188126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola assert(Dst.isReg() && "Machine move not supported yet."); 189126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola OutStreamer.EmitCFIDefCfaRegister(RI->getDwarfRegNum(Dst.getReg(), true)); 190126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } else { 191126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola assert(!Dst.isReg() && "Machine move not supported yet."); 192126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola OutStreamer.EmitCFIOffset(RI->getDwarfRegNum(Src.getReg(), true), 193b28d4f152ee9b76d8798b2bdcb06cb8d106841e6Rafael Espindola Dst.getOffset()); 194126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } 195126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola} 196