49 C.
emitError(
"AMDGPUMCInstLower::lower - Pseudo instruction doesn't have "
57 switch (MO.getType()) {
68 MO.getMBB()->getSymbol(), Ctx));
101 errs() <<
"Warning: Illegal instruction detected: " << Err <<
"\n";
109 while (I != MBB->
end() && I->isInsideBundle()) {
115 MCInstLowering.lower(MI, TmpInst);
136 MCCodeEmitter &InstEmitter = ObjStreamer.getAssembler().getEmitter();
142 std::string &HexLine =
HexLines.back();
145 for (
size_t i = 0; i < CodeBytes.
size(); i += 4) {
146 unsigned int CodeDWord = *(
unsigned int *)&CodeBytes[i];
147 HexStream <<
format(
"%s%08X", (i > 0 ?
" " :
""), CodeDWord);
150 DisasmStream.
flush();
const MachineFunction * getParent() const
getParent - Return the MachineFunction containing this basic block.
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
Interface definition for R600InstrInfo.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
iterator_range< mop_iterator > explicit_operands()
MCContext & OutContext
This is the context for the output file that we are streaming.
static MCOperand createExpr(const MCExpr *Val)
#define END_OF_TEXT_LABEL_NAME
const MachineFunction * MF
The current machine function.
A raw_ostream that writes to an SmallVector or SmallString.
MachineBasicBlock reference.
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
int pseudoToMCOpcode(int Opcode) const
Return a target-specific opcode if Opcode is a pseudo instruction.
StringRef getName() const
Return a constant reference to the value's name.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
static MCOperand createReg(unsigned Reg)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
const MCAsmInfo * getMCAsmInfo() const
Return target specific asm information.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Target-dependent index+offset operand.
virtual void encodeInstruction(const MCInst &Inst, raw_ostream &OS, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const =0
EncodeInstruction - Encode the given Inst to bytes on the output stream OS.
Name of external global symbol.
const AMDGPUInstrInfo * getInstrInfo() const override
Represent a reference to a symbol from inside an expression.
AMDGPUMCInstLower(MCContext &ctx, const AMDGPUSubtarget &ST)
Context object for machine code objects.
void emitError(unsigned LocCookie, const Twine &ErrorStr)
emitError - Emit an error message to the currently installed error handler with optional location inf...
void EmitInstruction(const MachineInstr *MI) override
Implemented in AMDGPUMCInstLower.cpp.
Streaming object file generation interface.
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const MachineBasicBlock * getParent() const
format_object< Ts...> format(const char *Fmt, const Ts &...Vals)
These are helper functions used to produce formatted output.
Address of a global value.
This is an important class for using LLVM in a threaded context.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
MCCodeEmitter - Generic instruction encoding interface.
TargetMachine & TM
Target machine description.
The AMDGPU TargetMachine interface definition for hw codgen targets.
std::vector< std::string > HexLines
void setOpcode(unsigned Op)
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
void EmitToStreamer(MCStreamer &S, const MCInst &Inst)
std::vector< std::string > DisasmLines
Representation of each machine instruction.
void lower(const MachineInstr *MI, MCInst &OutMI) const
Lower a MachineInstr to an MCInst.
Interface definition for SIInstrInfo.
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, const MCSubtargetInfo &STI) override
Print the specified MCInst to the specified raw_ostream.
AMDGPU Assembly printer class.
MCSubtargetInfo - Generic base class for all target subtargets.
A raw_ostream that writes to an std::string.
virtual const TargetInstrInfo * getInstrInfo() const
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
void addOperand(const MCOperand &Op)
StringRef - Represent a constant reference to a string, i.e.
Instances of this class represent operands of the MCInst class.
static MCOperand createImm(int64_t Val)