24 using namespace dwarf;
41 GV, Encoding, TM, MMI, Streamer);
69 X86FreeBSDTargetObjectFile::Initialize(
MCContext &Ctx,
76 X86FuchsiaTargetObjectFile::Initialize(
MCContext &Ctx,
83 X86LinuxNaClTargetObjectFile::Initialize(
MCContext &Ctx,
89 void X86SolarisTargetObjectFile::Initialize(
MCContext &Ctx,
95 const MCExpr *X86WindowsTargetObjectFile::lowerRelativeReference(
111 if (!isa<GlobalObject>(LHS) || !isa<GlobalVariable>(RHS) ||
114 cast<GlobalVariable>(RHS)->hasInitializer() || RHS->
hasSection())
125 unsigned Size = HexString.size();
126 assert(Width >= Size &&
"hex string is too large!");
127 HexString.insert(HexString.begin(), Width -
Size,
'0');
134 if (isa<UndefValue>(C)) {
136 }
else if (
const auto *CFP = dyn_cast<ConstantFP>(C)) {
138 }
else if (
const auto *CI = dyn_cast<ConstantInt>(C)) {
141 unsigned NumElements;
142 if (isa<VectorType>(Ty))
146 std::string HexString;
147 for (
int I = NumElements - 1,
E = -1;
I !=
E; --
I)
153 MCSection *X86WindowsTargetObjectFile::getSectionForConstant(
155 unsigned &
Align)
const {
160 std::string COMDATSymName;
183 if (!COMDATSymName.empty())
184 return getContext().getCOFFSection(
".rdata", Characteristics, Kind,
Instances of this class represent a uniqued identifier for a section in the current translation unit...
A parsed version of the target data layout string in and methods for querying it. ...
bool isMergeableConst() const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
This represents an "assembler immediate".
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
static std::string scalarConstantToHexString(const Constant *C)
MCSymbol * getSymbol(const GlobalValue *GV) const
static std::string APIntToHexString(const APInt &AI)
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.
uint64_t getArrayNumElements() const
StringRef getName() const
Return a constant reference to the value's name.
uint64_t getLimitedValue(uint64_t Limit=UINT64_MAX) const
If this value is smaller than the specified limit, return it, otherwise return the limit value...
virtual void Initialize(MCContext &ctx, const TargetMachine &TM)
This method must be called before any actual lowering is done.
const MCExpr * getDebugThreadLocalSymbol(const MCSymbol *Sym) const override
Describe a TLS variable address within debug info.
Base class for the full range of assembler expressions which are needed for parsing.
Context object for machine code objects.
bool isMergeableConst32() const
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
bool isMergeableConst16() const
Streaming machine code generation interface.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
virtual MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const
Given a constant with the SectionKind, return a section that it should be placed in.
unsigned getBitWidth() const
Return the number of bits in the APInt.
SectionKind - This is a simple POD value that classifies the properties of a section.
Constant * getAggregateElement(unsigned Elt) const
For aggregates (struct/array/vector) return the constant that corresponds to the specified element if...
bool isThreadLocal() const
If the value is "Thread Local", its value isn't shared by the threads.
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 hasExternalLinkage() const
unsigned UseInitArray
UseInitArray - Use .init_array instead of .ctors for static constructors.
Type * getType() const
All values are typed, get the type of this value.
bool isMergeableConst8() const
Class for arbitrary precision integers.
unsigned getVectorNumElements() const
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
PointerType * getType() const
Global values are always pointers.
COFFYAML::WeakExternalCharacteristics Characteristics
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
const MCExpr * getIndirectSymViaGOTPCRel(const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
Get MachO PC relative GOT entry relocation.
static std::string utohexstr(uint64_t X, bool LowerCase=false)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
int64_t getConstant() const
unsigned getPrimitiveSizeInBits() const LLVM_READONLY
Return the basic size of this type if it is a primitive type.
bool isMergeableConst4() const
Primary interface to the complete machine description for the target machine.
static APInt getNullValue(unsigned numBits)
Get the '0' value.
unsigned getPointerAddressSpace() const
Get the address space of this pointer or pointer vector type.
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx)
This class contains meta information specific to a module.
This file describes how to lower LLVM code to machine code.