20 #define DEBUG_TYPE "mipsmcexpr"
115 if (Expr->evaluateAsAbsolute(AbsVal))
118 Expr->
print(OS, MAI,
true);
174 AbsVal = SignExtend64<16>(AbsVal);
178 AbsVal = SignExtend64<16>((AbsVal + 0x8000) >> 16);
181 AbsVal = SignExtend64<16>((AbsVal + 0x80008000LL) >> 32);
184 AbsVal = SignExtend64<16>((AbsVal + 0x800080008000LL) >> 48);
264 E->fixELFSymbolsInTLSFixups(Asm);
278 if (
const MipsMCExpr *S2 = dyn_cast<const MipsMCExpr>(S1->getSubExpr())) {
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
const MCExpr * getSubExpr() const
Get the child of this expression.
const MCSymbol & getSymbol() const
This represents an "assembler immediate".
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
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 isAbsolute() const
Is this an absolute (as opposed to relocatable) value.
void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
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...
const MCExpr * getLHS() const
Get the left-hand side expression of the binary operator.
Streaming machine code generation interface.
static const MipsMCExpr * createGpOff(MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm)
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
const MCSymbolRefExpr * getSymB() const
Binary assembler expressions.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const MCSymbolRefExpr * getSymA() const
uint32_t getRefKind() const
bool evaluateAsRelocatable(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const
Try to evaluate the expression to a relocatable value, i.e.
void visitUsedExpr(const MCExpr &Expr)
static const MipsMCExpr * create(MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
const MCExpr * getRHS() const
Get the right-hand side expression of the binary operator.
static MCValue get(const MCSymbolRefExpr *SymA, const MCSymbolRefExpr *SymB=nullptr, int64_t Val=0, uint32_t RefKind=0)
References to labels and assigned expressions.
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
int64_t getConstant() const
MipsExprKind getKind() const
Get the kind of this expression.
This class implements an extremely fast bulk output stream that can only output to a stream...
Target specific expression.