27 #define DEBUG_TYPE "riscvmcexpr" 111 int64_t RISCVMCExpr::evaluateAsInt64(int64_t
Value)
const {
116 return SignExtend64<12>(Value);
119 return ((Value + 0x800) >> 12) & 0xfffff;
bool evaluateAsConstant(int64_t &Res) const
Compute iterated dominance frontiers using a linear time algorithm.
This represents an "assembler immediate".
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
VariantKind getKind() const
bool isAbsolute() const
Is this an absolute (as opposed to relocatable) value.
static StringRef getVariantKindName(VariantKind Kind)
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.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE R Default(T Value)
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 * getSubExpr() const
This class is intended to be used as a base class for asm properties and features specific to the tar...
A switch()-like statement whose cases are string literals.
Streaming machine code generation interface.
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
const MCSymbolRefExpr * getSymA() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void visitUsedExpr(const MCExpr &Expr)
LLVM_ATTRIBUTE_ALWAYS_INLINE StringSwitch & Case(StringLiteral S, T Value)
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
static VariantKind getVariantKindForName(StringRef name)
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
void visitUsedExpr(MCStreamer &Streamer) const override
static const RISCVMCExpr * create(const MCExpr *Expr, VariantKind Kind, MCContext &Ctx)