LLVM: lib/Target/BPF/BPFMCInstLower.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
27using namespace llvm;
28
31 return Printer.getSymbol(MO.getGlobal());
32}
33
36 return Printer.GetExternalSymbolSymbol(MO.getSymbolName());
37}
38
49
52
55 switch (MO.getType()) {
56 default:
60
61 if (MO.isImplicit())
62 continue;
64 break;
67 break;
71 break;
73 continue;
76 break;
79 break;
82 break;
84 MCOp = LowerSymbolOperand(MO, Printer.getJTPublicSymbol(MO.getIndex()));
85 break;
86 }
87
89 }
90}
MCSymbol * GetExternalSymbolSymbol(const MachineOperand &MO) const
Definition BPFMCInstLower.cpp:35
MCSymbol * GetGlobalAddressSymbol(const MachineOperand &MO) const
Definition BPFMCInstLower.cpp:30
MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const
Definition BPFMCInstLower.cpp:39
void Lower(const MachineInstr *MI, MCInst &OutMI) const
Definition BPFMCInstLower.cpp:50
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent a single low-level machine instruction.
void addOperand(const MCOperand Op)
void setOpcode(unsigned Op)
Instances of this class represent operands of the MCInst class.
static MCOperand createExpr(const MCExpr *Val)
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
const GlobalValue * getGlobal() const
bool isJTI() const
isJTI - Tests if this is a MO_JumpTableIndex operand.
const char * getSymbolName() const
@ MO_Immediate
Immediate operand.
@ MO_ConstantPoolIndex
Address of indexed Constant in Constant Pool.
@ MO_GlobalAddress
Address of a global value.
@ MO_RegisterMask
Mask of preserved registers.
@ MO_MachineBasicBlock
MachineBasicBlock reference.
@ MO_Register
Register operand.
@ MO_ExternalSymbol
Name of external global symbol.
@ MO_JumpTableIndex
Address of indexed Jump Table for switch.
int64_t getOffset() const
Return the offset from the symbol in this operand.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.