22 const struct ModifierEntry {
23 const char *
const Spelling;
41 return new (Ctx)
AVRMCExpr(Kind, Expr, Negated);
51 getSubExpr()->print(OS, MAI);
59 getSubExpr()->evaluateAsRelocatable(Value,
nullptr,
nullptr);
76 bool isRelocatable = SubExpr->evaluateAsRelocatable(Value, Layout, Fixup);
84 if (!Layout)
return false;
99 int64_t AVRMCExpr::evaluateAsInt64(int64_t
Value)
const {
142 return static_cast<uint64_t
>(Value) & 0xff;
195 [
this](ModifierEntry
const &
Mod) {
return Mod.VariantKind ==
Kind; });
197 if (Modifier !=
std::end(ModifierNames)) {
198 return Modifier->Spelling;
206 [&Name](ModifierEntry
const &
Mod) {
return Mod.Spelling ==
Name; });
208 if (Modifier !=
std::end(ModifierNames)) {
209 return Modifier->VariantKind;
const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
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 class represents lattice values for constants.
This represents an "assembler immediate".
VariantKind getKind() const
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...
bool isAbsolute() const
Is this an absolute (as opposed to relocatable) value.
Replaces the immediate operand of a 16-bit Rd, K instruction with the lower 8 bits of a negated 16-bi...
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
void visitUsedExpr(MCStreamer &streamer) const override
MCContext & getContext() const
int64_t getConstant() const
const MCSymbolRefExpr * getSymB() const
VariantKind
Specifies the type of an expression.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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.
static StringRef getName(Value *V)
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...
MCAssembler & getAssembler() const
Get the assembler object this is a layout for.
AVR::Fixups getFixupKind() const
Gets the fixup which corresponds to the expression.
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().
bool evaluateAsConstant(int64_t &Result) const
Evaluates the fixup as a constant value.
const char * getName() const
Gets the name of the expression.
Corresponds to lo8(gs()).
const MCSymbolRefExpr * getSymA() const
A 16-bit program memory address.
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a 16-bit progra...
auto find_if(R &&Range, UnaryPredicate P) -> decltype(adl_begin(Range))
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Corresponds to hi8(gs()).
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a negated 24-bi...
const MCSymbol & getSymbol() 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.
The access may modify the value stored in memory.
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.
static VariantKind getKindByName(StringRef Name)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
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.
Replaces the immediate operand of a 16-bit Rd, K instruction with the upper 8 bits of a 24-bit value ...