AsmPrinterDwarf.cpp revision d04a8d4b33ff316ca4cf961e06c9e312eff8e64f
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" 16d04a8d4b33ff316ca4cf961e06c9e312eff8e64fChandler Carruth#include "llvm/ADT/Twine.h" 17d04a8d4b33ff316ca4cf961e06c9e312eff8e64fChandler Carruth#include "llvm/DataLayout.h" 187e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner#include "llvm/MC/MCAsmInfo.h" 196189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner#include "llvm/MC/MCSection.h" 207e1a8f882f1baa1c0d5204373d6eb4cb7fc9f3eaChris Lattner#include "llvm/MC/MCStreamer.h" 216189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner#include "llvm/MC/MCSymbol.h" 22d04a8d4b33ff316ca4cf961e06c9e312eff8e64fChandler Carruth#include "llvm/MC/MachineLocation.h" 23d04a8d4b33ff316ca4cf961e06c9e312eff8e64fChandler Carruth#include "llvm/Support/Dwarf.h" 24d04a8d4b33ff316ca4cf961e06c9e312eff8e64fChandler Carruth#include "llvm/Support/ErrorHandling.h" 2516c29b5f285f375be53dabaa73e3e91107485fe4Anton Korobeynikov#include "llvm/Target/TargetFrameLowering.h" 26d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner#include "llvm/Target/TargetLoweringObjectFile.h" 27d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner#include "llvm/Target/TargetMachine.h" 2802b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner#include "llvm/Target/TargetRegisterInfo.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) 56aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 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 } 86aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 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 } 104aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 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; 112aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 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 122aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christophervoid AsmPrinter::EmitTTypeReference(const GlobalValue *GV, 123aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher unsigned Encoding) const { 124239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov if (GV) { 125239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov const TargetLoweringObjectFile &TLOF = getObjFileLowering(); 126aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 127239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov const MCExpr *Exp = 128239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov TLOF.getTTypeGlobalReference(GV, Mang, MMI, Encoding, OutStreamer); 129239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov OutStreamer.EmitValue(Exp, GetSizeOfEncodedValue(Encoding), /*addrspace*/0); 130239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov } else 131239938ff77ef43c753881b030438f89a3dfc72c4Anton Korobeynikov OutStreamer.EmitIntValue(0, GetSizeOfEncodedValue(Encoding), 0); 132d2af7853e377bce40cbf3e0632a4608484b6aba4Chris Lattner} 1336189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner 1346189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// EmitSectionOffset - Emit the 4-byte offset of Label from the start of its 1356189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// section. This can be done with a special directive if the target supports 1366189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// it (e.g. cygwin) or by emitting it as an offset from a label at the start 1376189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// of the section. 1386189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// 1396189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// SectionLabel is a temporary label emitted at the start of the section that 1406189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner/// Label lives in. 1416189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattnervoid AsmPrinter::EmitSectionOffset(const MCSymbol *Label, 1426189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner const MCSymbol *SectionLabel) const { 1436189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // On COFF targets, we have to emit the special .secrel32 directive. 1448f7d12ccfd8feb258bdf4e582592bc00beacc7c6Rafael Espindola if (MAI->getDwarfSectionOffsetDirective()) { 1458f7d12ccfd8feb258bdf4e582592bc00beacc7c6Rafael Espindola OutStreamer.EmitCOFFSecRel32(Label); 1466189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner return; 1476189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner } 148aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 1496189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // Get the section that we're referring to, based on SectionLabel. 1506189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner const MCSection &Section = SectionLabel->getSection(); 151aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 1526189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // If Label has already been emitted, verify that it is in the same section as 1536189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // section label for sanity. 1546189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner assert((!Label->isInSection() || &Label->getSection() == &Section) && 1556189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner "Section offset using wrong section base for label"); 156aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 157ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands // If the section in question will end up with an address of 0 anyway, we can 158ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands // just emit an absolute reference to save a relocation. 159ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands if (Section.isBaseAddressKnownZero()) { 160ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands OutStreamer.EmitSymbolValue(Label, 4, 0/*AddrSpace*/); 161ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands return; 162ba9934648f1b8f5b1749548963f385f1147c1f68Duncan Sands } 163aaa50b9bc5e8707015ff31dce0a3665600f6b440Eric Christopher 1646189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner // Otherwise, emit it as a label difference from the start of the section. 1656189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner EmitLabelDifference(Label, SectionLabel, 4); 1666189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner} 1676189ed10c1a6a39ad516aca2bda2c05fff35a55bChris Lattner 16802b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner//===----------------------------------------------------------------------===// 16902b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner// Dwarf Lowering Routines 17002b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner//===----------------------------------------------------------------------===// 17102b86b93dc4616571fed3473c6da9421c10f2fccChris Lattner 172ffa6408f9cb30cd639eb8eb71ee4aa6f48d0c7a7Rafael Espindola/// EmitCFIFrameMove - Emit a frame instruction. 173126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindolavoid AsmPrinter::EmitCFIFrameMove(const MachineMove &Move) const { 174126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola const TargetRegisterInfo *RI = TM.getRegisterInfo(); 175126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola 176126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola const MachineLocation &Dst = Move.getDestination(); 177126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola const MachineLocation &Src = Move.getSource(); 178126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola 179126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola // If advancing cfa. 180126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola if (Dst.isReg() && Dst.getReg() == MachineLocation::VirtualFP) { 181126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola if (Src.getReg() == MachineLocation::VirtualFP) { 182126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola OutStreamer.EmitCFIDefCfaOffset(-Src.getOffset()); 183126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } else { 184126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola // Reg + Offset 1852b6f7117f5be1b8449e63baffe58c52197f19418Jim Grosbach OutStreamer.EmitCFIDefCfa(RI->getDwarfRegNum(Src.getReg(), true), 1862b6f7117f5be1b8449e63baffe58c52197f19418Jim Grosbach Src.getOffset()); 187126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } 188126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } else if (Src.isReg() && Src.getReg() == MachineLocation::VirtualFP) { 189126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola assert(Dst.isReg() && "Machine move not supported yet."); 190126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola OutStreamer.EmitCFIDefCfaRegister(RI->getDwarfRegNum(Dst.getReg(), true)); 191126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } else { 192126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola assert(!Dst.isReg() && "Machine move not supported yet."); 193126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola OutStreamer.EmitCFIOffset(RI->getDwarfRegNum(Src.getReg(), true), 194b28d4f152ee9b76d8798b2bdcb06cb8d106841e6Rafael Espindola Dst.getOffset()); 195126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola } 196126ae6815263aeffe4fbaa6dff1e4428aa8f0a91Rafael Espindola} 197