19 #define DEBUG_TYPE "ppcmcexpr"
24 return new (Ctx)
PPCMCExpr(Kind, Expr, isDarwin);
70 PPCMCExpr::evaluateAsInt64(int64_t
Value)
const {
73 return Value & 0xffff;
75 return (Value >> 16) & 0xffff;
77 return ((Value + 0x8000) >> 16) & 0xffff;
79 return (Value >> 32) & 0xffff;
81 return ((Value + 0x8000) >> 32) & 0xffff;
83 return (Value >> 48) & 0xffff;
85 return ((Value + 0x8000) >> 48) & 0xffff;
102 int64_t Result = evaluateAsInt64(Value.
getConstant());
bool evaluateAsConstant(int64_t &Res) const
const MCSymbol & getSymbol() const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
This represents an "assembler immediate".
static const PPCMCExpr * create(VariantKind Kind, const MCExpr *Expr, bool isDarwin, MCContext &Ctx)
const MCExpr * getSubExpr() const
getSubExpr - Get the child of this expression.
MCContext & getContext() const
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
bool isDarwinSyntax() const
isDarwinSyntax - True if expression is to be printed using Darwin syntax.
fixup_ppc_half16 - A 16-bit fixup corresponding to lo16(_foo) or ha16(_foo) for instrs like 'li' or '...
Encapsulates the layout of an assembly file at a particular point in time.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
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.
This class is intended to be used as a base class for asm properties and features specific to the tar...
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
Streaming machine code generation interface.
MCFixupKind getKind() const
const MCSymbolRefExpr * getSymB() const
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
PowerPC TLS Dynamic Call Fixup
const MCSymbolRefExpr * getSymA() const
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
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 MCValue get(const MCSymbolRefExpr *SymA, const MCSymbolRefExpr *SymB=nullptr, int64_t Val=0, uint32_t RefKind=0)
VariantKind getKind() const
int64_t getConstant() const
const ARM::ArchExtKind Kind
LLVM Value Representation.
MCAssembler & getAssembler() const
Get the assembler object this is a layout for.
This class implements an extremely fast bulk output stream that can only output to a stream...
void visitUsedExpr(MCStreamer &Streamer) const override