26 #define DEBUG_TYPE "mipsmcexpr" 126 if (Expr->evaluateAsAbsolute(AbsVal))
129 Expr->
print(OS, MAI,
true);
189 AbsVal = SignExtend64<16>(AbsVal);
193 AbsVal = SignExtend64<16>((AbsVal + 0x8000) >> 16);
196 AbsVal = SignExtend64<16>((AbsVal + 0x80008000LL) >> 32);
199 AbsVal = SignExtend64<16>((AbsVal + 0x800080008000LL) >> 48);
276 E->fixELFSymbolsInTLSFixups(Asm);
294 if (
const MipsMCExpr *S2 = dyn_cast<const MipsMCExpr>(S1->getSubExpr())) {
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
This class represents lattice values for constants.
This represents an "assembler immediate".
const MCExpr * getLHS() const
Get the left-hand side expression of the binary operator.
bool isAbsolute() const
Is this an absolute (as opposed to relocatable) value.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
int64_t getConstant() const
const MCSymbolRefExpr * getSymB() const
Encapsulates the layout of an assembly file at a particular point in time.
Base class for the full range of assembler expressions which are needed for parsing.
Represent a reference to a symbol from inside an expression.
Context object for machine code objects.
bool evaluateAsRelocatable(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const
Try to evaluate the expression to a relocatable value, i.e.
const MCExpr * getRHS() const
Get the right-hand side expression of the binary operator.
MipsExprKind getKind() const
Get the kind of this expression.
void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override
void visitUsedExpr(MCStreamer &Streamer) const override
This class is intended to be used as a base class for asm properties and features specific to the tar...
Streaming machine code generation interface.
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
static const MipsMCExpr * createGpOff(MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm)
const MCSymbolRefExpr * getSymA() const
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Binary assembler expressions.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const MCSymbol & getSymbol() const
void visitUsedExpr(const MCExpr &Expr)
const MCExpr * getSubExpr() const
Get the child of this expression.
static const MipsMCExpr * create(MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
static MCValue get(const MCSymbolRefExpr *SymA, const MCSymbolRefExpr *SymB=nullptr, int64_t Val=0, uint32_t RefKind=0)
References to labels and assigned expressions.
uint32_t getRefKind() const
This class implements an extremely fast bulk output stream that can only output to a stream...
Target specific expression.