22 const struct ModifierEntry {
23 const char *
const Spelling;
38 return new (Ctx)
AVRMCExpr(Kind, Expr, Negated);
81 if (!Layout)
return false;
96 int64_t AVRMCExpr::evaluateAsInt64(int64_t
Value)
const {
125 return static_cast<uint64_t
>(Value) & 0xff;
169 [
this](ModifierEntry
const &Mod) {
return Mod.VariantKind == Kind; });
171 if (Modifier !=
std::end(ModifierNames)) {
172 return Modifier->Spelling;
180 [&Name](ModifierEntry
const &Mod) {
return Mod.Spelling ==
Name; });
182 if (Modifier !=
std::end(ModifierNames)) {
183 return Modifier->VariantKind;
const_iterator end(StringRef path)
Get end iterator over path.
const MCSymbol & getSymbol() const
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a negated 16-bi...
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
This represents an "assembler immediate".
Replaces the immediate operand of a 16-bit Rd, K instruction with the lower 8 bits of a 16-bit progra...
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a negated 16-bi...
const MCExpr * getSubExpr() const
const_iterator begin(StringRef path)
Get begin iterator over path.
MCContext & getContext() const
Replaces the immediate operand of a 16-bit Rd, K instruction with the lower 8 bits of a negated 16-bi...
bool evaluateAsConstant(int64_t &Result) const
Evaluates the fixup as a constant value.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
void visitUsedExpr(MCStreamer &streamer) const override
VariantKind
Specifies the type of an expression.
Encapsulates the layout of an assembly file at a particular point in time.
A expression in AVR machine code.
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a negated negat...
Replaces the immediate operand of a 16-bit Rd, K instruction with the lower 8 bits of a 16-bit value ...
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.
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a negated negat...
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...
Streaming machine code generation interface.
Corresponds to hlo8() and hh8().
VariantKind getKind() const
Gets the type of the expression.
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a 16-bit progra...
AVR::Fixups getFixupKind() const
Gets the fixup which corresponds to the expression.
const MCSymbolRefExpr * getSymB() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a negated 24-bi...
const MCSymbolRefExpr * getSymA() const
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a 16-bit value ...
Fixups
The set of supported fixups.
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)
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
Replaces the immediate operand of a 16-bit Rd, K instruction with the lower 8 bits of a negated 16-bi...
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a 32-bit value ...
static MCValue get(const MCSymbolRefExpr *SymA, const MCSymbolRefExpr *SymB=nullptr, int64_t Val=0, uint32_t RefKind=0)
static const AVRMCExpr * create(VariantKind Kind, const MCExpr *Expr, bool isNegated, MCContext &Ctx)
Creates an AVR machine code expression.
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
static VariantKind getKindByName(StringRef Name)
VariantKind getKind() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
int64_t getConstant() const
LLVM Value Representation.
MCAssembler & getAssembler() const
Get the assembler object this is a layout for.
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a 24-bit progra...
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.
auto find_if(R &&Range, UnaryPredicate P) -> decltype(std::begin(Range))
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly...
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a 24-bit value ...
const char * getName() const
Gets the name of the expression.