LLVM  4.0.0
ARMTargetStreamer.cpp
Go to the documentation of this file.
1 //===- ARMTargetStreamer.cpp - ARMTargetStreamer class --*- C++ -*---------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the ARMTargetStreamer class.
11 //
12 //===----------------------------------------------------------------------===//
13 #include "llvm/ADT/MapVector.h"
14 #include "llvm/MC/ConstantPools.h"
15 #include "llvm/MC/MCContext.h"
16 #include "llvm/MC/MCExpr.h"
17 #include "llvm/MC/MCStreamer.h"
18 
19 using namespace llvm;
20 //
21 // ARMTargetStreamer Implemenation
22 //
24  : MCTargetStreamer(S), ConstantPools(new AssemblerConstantPools()) {}
25 
27 
28 // The constant pool handling is shared by all ARMTargetStreamer
29 // implementations.
31  return ConstantPools->addEntry(Streamer, Expr, 4, Loc);
32 }
33 
35  ConstantPools->emitForCurrentSection(Streamer);
36 }
37 
38 // finish() - write out any non-empty assembler constant pools.
39 void ARMTargetStreamer::finish() { ConstantPools->emitAll(Streamer); }
40 
41 // reset() - Reset any state
43 
44 // The remaining callbacks should be handled separately by each
45 // streamer.
49 void ARMTargetStreamer::emitPersonality(const MCSymbol *Personality) {}
52 void ARMTargetStreamer::emitSetFP(unsigned FpReg, unsigned SpReg,
53  int64_t Offset) {}
54 void ARMTargetStreamer::emitMovSP(unsigned Reg, int64_t Offset) {}
57  bool isVector) {}
58 void ARMTargetStreamer::emitUnwindRaw(int64_t StackOffset,
59  const SmallVectorImpl<uint8_t> &Opcodes) {
60 }
64  StringRef String) {}
66  unsigned IntValue,
67  StringRef StringValue) {}
68 void ARMTargetStreamer::emitArch(unsigned Arch) {}
69 void ARMTargetStreamer::emitArchExtension(unsigned ArchExt) {}
70 void ARMTargetStreamer::emitObjectArch(unsigned Arch) {}
71 void ARMTargetStreamer::emitFPU(unsigned FPU) {}
73 void ARMTargetStreamer::emitInst(uint32_t Inst, char Suffix) {}
74 void
76 
virtual void emitInst(uint32_t Inst, char Suffix= '\0')
virtual void AnnotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE)
virtual void emitFPU(unsigned FPU)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:39
virtual void emitArchExtension(unsigned ArchExt)
Target specific streamer interface.
Definition: MCStreamer.h:73
virtual void emitPad(int64_t Offset)
virtual void finishAttributeSection()
virtual void emitPersonality(const MCSymbol *Personality)
virtual void reset()
Reset any state between object emissions, i.e.
virtual void emitPersonalityIndex(unsigned Index)
void emitCurrentConstantPool()
Callback used to implemnt the .ltorg directive.
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:34
Reg
All possible values of the reg field in the ModR/M byte.
Represent a reference to a symbol from inside an expression.
Definition: MCExpr.h:161
virtual void emitMovSP(unsigned Reg, int64_t Offset=0)
ARMTargetStreamer(MCStreamer &S)
virtual void emitAttribute(unsigned Attribute, unsigned Value)
Streaming machine code generation interface.
Definition: MCStreamer.h:161
virtual void emitRegSave(const SmallVectorImpl< unsigned > &RegList, bool isVector)
virtual void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value)
virtual void emitSetFP(unsigned FpReg, unsigned SpReg, int64_t Offset=0)
virtual void emitObjectArch(unsigned Arch)
uint32_t Offset
virtual void emitUnwindRaw(int64_t StackOffset, const SmallVectorImpl< uint8_t > &Opcodes)
bool isVector(MCInstrInfo const &MCII, MCInst const &MCI)
MCStreamer & Streamer
Definition: MCStreamer.h:75
const MCExpr * addConstantPoolEntry(const MCExpr *, SMLoc Loc)
Callback used to implement the ldr= pseudo.
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue="")
LLVM Value Representation.
Definition: Value.h:71
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47
virtual void emitArch(unsigned Arch)
Represents a location in source code.
Definition: SMLoc.h:24
virtual void switchVendor(StringRef Vendor)
virtual void emitTextAttribute(unsigned Attribute, StringRef String)