LLVM  3.7.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);
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 // The remaining callbacks should be handled separately by each
42 // streamer.
46 void ARMTargetStreamer::emitPersonality(const MCSymbol *Personality) {}
49 void ARMTargetStreamer::emitSetFP(unsigned FpReg, unsigned SpReg,
50  int64_t Offset) {}
51 void ARMTargetStreamer::emitMovSP(unsigned Reg, int64_t Offset) {}
52 void ARMTargetStreamer::emitPad(int64_t Offset) {}
54  bool isVector) {}
55 void ARMTargetStreamer::emitUnwindRaw(int64_t StackOffset,
56  const SmallVectorImpl<uint8_t> &Opcodes) {
57 }
61  StringRef String) {}
63  unsigned IntValue,
64  StringRef StringValue) {}
65 void ARMTargetStreamer::emitArch(unsigned Arch) {}
66 void ARMTargetStreamer::emitArchExtension(unsigned ArchExt) {}
67 void ARMTargetStreamer::emitObjectArch(unsigned Arch) {}
68 void ARMTargetStreamer::emitFPU(unsigned FPU) {}
70 void ARMTargetStreamer::emitInst(uint32_t Inst, char Suffix) {}
71 void
73 
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 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:33
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:159
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:157
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)
virtual void emitUnwindRaw(int64_t StackOffset, const SmallVectorImpl< uint8_t > &Opcodes)
MCStreamer & Streamer
Definition: MCStreamer.h:75
const MCExpr * addConstantPoolEntry(const MCExpr *)
Callback used to implement the ldr= pseudo.
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue="")
LLVM Value Representation.
Definition: Value.h:69
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40
virtual void emitArch(unsigned Arch)
virtual void switchVendor(StringRef Vendor)
virtual void emitTextAttribute(unsigned Attribute, StringRef String)