Go to the documentation of this file.
35 #define DEBUG_TYPE "mccodeemitter"
37 STATISTIC(MCNumEmitted,
"Number of MC instructions emitted");
47 : MCII(mcii), Ctx(ctx) {}
48 VEMCCodeEmitter(
const VEMCCodeEmitter &) =
delete;
49 VEMCCodeEmitter &operator=(
const VEMCCodeEmitter &) =
delete;
50 ~VEMCCodeEmitter()
override =
default;
81 verifyInstructionPredicates(
const MCInst &
MI,
90 verifyInstructionPredicates(
MI,
99 unsigned VEMCCodeEmitter::getMachineOpValue(
const MCInst &
MI,
104 return Ctx.getRegisterInfo()->getEncodingValue(MO.
getReg());
106 return static_cast<unsigned>(MO.
getImm());
111 if (
const VEMCExpr *SExpr = dyn_cast<VEMCExpr>(Expr)) {
118 if (Expr->evaluateAsAbsolute(Res))
131 return getMachineOpValue(
MI, MO,
Fixups, STI);
154 getMachineOpValue(
MI, MO,
Fixups, STI)));
158 #define ENABLE_INSTR_PREDICATE_VERIFIER
159 #include "VEGenMCCodeEmitter.inc"
163 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())
Container class for subtarget features.
Instances of this class represent a single low-level machine instruction.
static unsigned VECondCodeToVal(VECC::CondCode CC)
const FeatureBitset & getFeatureBits() const
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.