LLVM  14.0.0git
X86WinCOFFTargetStreamer.cpp
Go to the documentation of this file.
1 //===-- X86WinCOFFTargetStreamer.cpp ----------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "X86MCTargetDesc.h"
10 #include "X86TargetStreamer.h"
12 #include "llvm/MC/MCCodeView.h"
13 #include "llvm/MC/MCContext.h"
14 #include "llvm/MC/MCInstPrinter.h"
15 #include "llvm/MC/MCRegisterInfo.h"
18 
19 using namespace llvm;
20 using namespace llvm::codeview;
21 
22 namespace {
23 /// Implements Windows x86-only directives for assembly emission.
24 class X86WinCOFFAsmTargetStreamer : public X86TargetStreamer {
26  MCInstPrinter &InstPrinter;
27 
28 public:
29  X86WinCOFFAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS,
30  MCInstPrinter &InstPrinter)
31  : X86TargetStreamer(S), OS(OS), InstPrinter(InstPrinter) {}
32 
33  bool emitFPOProc(const MCSymbol *ProcSym, unsigned ParamsSize,
34  SMLoc L) override;
35  bool emitFPOEndPrologue(SMLoc L) override;
36  bool emitFPOEndProc(SMLoc L) override;
37  bool emitFPOData(const MCSymbol *ProcSym, SMLoc L) override;
38  bool emitFPOPushReg(unsigned Reg, SMLoc L) override;
39  bool emitFPOStackAlloc(unsigned StackAlloc, SMLoc L) override;
40  bool emitFPOStackAlign(unsigned Align, SMLoc L) override;
41  bool emitFPOSetFrame(unsigned Reg, SMLoc L) override;
42 };
43 
44 /// Represents a single FPO directive.
45 struct FPOInstruction {
46  MCSymbol *Label;
47  enum Operation {
48  PushReg,
49  StackAlloc,
50  StackAlign,
51  SetFrame,
52  } Op;
53  unsigned RegOrOffset;
54 };
55 
56 struct FPOData {
57  const MCSymbol *Function = nullptr;
58  MCSymbol *Begin = nullptr;
59  MCSymbol *PrologueEnd = nullptr;
60  MCSymbol *End = nullptr;
61  unsigned ParamsSize = 0;
62 
64 };
65 
66 /// Implements Windows x86-only directives for object emission.
67 class X86WinCOFFTargetStreamer : public X86TargetStreamer {
68  /// Map from function symbol to its FPO data.
70 
71  /// Current FPO data created by .cv_fpo_proc.
72  std::unique_ptr<FPOData> CurFPOData;
73 
74  bool haveOpenFPOData() { return !!CurFPOData; }
75 
76  /// Diagnoses an error at L if we are not in an FPO prologue. Return true on
77  /// error.
78  bool checkInFPOPrologue(SMLoc L);
79 
80  MCSymbol *emitFPOLabel();
81 
82  MCContext &getContext() { return getStreamer().getContext(); }
83 
84 public:
85  X86WinCOFFTargetStreamer(MCStreamer &S) : X86TargetStreamer(S) {}
86 
87  bool emitFPOProc(const MCSymbol *ProcSym, unsigned ParamsSize,
88  SMLoc L) override;
89  bool emitFPOEndPrologue(SMLoc L) override;
90  bool emitFPOEndProc(SMLoc L) override;
91  bool emitFPOData(const MCSymbol *ProcSym, SMLoc L) override;
92  bool emitFPOPushReg(unsigned Reg, SMLoc L) override;
93  bool emitFPOStackAlloc(unsigned StackAlloc, SMLoc L) override;
94  bool emitFPOStackAlign(unsigned Align, SMLoc L) override;
95  bool emitFPOSetFrame(unsigned Reg, SMLoc L) override;
96 };
97 } // end namespace
98 
99 bool X86WinCOFFAsmTargetStreamer::emitFPOProc(const MCSymbol *ProcSym,
100  unsigned ParamsSize, SMLoc L) {
101  OS << "\t.cv_fpo_proc\t";
102  ProcSym->print(OS, getStreamer().getContext().getAsmInfo());
103  OS << ' ' << ParamsSize << '\n';
104  return false;
105 }
106 
107 bool X86WinCOFFAsmTargetStreamer::emitFPOEndPrologue(SMLoc L) {
108  OS << "\t.cv_fpo_endprologue\n";
109  return false;
110 }
111 
112 bool X86WinCOFFAsmTargetStreamer::emitFPOEndProc(SMLoc L) {
113  OS << "\t.cv_fpo_endproc\n";
114  return false;
115 }
116 
117 bool X86WinCOFFAsmTargetStreamer::emitFPOData(const MCSymbol *ProcSym,
118  SMLoc L) {
119  OS << "\t.cv_fpo_data\t";
120  ProcSym->print(OS, getStreamer().getContext().getAsmInfo());
121  OS << '\n';
122  return false;
123 }
124 
125 bool X86WinCOFFAsmTargetStreamer::emitFPOPushReg(unsigned Reg, SMLoc L) {
126  OS << "\t.cv_fpo_pushreg\t";
127  InstPrinter.printRegName(OS, Reg);
128  OS << '\n';
129  return false;
130 }
131 
132 bool X86WinCOFFAsmTargetStreamer::emitFPOStackAlloc(unsigned StackAlloc,
133  SMLoc L) {
134  OS << "\t.cv_fpo_stackalloc\t" << StackAlloc << '\n';
135  return false;
136 }
137 
138 bool X86WinCOFFAsmTargetStreamer::emitFPOStackAlign(unsigned Align, SMLoc L) {
139  OS << "\t.cv_fpo_stackalign\t" << Align << '\n';
140  return false;
141 }
142 
143 bool X86WinCOFFAsmTargetStreamer::emitFPOSetFrame(unsigned Reg, SMLoc L) {
144  OS << "\t.cv_fpo_setframe\t";
145  InstPrinter.printRegName(OS, Reg);
146  OS << '\n';
147  return false;
148 }
149 
150 bool X86WinCOFFTargetStreamer::checkInFPOPrologue(SMLoc L) {
151  if (!haveOpenFPOData() || CurFPOData->PrologueEnd) {
152  getContext().reportError(
153  L,
154  "directive must appear between .cv_fpo_proc and .cv_fpo_endprologue");
155  return true;
156  }
157  return false;
158 }
159 
160 MCSymbol *X86WinCOFFTargetStreamer::emitFPOLabel() {
161  MCSymbol *Label = getContext().createTempSymbol("cfi", true);
162  getStreamer().emitLabel(Label);
163  return Label;
164 }
165 
166 bool X86WinCOFFTargetStreamer::emitFPOProc(const MCSymbol *ProcSym,
167  unsigned ParamsSize, SMLoc L) {
168  if (haveOpenFPOData()) {
169  getContext().reportError(
170  L, "opening new .cv_fpo_proc before closing previous frame");
171  return true;
172  }
173  CurFPOData = std::make_unique<FPOData>();
174  CurFPOData->Function = ProcSym;
175  CurFPOData->Begin = emitFPOLabel();
176  CurFPOData->ParamsSize = ParamsSize;
177  return false;
178 }
179 
180 bool X86WinCOFFTargetStreamer::emitFPOEndProc(SMLoc L) {
181  if (!haveOpenFPOData()) {
182  getContext().reportError(L, ".cv_fpo_endproc must appear after .cv_proc");
183  return true;
184  }
185  if (!CurFPOData->PrologueEnd) {
186  // Complain if there were prologue setup instructions but no end prologue.
187  if (!CurFPOData->Instructions.empty()) {
188  getContext().reportError(L, "missing .cv_fpo_endprologue");
189  CurFPOData->Instructions.clear();
190  }
191 
192  // Claim there is a zero-length prologue to make the label math work out
193  // later.
194  CurFPOData->PrologueEnd = CurFPOData->Begin;
195  }
196 
197  CurFPOData->End = emitFPOLabel();
198  const MCSymbol *Fn = CurFPOData->Function;
199  AllFPOData.insert({Fn, std::move(CurFPOData)});
200  return false;
201 }
202 
203 bool X86WinCOFFTargetStreamer::emitFPOSetFrame(unsigned Reg, SMLoc L) {
204  if (checkInFPOPrologue(L))
205  return true;
206  FPOInstruction Inst;
207  Inst.Label = emitFPOLabel();
208  Inst.Op = FPOInstruction::SetFrame;
209  Inst.RegOrOffset = Reg;
210  CurFPOData->Instructions.push_back(Inst);
211  return false;
212 }
213 
214 bool X86WinCOFFTargetStreamer::emitFPOPushReg(unsigned Reg, SMLoc L) {
215  if (checkInFPOPrologue(L))
216  return true;
217  FPOInstruction Inst;
218  Inst.Label = emitFPOLabel();
219  Inst.Op = FPOInstruction::PushReg;
220  Inst.RegOrOffset = Reg;
221  CurFPOData->Instructions.push_back(Inst);
222  return false;
223 }
224 
225 bool X86WinCOFFTargetStreamer::emitFPOStackAlloc(unsigned StackAlloc, SMLoc L) {
226  if (checkInFPOPrologue(L))
227  return true;
228  FPOInstruction Inst;
229  Inst.Label = emitFPOLabel();
230  Inst.Op = FPOInstruction::StackAlloc;
231  Inst.RegOrOffset = StackAlloc;
232  CurFPOData->Instructions.push_back(Inst);
233  return false;
234 }
235 
236 bool X86WinCOFFTargetStreamer::emitFPOStackAlign(unsigned Align, SMLoc L) {
237  if (checkInFPOPrologue(L))
238  return true;
239  if (!llvm::any_of(CurFPOData->Instructions, [](const FPOInstruction &Inst) {
240  return Inst.Op == FPOInstruction::SetFrame;
241  })) {
242  getContext().reportError(
243  L, "a frame register must be established before aligning the stack");
244  return true;
245  }
246  FPOInstruction Inst;
247  Inst.Label = emitFPOLabel();
248  Inst.Op = FPOInstruction::StackAlign;
249  Inst.RegOrOffset = Align;
250  CurFPOData->Instructions.push_back(Inst);
251  return false;
252 }
253 
254 bool X86WinCOFFTargetStreamer::emitFPOEndPrologue(SMLoc L) {
255  if (checkInFPOPrologue(L))
256  return true;
257  CurFPOData->PrologueEnd = emitFPOLabel();
258  return false;
259 }
260 
261 namespace {
262 struct RegSaveOffset {
263  RegSaveOffset(unsigned Reg, unsigned Offset) : Reg(Reg), Offset(Offset) {}
264 
265  unsigned Reg = 0;
266  unsigned Offset = 0;
267 };
268 
269 struct FPOStateMachine {
270  explicit FPOStateMachine(const FPOData *FPO) : FPO(FPO) {}
271 
272  const FPOData *FPO = nullptr;
273  unsigned FrameReg = 0;
274  unsigned FrameRegOff = 0;
275  unsigned CurOffset = 0;
276  unsigned LocalSize = 0;
277  unsigned SavedRegSize = 0;
278  unsigned StackOffsetBeforeAlign = 0;
279  unsigned StackAlign = 0;
280  unsigned Flags = 0; // FIXME: Set HasSEH / HasEH.
281 
282  SmallString<128> FrameFunc;
283 
284  SmallVector<RegSaveOffset, 4> RegSaveOffsets;
285 
286  void emitFrameDataRecord(MCStreamer &OS, MCSymbol *Label);
287 };
288 } // end namespace
289 
290 static Printable printFPOReg(const MCRegisterInfo *MRI, unsigned LLVMReg) {
291  return Printable([MRI, LLVMReg](raw_ostream &OS) {
292  switch (LLVMReg) {
293  // MSVC only seems to emit symbolic register names for EIP, EBP, and ESP,
294  // but the format seems to support more than that, so we emit them.
295  case X86::EAX: OS << "$eax"; break;
296  case X86::EBX: OS << "$ebx"; break;
297  case X86::ECX: OS << "$ecx"; break;
298  case X86::EDX: OS << "$edx"; break;
299  case X86::EDI: OS << "$edi"; break;
300  case X86::ESI: OS << "$esi"; break;
301  case X86::ESP: OS << "$esp"; break;
302  case X86::EBP: OS << "$ebp"; break;
303  case X86::EIP: OS << "$eip"; break;
304  // Otherwise, get the codeview register number and print $N.
305  default:
306  OS << '$' << MRI->getCodeViewRegNum(LLVMReg);
307  break;
308  }
309  });
310 }
311 
312 void FPOStateMachine::emitFrameDataRecord(MCStreamer &OS, MCSymbol *Label) {
313  unsigned CurFlags = Flags;
314  if (Label == FPO->Begin)
315  CurFlags |= FrameData::IsFunctionStart;
316 
317  // Compute the new FrameFunc string.
318  FrameFunc.clear();
319  raw_svector_ostream FuncOS(FrameFunc);
321  assert((StackAlign == 0 || FrameReg != 0) &&
322  "cannot align stack without frame reg");
323  StringRef CFAVar = StackAlign == 0 ? "$T0" : "$T1";
324 
325  if (FrameReg) {
326  // CFA is FrameReg + FrameRegOff.
327  FuncOS << CFAVar << ' ' << printFPOReg(MRI, FrameReg) << ' ' << FrameRegOff
328  << " + = ";
329 
330  // Assign $T0, the VFRAME register, the value of ESP after it is aligned.
331  // Starting from the CFA, we subtract the size of all pushed registers, and
332  // align the result. While we don't store any CSRs in this area, $T0 is used
333  // by S_DEFRANGE_FRAMEPOINTER_REL records to find local variables.
334  if (StackAlign) {
335  FuncOS << "$T0 " << CFAVar << ' ' << StackOffsetBeforeAlign << " - "
336  << StackAlign << " @ = ";
337  }
338  } else {
339  // The address of return address is ESP + CurOffset, but we use .raSearch to
340  // match MSVC. This seems to ask the debugger to subtract some combination
341  // of LocalSize and SavedRegSize from ESP and grovel around in that memory
342  // to find the address of a plausible return address.
343  FuncOS << CFAVar << " .raSearch = ";
344  }
345 
346  // Caller's $eip should be dereferenced CFA, and $esp should be CFA plus 4.
347  FuncOS << "$eip " << CFAVar << " ^ = ";
348  FuncOS << "$esp " << CFAVar << " 4 + = ";
349 
350  // Each saved register is stored at an unchanging negative CFA offset.
351  for (RegSaveOffset RO : RegSaveOffsets)
352  FuncOS << printFPOReg(MRI, RO.Reg) << ' ' << CFAVar << ' ' << RO.Offset
353  << " - ^ = ";
354 
355  // Add it to the CV string table.
356  CodeViewContext &CVCtx = OS.getContext().getCVContext();
357  unsigned FrameFuncStrTabOff = CVCtx.addToStringTable(FuncOS.str()).second;
358 
359  // MSVC has only ever been observed to emit a MaxStackSize of zero.
360  unsigned MaxStackSize = 0;
361 
362  // The FrameData record format is:
363  // ulittle32_t RvaStart;
364  // ulittle32_t CodeSize;
365  // ulittle32_t LocalSize;
366  // ulittle32_t ParamsSize;
367  // ulittle32_t MaxStackSize;
368  // ulittle32_t FrameFunc; // String table offset
369  // ulittle16_t PrologSize;
370  // ulittle16_t SavedRegsSize;
371  // ulittle32_t Flags;
372 
373  OS.emitAbsoluteSymbolDiff(Label, FPO->Begin, 4); // RvaStart
374  OS.emitAbsoluteSymbolDiff(FPO->End, Label, 4); // CodeSize
375  OS.emitInt32(LocalSize);
376  OS.emitInt32(FPO->ParamsSize);
377  OS.emitInt32(MaxStackSize);
378  OS.emitInt32(FrameFuncStrTabOff); // FrameFunc
379  OS.emitAbsoluteSymbolDiff(FPO->PrologueEnd, Label, 2);
380  OS.emitInt16(SavedRegSize);
381  OS.emitInt32(CurFlags);
382 }
383 
384 /// Compute and emit the real CodeView FrameData subsection.
385 bool X86WinCOFFTargetStreamer::emitFPOData(const MCSymbol *ProcSym, SMLoc L) {
386  MCStreamer &OS = getStreamer();
387  MCContext &Ctx = OS.getContext();
388 
389  auto I = AllFPOData.find(ProcSym);
390  if (I == AllFPOData.end()) {
391  Ctx.reportError(L, Twine("no FPO data found for symbol ") +
392  ProcSym->getName());
393  return true;
394  }
395  const FPOData *FPO = I->second.get();
396  assert(FPO->Begin && FPO->End && FPO->PrologueEnd && "missing FPO label");
397 
398  MCSymbol *FrameBegin = Ctx.createTempSymbol(),
399  *FrameEnd = Ctx.createTempSymbol();
400 
402  OS.emitAbsoluteSymbolDiff(FrameEnd, FrameBegin, 4);
403  OS.emitLabel(FrameBegin);
404 
405  // Start with the RVA of the function in question.
408  4);
409 
410  // Emit a sequence of FrameData records.
411  FPOStateMachine FSM(FPO);
412 
413  FSM.emitFrameDataRecord(OS, FPO->Begin);
414  for (const FPOInstruction &Inst : FPO->Instructions) {
415  switch (Inst.Op) {
416  case FPOInstruction::PushReg:
417  FSM.CurOffset += 4;
418  FSM.SavedRegSize += 4;
419  FSM.RegSaveOffsets.push_back({Inst.RegOrOffset, FSM.CurOffset});
420  break;
421  case FPOInstruction::SetFrame:
422  FSM.FrameReg = Inst.RegOrOffset;
423  FSM.FrameRegOff = FSM.CurOffset;
424  break;
426  FSM.StackOffsetBeforeAlign = FSM.CurOffset;
427  FSM.StackAlign = Inst.RegOrOffset;
428  break;
429  case FPOInstruction::StackAlloc:
430  FSM.CurOffset += Inst.RegOrOffset;
431  FSM.LocalSize += Inst.RegOrOffset;
432  // No need to emit FrameData for stack allocations with a frame pointer.
433  if (FSM.FrameReg)
434  continue;
435  break;
436  }
437  FSM.emitFrameDataRecord(OS, Inst.Label);
438  }
439 
440  OS.emitValueToAlignment(4, 0);
441  OS.emitLabel(FrameEnd);
442  return false;
443 }
444 
447  MCInstPrinter *InstPrinter,
448  bool IsVerboseAsm) {
449  // FIXME: This makes it so we textually assemble COFF directives on ELF.
450  // That's kind of nonsensical.
451  return new X86WinCOFFAsmTargetStreamer(S, OS, *InstPrinter);
452 }
453 
456  // No need to register a target streamer.
457  if (!STI.getTargetTriple().isOSBinFormatCOFF())
458  return nullptr;
459  // Registers itself to the MCStreamer.
460  return new X86WinCOFFTargetStreamer(S);
461 }
llvm::N86::ESI
@ ESI
Definition: X86MCTargetDesc.h:51
llvm::RISCVAttrs::StackAlign
StackAlign
Definition: RISCVAttributes.h:37
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
Reg
unsigned Reg
Definition: MachineSink.cpp:1558
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::CodeViewContext::addToStringTable
std::pair< StringRef, unsigned > addToStringTable(StringRef S)
Add something to the string table.
Definition: MCCodeView.cpp:147
llvm::MCContext::getCVContext
CodeViewContext & getCVContext()
Definition: MCContext.cpp:908
llvm::Triple::isOSBinFormatCOFF
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
Definition: Triple.h:621
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:72
llvm::Function
Definition: Function.h:62
llvm::MCContext::getRegisterInfo
const MCRegisterInfo * getRegisterInfo() const
Definition: MCContext.h:425
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1168
llvm::N86::EDI
@ EDI
Definition: X86MCTargetDesc.h:51
llvm::MCStreamer::emitValue
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:177
Instructions
Code Generation Notes for reduce the size of the ISel and reduce repetition in the implementation In a small number of this can cause even when no optimisation has taken place Instructions
Definition: MSA.txt:11
llvm::MCStreamer::emitInt32
void emitInt32(uint64_t Value)
Definition: MCStreamer.h:707
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
FormattedStream.h
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:199
llvm::SMLoc
Represents a location in source code.
Definition: SMLoc.h:23
llvm::N86::ESP
@ ESP
Definition: X86MCTargetDesc.h:51
Operation
PowerPC Reduce CR logical Operation
Definition: PPCReduceCRLogicals.cpp:734
llvm::MCSubtargetInfo::getTargetTriple
const Triple & getTargetTriple() const
Definition: MCSubtargetInfo.h:107
MCContext.h
llvm::CodeViewContext
Holds state from .cv_file and .cv_loc directives for later emission.
Definition: MCCodeView.h:137
llvm::MCStreamer::emitLabel
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
Definition: MCStreamer.cpp:415
llvm::N86::EAX
@ EAX
Definition: X86MCTargetDesc.h:51
MCSubtargetInfo.h
llvm::createX86ObjectTargetStreamer
MCTargetStreamer * createX86ObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
Implements X86-only directives for object files.
Definition: X86WinCOFFTargetStreamer.cpp:455
llvm::codeview::FrameData::IsFunctionStart
@ IsFunctionStart
Definition: CodeView.h:585
printFPOReg
static Printable printFPOReg(const MCRegisterInfo *MRI, unsigned LLVMReg)
Definition: X86WinCOFFTargetStreamer.cpp:290
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::MCTargetStreamer
Target specific streamer interface.
Definition: MCStreamer.h:91
llvm::N86::EDX
@ EDX
Definition: X86MCTargetDesc.h:51
Align
uint64_t Align
Definition: ELFObjHandler.cpp:83
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
CodeView.h
llvm::pdb::DbgHeaderType::FPO
@ FPO
llvm::N86::ECX
@ ECX
Definition: X86MCTargetDesc.h:51
MCInstPrinter.h
llvm::SmallString< 128 >
llvm::codeview::ProcSym
Definition: SymbolRecord.h:42
llvm::MCStreamer::emitInt16
void emitInt16(uint64_t Value)
Definition: MCStreamer.h:706
X86MCTargetDesc.h
llvm::MCInstPrinter
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Definition: MCInstPrinter.h:43
X86TargetStreamer.h
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::DenseMap
Definition: DenseMap.h:714
I
#define I(x, y, z)
Definition: MD5.cpp:59
MCRegisterInfo.h
llvm::formatted_raw_ostream
formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...
Definition: FormattedStream.h:30
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::MCContext::reportError
void reportError(SMLoc L, const Twine &Msg)
Definition: MCContext.cpp:963
llvm::N86::EBX
@ EBX
Definition: X86MCTargetDesc.h:51
llvm::any_of
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1607
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::MCRegisterInfo
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Definition: MCRegisterInfo.h:135
llvm::MCContext::createTempSymbol
MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
Definition: MCContext.cpp:303
MRI
unsigned const MachineRegisterInfo * MRI
Definition: AArch64AdvSIMDScalarPass.cpp:105
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:83
llvm::pdb::PDB_SymType::Label
@ Label
MCCodeView.h
llvm::AMDGPU::SendMsg::Op
Op
Definition: SIDefines.h:325
llvm::MCStreamer::emitAbsoluteSymbolDiff
virtual void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size)
Emit the absolute difference between two symbols.
Definition: MCStreamer.cpp:1113
llvm::MCSymbolRefExpr::VK_COFF_IMGREL32
@ VK_COFF_IMGREL32
Definition: MCExpr.h:316
llvm::MCSymbolRefExpr::create
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
Definition: MCExpr.h:386
llvm::X86TargetStreamer
X86 target streamer implementing x86-only assembly directives.
Definition: X86TargetStreamer.h:17
llvm::codeview
Definition: AppendingTypeTableBuilder.h:22
llvm::MCStreamer::getContext
MCContext & getContext() const
Definition: MCStreamer.h:280
llvm::Printable
Simple wrapper around std::function<void(raw_ostream&)>.
Definition: Printable.h:38
llvm::raw_svector_ostream
A raw_ostream that writes to an SmallVector or SmallString.
Definition: raw_ostream.h:658
llvm::MCStreamer::emitValueToAlignment
virtual void emitValueToAlignment(unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
Definition: MCStreamer.cpp:1199
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:75
llvm::codeview::DebugSubsectionKind::FrameData
@ FrameData
llvm::createX86AsmTargetStreamer
MCTargetStreamer * createX86AsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrinter, bool IsVerboseAsm)
Implements X86-only directives for assembly emission.
Definition: X86WinCOFFTargetStreamer.cpp:445