LLVM: lib/Target/AArch64/AArch64TargetObjectFile.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

21using namespace llvm;

22using namespace dwarf;

23

24void AArch64_ELFTargetObjectFile::Initialize(MCContext &Ctx,

27

28

30}

31

37 MMI);

38 return;

39 }

41

42 constexpr uint16_t Discriminator = 0x7EAD;

45}

46

55}

56

59}

60

64

65

66

67

76 }

77

79 GV, Encoding, TM, MMI, Streamer);

80}

81

86}

87

92 "Arch64 does not support GOT PC rel with extra offset");

93

94

101}

102

106

107

109}

110

111template

114 MachineModuleInfoTarget &TargetMMI, const MCSymbol *RawSym,

117

119 DL.getLinkerPrivateGlobalPrefix() + RawSym->getName() +

121 Twine(Discriminator));

122

123 const MCExpr *&StubAuthPtrRef = TargetMMI.getAuthPtrStubEntry(StubSym);

124

125 if (StubAuthPtrRef)

126 return StubSym;

127

129

130 StubAuthPtrRef =

132 false, Ctx);

133 return StubSym;

134}

135

141 Discriminator);

142}

143

149 Key, Discriminator);

150}

static MCSymbol * getAuthPtrSlotSymbolHelper(MCContext &Ctx, const TargetMachine &TM, MachineModuleInfo *MMI, MachineModuleInfoTarget &TargetMMI, const MCSymbol *RawSym, AArch64PACKey::ID Key, uint16_t Discriminator)

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

This file contains constants used for implementing Dwarf debug support.

Module.h This file contains the declarations for the Module class.

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

static const AArch64AuthMCExpr * create(const MCExpr *Expr, uint16_t Discriminator, AArch64PACKey::ID Key, bool HasAddressDiversity, MCContext &Ctx)

void emitPersonalityValueImpl(MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym, const MachineModuleInfo *MMI) const override

const MCExpr * getIndirectSymViaGOTPCRel(const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const override

Get the target specific PC relative GOT entry relocation.

MCSymbol * getAuthPtrSlotSymbol(const TargetMachine &TM, MachineModuleInfo *MMI, const MCSymbol *RawSym, AArch64PACKey::ID Key, uint16_t Discriminator) const

MCSymbol * getAuthPtrSlotSymbol(const TargetMachine &TM, MachineModuleInfo *MMI, const MCSymbol *RawSym, AArch64PACKey::ID Key, uint16_t Discriminator) const

AArch64_MachoTargetObjectFile()

const MCExpr * getIndirectSymViaGOTPCRel(const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const override

Get MachO PC relative GOT entry relocation.

void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const override

MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override

const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override

The mach-o version of this method defaults to returning a stub reference.

A parsed version of the target data layout string in and methods for querying it.

static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)

static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)

static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)

Context object for machine code objects.

MCSymbol * createTempSymbol()

Create a temporary symbol with a unique name.

MCSymbol * getOrCreateSymbol(const Twine &Name)

Lookup the symbol inside with the specified Name.

Base class for the full range of assembler expressions which are needed for parsing.

MCContext & getContext() const

Streaming machine code generation interface.

virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())

Emit a label for Symbol into the current section.

MCTargetStreamer * getTargetStreamer()

static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

StringRef getName() const

getName - Get the symbol name.

This represents an "assembler immediate".

int64_t getConstant() const

MachineModuleInfoELF - This is a MachineModuleInfoImpl implementation for ELF targets.

bool hasSignedPersonality() const

MachineModuleInfoMachO - This is a MachineModuleInfoImpl implementation for MachO targets.

This class contains meta information specific to a module.

const Module * getModule() const

Ty & getObjFileInfo()

Keep track of various per-module pieces of information for backends that would like to do so.

void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const

Print the appropriate prefix and the specified global variable's name.

const DataLayout & getDataLayout() const

Get the data layout for the module's target platform.

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

void Initialize(MCContext &Ctx, const TargetMachine &TM) override

This method must be called before any actual lowering is done.

virtual void emitPersonalityValueImpl(MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym, const MachineModuleInfo *MMI) const

const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override

The mach-o version of this method defaults to returning a stub reference.

bool SupportGOTPCRelWithOffset

Mangler & getMangler() const

bool SupportDebugThreadLocalLocation

Primary interface to the complete machine description for the target machine.

MCSymbol * getSymbol(const GlobalValue *GV) const

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

This is an optimization pass for GlobalISel generic memory operations.

static StringRef AArch64PACKeyIDToString(AArch64PACKey::ID KeyID)

Return 2-letter identifier string for numeric key ID.