Go to the documentation of this file.
35 #define DEBUG_TYPE "mccodeemitter"
37 STATISTIC(MCNumEmitted,
"Number of MC instructions emitted");
47 VEMCCodeEmitter(
const VEMCCodeEmitter &) =
delete;
48 VEMCCodeEmitter &operator=(
const VEMCCodeEmitter &) =
delete;
49 ~VEMCCodeEmitter()
override =
default;
89 unsigned VEMCCodeEmitter::getMachineOpValue(
const MCInst &
MI,
94 return Ctx.getRegisterInfo()->getEncodingValue(MO.
getReg());
96 return static_cast<unsigned>(MO.
getImm());
101 if (
const VEMCExpr *SExpr = dyn_cast<VEMCExpr>(Expr)) {
108 if (Expr->evaluateAsAbsolute(Res))
121 return getMachineOpValue(
MI, MO,
Fixups, STI);
144 getMachineOpValue(
MI, MO,
Fixups, STI)));
148 #include "VEGenMCCodeEmitter.inc"
152 return new VEMCCodeEmitter(MCII, Ctx);
This is an optimization pass for GlobalISel generic memory operations.
Context object for machine code objects.
static MCFixup create(uint32_t Offset, const MCExpr *Value, MCFixupKind Kind, SMLoc Loc=SMLoc())
Instances of this class represent a single low-level machine instruction.
static unsigned VECondCodeToVal(VECC::CondCode CC)
static uint32_t getBranchTargetOpValue(const MCInst &MI, unsigned OpIdx, unsigned FixupKind, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI)
getBranchTargetOpValue - Helper function to get the branch target operand, which is either an immedia...
STATISTIC(NumFunctions, "Total number of functions")
This class implements an extremely fast bulk output stream that can only output to a stream.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCCodeEmitter * createVEMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx)
static unsigned VERDToVal(VERD::RoundingMode R)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Interface to description of machine instruction set.
MCCodeEmitter - Generic instruction encoding interface.
const MCExpr * getExpr() const
MCFixupKind
Extensible enumeration to represent the type of a fixup.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Instances of this class represent operands of the MCInst class.
@ fixup_ve_srel32
fixup_ve_srel32 - 32-bit fixup corresponding to foo for relative branch
Generic base class for all target subtargets.
Base class for the full range of assembler expressions which are needed for parsing.
unsigned getReg() const
Returns the register number.