LLVM 22.0.0git
LoongArchAsmBackend.cpp File Reference
#include "LoongArchAsmBackend.h"
#include "LoongArchFixupKinds.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCELFObjectWriter.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/BinaryFormat/ELFRelocs/LoongArch.def"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "loongarch-asmbackend"
#define ELF_RELOC(X, Y)

Functions

static void reportOutOfRangeError (MCContext &Ctx, SMLoc Loc, unsigned N)
static uint64_t adjustFixupValue (const MCFixup &Fixup, uint64_t Value, MCContext &Ctx)
static void fixupLeb128 (MCContext &Ctx, const MCFixup &Fixup, uint8_t *Data, uint64_t Value)
static std::pair< MCFixupKind, MCFixupKindgetRelocPairForSize (unsigned Size)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "loongarch-asmbackend"

Definition at line 27 of file LoongArchAsmBackend.cpp.

◆ ELF_RELOC

#define ELF_RELOC ( X,
Y )
Value:
.Case(#X, Y)
static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")
static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")

Function Documentation

◆ adjustFixupValue()

◆ fixupLeb128()

void fixupLeb128 ( MCContext & Ctx,
const MCFixup & Fixup,
uint8_t * Data,
uint64_t Value )
static

Definition at line 134 of file LoongArchAsmBackend.cpp.

References llvm::Data, Fixup, and I.

Referenced by llvm::LoongArchAsmBackend::applyFixup().

◆ getRelocPairForSize()

std::pair< MCFixupKind, MCFixupKind > getRelocPairForSize ( unsigned Size)
inlinestatic

◆ reportOutOfRangeError()

void reportOutOfRangeError ( MCContext & Ctx,
SMLoc Loc,
unsigned N )
static

Definition at line 86 of file LoongArchAsmBackend.cpp.

References llvm::maxIntN(), llvm::minIntN(), and N.

Referenced by adjustFixupValue().