LLVM  13.0.0git
MipsMCInstLower.cpp
Go to the documentation of this file.
1 //===- MipsMCInstLower.cpp - Convert Mips MachineInstr to MCInst ----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains code to lower Mips MachineInstrs to their corresponding
10 // MCInst records.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "MipsMCInstLower.h"
17 #include "MipsAsmPrinter.h"
21 #include "llvm/MC/MCExpr.h"
22 #include "llvm/MC/MCInst.h"
24 #include <cassert>
25 
26 using namespace llvm;
27 
29  : AsmPrinter(asmprinter) {}
30 
32  Ctx = C;
33 }
34 
35 MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO,
36  MachineOperandType MOTy,
37  int64_t Offset) const {
40  bool IsGpOff = false;
41  const MCSymbol *Symbol;
42 
43  switch(MO.getTargetFlags()) {
44  default:
45  llvm_unreachable("Invalid target flag!");
46  case MipsII::MO_NO_FLAG:
47  break;
48  case MipsII::MO_GPREL:
49  TargetKind = MipsMCExpr::MEK_GPREL;
50  break;
52  TargetKind = MipsMCExpr::MEK_GOT_CALL;
53  break;
54  case MipsII::MO_GOT:
55  TargetKind = MipsMCExpr::MEK_GOT;
56  break;
57  case MipsII::MO_ABS_HI:
58  TargetKind = MipsMCExpr::MEK_HI;
59  break;
60  case MipsII::MO_ABS_LO:
61  TargetKind = MipsMCExpr::MEK_LO;
62  break;
63  case MipsII::MO_TLSGD:
64  TargetKind = MipsMCExpr::MEK_TLSGD;
65  break;
66  case MipsII::MO_TLSLDM:
67  TargetKind = MipsMCExpr::MEK_TLSLDM;
68  break;
70  TargetKind = MipsMCExpr::MEK_DTPREL_HI;
71  break;
73  TargetKind = MipsMCExpr::MEK_DTPREL_LO;
74  break;
76  TargetKind = MipsMCExpr::MEK_GOTTPREL;
77  break;
79  TargetKind = MipsMCExpr::MEK_TPREL_HI;
80  break;
82  TargetKind = MipsMCExpr::MEK_TPREL_LO;
83  break;
85  TargetKind = MipsMCExpr::MEK_HI;
86  IsGpOff = true;
87  break;
89  TargetKind = MipsMCExpr::MEK_LO;
90  IsGpOff = true;
91  break;
93  TargetKind = MipsMCExpr::MEK_GOT_DISP;
94  break;
96  TargetKind = MipsMCExpr::MEK_GOT_HI16;
97  break;
99  TargetKind = MipsMCExpr::MEK_GOT_LO16;
100  break;
101  case MipsII::MO_GOT_PAGE:
102  TargetKind = MipsMCExpr::MEK_GOT_PAGE;
103  break;
104  case MipsII::MO_GOT_OFST:
105  TargetKind = MipsMCExpr::MEK_GOT_OFST;
106  break;
107  case MipsII::MO_HIGHER:
108  TargetKind = MipsMCExpr::MEK_HIGHER;
109  break;
110  case MipsII::MO_HIGHEST:
111  TargetKind = MipsMCExpr::MEK_HIGHEST;
112  break;
114  TargetKind = MipsMCExpr::MEK_CALL_HI16;
115  break;
117  TargetKind = MipsMCExpr::MEK_CALL_LO16;
118  break;
119  case MipsII::MO_JALR:
120  return MCOperand();
121  }
122 
123  switch (MOTy) {
125  Symbol = MO.getMBB()->getSymbol();
126  break;
127 
130  Offset += MO.getOffset();
131  break;
132 
135  Offset += MO.getOffset();
136  break;
137 
140  Offset += MO.getOffset();
141  break;
142 
144  Symbol = MO.getMCSymbol();
145  Offset += MO.getOffset();
146  break;
147 
150  break;
151 
154  Offset += MO.getOffset();
155  break;
156 
157  default:
158  llvm_unreachable("<unknown operand type>");
159  }
160 
161  const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, Kind, *Ctx);
162 
163  if (Offset) {
164  // Note: Offset can also be negative
166  *Ctx);
167  }
168 
169  if (IsGpOff)
170  Expr = MipsMCExpr::createGpOff(TargetKind, Expr, *Ctx);
171  else if (TargetKind != MipsMCExpr::MEK_None)
172  Expr = MipsMCExpr::create(TargetKind, Expr, *Ctx);
173 
174  return MCOperand::createExpr(Expr);
175 }
176 
178  int64_t offset) const {
179  MachineOperandType MOTy = MO.getType();
180 
181  switch (MOTy) {
182  default: llvm_unreachable("unknown operand type");
184  // Ignore all implicit register operands.
185  if (MO.isImplicit()) break;
186  return MCOperand::createReg(MO.getReg());
188  return MCOperand::createImm(MO.getImm() + offset);
196  return LowerSymbolOperand(MO, MOTy, offset);
198  break;
199  }
200 
201  return MCOperand();
202 }
203 
204 MCOperand MipsMCInstLower::createSub(MachineBasicBlock *BB1,
205  MachineBasicBlock *BB2,
207  const MCSymbolRefExpr *Sym1 = MCSymbolRefExpr::create(BB1->getSymbol(), *Ctx);
208  const MCSymbolRefExpr *Sym2 = MCSymbolRefExpr::create(BB2->getSymbol(), *Ctx);
209  const MCBinaryExpr *Sub = MCBinaryExpr::createSub(Sym1, Sym2, *Ctx);
210 
211  return MCOperand::createExpr(MipsMCExpr::create(Kind, Sub, *Ctx));
212 }
213 
214 void MipsMCInstLower::
215 lowerLongBranchLUi(const MachineInstr *MI, MCInst &OutMI) const {
216  OutMI.setOpcode(Mips::LUi);
217 
218  // Lower register operand.
219  OutMI.addOperand(LowerOperand(MI->getOperand(0)));
220 
222  unsigned TargetFlags = MI->getOperand(1).getTargetFlags();
223  switch (TargetFlags) {
224  case MipsII::MO_HIGHEST:
226  break;
227  case MipsII::MO_HIGHER:
229  break;
230  case MipsII::MO_ABS_HI:
232  break;
233  case MipsII::MO_ABS_LO:
235  break;
236  default:
237  report_fatal_error("Unexpected flags for lowerLongBranchLUi");
238  }
239 
240  if (MI->getNumOperands() == 2) {
241  const MCExpr *Expr =
242  MCSymbolRefExpr::create(MI->getOperand(1).getMBB()->getSymbol(), *Ctx);
243  const MipsMCExpr *MipsExpr = MipsMCExpr::create(Kind, Expr, *Ctx);
244  OutMI.addOperand(MCOperand::createExpr(MipsExpr));
245  } else if (MI->getNumOperands() == 3) {
246  // Create %hi($tgt-$baltgt).
247  OutMI.addOperand(createSub(MI->getOperand(1).getMBB(),
248  MI->getOperand(2).getMBB(), Kind));
249  }
250 }
251 
252 void MipsMCInstLower::lowerLongBranchADDiu(const MachineInstr *MI,
253  MCInst &OutMI, int Opcode) const {
254  OutMI.setOpcode(Opcode);
255 
257  unsigned TargetFlags = MI->getOperand(2).getTargetFlags();
258  switch (TargetFlags) {
259  case MipsII::MO_HIGHEST:
261  break;
262  case MipsII::MO_HIGHER:
264  break;
265  case MipsII::MO_ABS_HI:
267  break;
268  case MipsII::MO_ABS_LO:
270  break;
271  default:
272  report_fatal_error("Unexpected flags for lowerLongBranchADDiu");
273  }
274 
275  // Lower two register operands.
276  for (unsigned I = 0, E = 2; I != E; ++I) {
277  const MachineOperand &MO = MI->getOperand(I);
278  OutMI.addOperand(LowerOperand(MO));
279  }
280 
281  if (MI->getNumOperands() == 3) {
282  // Lower register operand.
283  const MCExpr *Expr =
284  MCSymbolRefExpr::create(MI->getOperand(2).getMBB()->getSymbol(), *Ctx);
285  const MipsMCExpr *MipsExpr = MipsMCExpr::create(Kind, Expr, *Ctx);
286  OutMI.addOperand(MCOperand::createExpr(MipsExpr));
287  } else if (MI->getNumOperands() == 4) {
288  // Create %lo($tgt-$baltgt) or %hi($tgt-$baltgt).
289  OutMI.addOperand(createSub(MI->getOperand(2).getMBB(),
290  MI->getOperand(3).getMBB(), Kind));
291  }
292 }
293 
294 bool MipsMCInstLower::lowerLongBranch(const MachineInstr *MI,
295  MCInst &OutMI) const {
296  switch (MI->getOpcode()) {
297  default:
298  return false;
299  case Mips::LONG_BRANCH_LUi:
300  case Mips::LONG_BRANCH_LUi2Op:
301  case Mips::LONG_BRANCH_LUi2Op_64:
302  lowerLongBranchLUi(MI, OutMI);
303  return true;
304  case Mips::LONG_BRANCH_ADDiu:
305  case Mips::LONG_BRANCH_ADDiu2Op:
306  lowerLongBranchADDiu(MI, OutMI, Mips::ADDiu);
307  return true;
308  case Mips::LONG_BRANCH_DADDiu:
309  case Mips::LONG_BRANCH_DADDiu2Op:
310  lowerLongBranchADDiu(MI, OutMI, Mips::DADDiu);
311  return true;
312  }
313 }
314 
315 void MipsMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const {
316  if (lowerLongBranch(MI, OutMI))
317  return;
318 
319  OutMI.setOpcode(MI->getOpcode());
320 
321  for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
322  const MachineOperand &MO = MI->getOperand(i);
323  MCOperand MCOp = LowerOperand(MO);
324 
325  if (MCOp.isValid())
326  OutMI.addOperand(MCOp);
327  }
328 }
llvm::MipsMCExpr::MEK_GOT_DISP
@ MEK_GOT_DISP
Definition: MipsMCExpr.h:30
i
i
Definition: README.txt:29
llvm::MipsMCExpr::MEK_TLSLDM
@ MEK_TLSLDM
Definition: MipsMCExpr.h:44
llvm::MipsMCExpr::MEK_GOT_OFST
@ MEK_GOT_OFST
Definition: MipsMCExpr.h:33
llvm::MachineOperand::MO_BlockAddress
@ MO_BlockAddress
Address of a basic block.
Definition: MachineOperand.h:63
llvm::MipsMCExpr::MEK_HIGHER
@ MEK_HIGHER
Definition: MipsMCExpr.h:37
MipsBaseInfo.h
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:100
MachineInstr.h
llvm::MachineOperand::MO_Immediate
@ MO_Immediate
Immediate operand.
Definition: MachineOperand.h:53
llvm
Definition: AllocatorList.h:23
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::MCOperand::createExpr
static MCOperand createExpr(const MCExpr *Val)
Definition: MCInst.h:161
llvm::MachineOperand::MachineOperandType
MachineOperandType
Definition: MachineOperand.h:51
llvm::MipsII::MO_GOT_LO16
@ MO_GOT_LO16
Definition: MipsBaseInfo.h:90
llvm::MachineOperand::getGlobal
const GlobalValue * getGlobal() const
Definition: MachineOperand.h:563
llvm::MCOperand::createImm
static MCOperand createImm(int64_t Val)
Definition: MCInst.h:140
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:71
llvm::MCConstantExpr::create
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Definition: MCExpr.cpp:194
llvm::MachineOperand::getBlockAddress
const BlockAddress * getBlockAddress() const
Definition: MachineOperand.h:568
ErrorHandling.h
llvm::MipsII::MO_JALR
@ MO_JALR
Helper operand used to generate R_MIPS_JALR.
Definition: MipsBaseInfo.h:95
MachineBasicBlock.h
llvm::MipsII::MO_DTPREL_HI
@ MO_DTPREL_HI
Definition: MipsBaseInfo.h:64
llvm::MipsII::MO_TPREL_HI
@ MO_TPREL_HI
MO_TPREL_HI/LO - Represents the hi and low part of the offset from.
Definition: MipsBaseInfo.h:73
llvm::MipsII::MO_NO_FLAG
@ MO_NO_FLAG
Definition: MipsBaseInfo.h:34
llvm::MipsMCExpr::MEK_GOT_PAGE
@ MEK_GOT_PAGE
Definition: MipsMCExpr.h:34
llvm::MipsII::MO_CALL_HI16
@ MO_CALL_HI16
Definition: MipsBaseInfo.h:91
llvm::MipsII::MO_GOTTPREL
@ MO_GOTTPREL
MO_GOTTPREL - Represents the offset from the thread pointer (Initial.
Definition: MipsBaseInfo.h:69
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:183
llvm::MCBinaryExpr
Binary assembler expressions.
Definition: MCExpr.h:479
llvm::MachineOperand::getOffset
int64_t getOffset() const
Return the offset from the symbol in this operand.
Definition: MachineOperand.h:600
llvm::MipsII::MO_TLSGD
@ MO_TLSGD
MO_TLSGD - Represents the offset into the global offset table at which.
Definition: MipsBaseInfo.h:58
llvm::MachineOperand::getMCSymbol
MCSymbol * getMCSymbol() const
Definition: MachineOperand.h:573
llvm::MachineOperand::MO_Register
@ MO_Register
Register operand.
Definition: MachineOperand.h:52
llvm::MCInst::setOpcode
void setOpcode(unsigned Op)
Definition: MCInst.h:196
llvm::MipsMCExpr::MEK_HIGHEST
@ MEK_HIGHEST
Definition: MipsMCExpr.h:38
llvm::MachineBasicBlock::getSymbol
MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
Definition: MachineBasicBlock.cpp:59
llvm::MipsMCExpr::MEK_GOT_LO16
@ MEK_GOT_LO16
Definition: MipsMCExpr.h:32
llvm::MipsMCInstLower::Initialize
void Initialize(MCContext *C)
Definition: MipsMCInstLower.cpp:31
llvm::MachineOperand::isImplicit
bool isImplicit() const
Definition: MachineOperand.h:380
llvm::MipsII::MO_GOT_OFST
@ MO_GOT_OFST
Definition: MipsBaseInfo.h:81
llvm::MachineOperand::MO_GlobalAddress
@ MO_GlobalAddress
Address of a global value.
Definition: MachineOperand.h:62
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::MachineOperand::getImm
int64_t getImm() const
Definition: MachineOperand.h:537
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::MipsII::MO_TLSLDM
@ MO_TLSLDM
MO_TLSLDM - Represents the offset into the global offset table at which.
Definition: MipsBaseInfo.h:63
llvm::MipsII::MO_GOT_HI16
@ MO_GOT_HI16
MO_GOT_HI16/LO16, MO_CALL_HI16/LO16 - Relocations used for large GOTs.
Definition: MipsBaseInfo.h:89
MCInst.h
llvm::MipsII::MO_HIGHEST
@ MO_HIGHEST
Definition: MipsBaseInfo.h:86
llvm::MachineOperand
MachineOperand class - Representation of each machine instruction operand.
Definition: MachineOperand.h:49
llvm::report_fatal_error
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
Definition: Error.cpp:140
llvm::MipsMCInstLower::Lower
void Lower(const MachineInstr *MI, MCInst &OutMI) const
Definition: MipsMCInstLower.cpp:315
llvm::MipsAsmPrinter
Definition: MipsAsmPrinter.h:42
llvm::MipsII::MO_ABS_LO
@ MO_ABS_LO
Definition: MipsBaseInfo.h:53
MipsMCExpr.h
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:95
llvm::MCInst::addOperand
void addOperand(const MCOperand Op)
Definition: MCInst.h:209
llvm::MipsII::MO_GOT_CALL
@ MO_GOT_CALL
MO_GOT_CALL - Represents the offset into the global offset table at which the address of a call site ...
Definition: MipsBaseInfo.h:44
llvm::MCSymbolRefExpr::VariantKind
VariantKind
Definition: MCExpr.h:194
llvm::MachineOperand::getTargetFlags
unsigned getTargetFlags() const
Definition: MachineOperand.h:221
llvm::AsmPrinter::GetCPISymbol
virtual MCSymbol * GetCPISymbol(unsigned CPID) const
Return the symbol for the specified constant pool entry.
Definition: AsmPrinter.cpp:3062
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:64
llvm::MipsMCExpr::MEK_DTPREL_HI
@ MEK_DTPREL_HI
Definition: MipsMCExpr.h:25
llvm::MCOperand::isValid
bool isValid() const
Definition: MCInst.h:59
llvm::AsmPrinter::GetBlockAddressSymbol
MCSymbol * GetBlockAddressSymbol(const BlockAddress *BA) const
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
Definition: AsmPrinter.cpp:3053
llvm::numbers::e
constexpr double e
Definition: MathExtras.h:57
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::MipsMCExpr::MEK_GOT
@ MEK_GOT
Definition: MipsMCExpr.h:27
llvm::MachineOperand::MO_MCSymbol
@ MO_MCSymbol
MCSymbol reference (for debug/eh info)
Definition: MachineOperand.h:67
llvm::MipsMCExpr::MEK_TLSGD
@ MEK_TLSGD
Definition: MipsMCExpr.h:43
llvm::MachineOperand::getType
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
Definition: MachineOperand.h:219
llvm::AsmPrinter::getSymbol
MCSymbol * getSymbol(const GlobalValue *GV) const
Definition: AsmPrinter.cpp:478
llvm::MCBinaryExpr::createSub
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Definition: MCExpr.h:608
llvm::MipsII::MO_GOT_DISP
@ MO_GOT_DISP
Definition: MipsBaseInfo.h:79
llvm::MachineOperand::getReg
Register getReg() const
getReg - Returns the register number.
Definition: MachineOperand.h:360
llvm::MipsMCExpr::MEK_CALL_HI16
@ MEK_CALL_HI16
Definition: MipsMCExpr.h:22
llvm::MCSymbolRefExpr
Represent a reference to a symbol from inside an expression.
Definition: MCExpr.h:192
llvm::MipsII::MO_TPREL_LO
@ MO_TPREL_LO
Definition: MipsBaseInfo.h:74
llvm::MachineOperand::MO_JumpTableIndex
@ MO_JumpTableIndex
Address of indexed Jump Table for switch.
Definition: MachineOperand.h:60
llvm::MCBinaryExpr::createAdd
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Definition: MCExpr.h:523
llvm::MipsII::MO_GOT
@ MO_GOT
MO_GOT - Represents the offset into the global offset table at which the address the relocation entry...
Definition: MipsBaseInfo.h:38
llvm::AsmPrinter::GetExternalSymbolSymbol
MCSymbol * GetExternalSymbolSymbol(StringRef Sym) const
Return the MCSymbol for the specified ExternalSymbol.
Definition: AsmPrinter.cpp:3109
llvm::MipsMCExpr::MEK_None
@ MEK_None
Definition: MipsMCExpr.h:21
llvm::MachineOperand::getMBB
MachineBasicBlock * getMBB() const
Definition: MachineOperand.h:552
llvm::MipsMCExpr::MEK_GOT_CALL
@ MEK_GOT_CALL
Definition: MipsMCExpr.h:29
llvm::AsmPrinter::GetJTISymbol
MCSymbol * GetJTISymbol(unsigned JTID, bool isLinkerPrivate=false) const
Return the symbol for the specified jump table entry.
Definition: AsmPrinter.cpp:3090
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:136
llvm::MCOperand::createReg
static MCOperand createReg(unsigned Reg)
Definition: MCInst.h:133
llvm::MachineOperand::MO_MachineBasicBlock
@ MO_MachineBasicBlock
MachineBasicBlock reference.
Definition: MachineOperand.h:56
llvm::MipsMCExpr::MEK_TPREL_LO
@ MEK_TPREL_LO
Definition: MipsMCExpr.h:46
llvm::MipsMCExpr::MEK_GOT_HI16
@ MEK_GOT_HI16
Definition: MipsMCExpr.h:31
llvm::MipsMCExpr::create
static const MipsMCExpr * create(MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
Definition: MipsMCExpr.cpp:27
MipsMCInstLower.h
MipsAsmPrinter.h
llvm::MipsII::MO_GPOFF_LO
@ MO_GPOFF_LO
Definition: MipsBaseInfo.h:78
llvm::MipsMCExpr::MipsExprKind
MipsExprKind
Definition: MipsMCExpr.h:20
llvm::MipsMCExpr::MEK_TPREL_HI
@ MEK_TPREL_HI
Definition: MipsMCExpr.h:45
llvm::MipsMCExpr::MEK_GOTTPREL
@ MEK_GOTTPREL
Definition: MipsMCExpr.h:28
llvm::MipsMCExpr::MEK_LO
@ MEK_LO
Definition: MipsMCExpr.h:39
llvm::MachineOperand::MO_ExternalSymbol
@ MO_ExternalSymbol
Name of external global symbol.
Definition: MachineOperand.h:61
llvm::MachineOperand::getIndex
int getIndex() const
Definition: MachineOperand.h:557
llvm::MipsMCExpr::MEK_DTPREL_LO
@ MEK_DTPREL_LO
Definition: MipsMCExpr.h:26
llvm::MipsMCExpr
Definition: MipsMCExpr.h:18
llvm::AsmPrinter
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:82
llvm::MipsMCExpr::MEK_GPREL
@ MEK_GPREL
Definition: MipsMCExpr.h:35
llvm::MCSymbolRefExpr::create
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
Definition: MCExpr.h:384
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:79
llvm::MipsMCExpr::MEK_HI
@ MEK_HI
Definition: MipsMCExpr.h:36
llvm::MipsII::MO_ABS_HI
@ MO_ABS_HI
MO_ABS_HI/LO - Represents the hi or low part of an absolute symbol address.
Definition: MipsBaseInfo.h:52
llvm::MipsII::MO_GPOFF_HI
@ MO_GPOFF_HI
Definition: MipsBaseInfo.h:77
llvm::MipsII::MO_DTPREL_LO
@ MO_DTPREL_LO
Definition: MipsBaseInfo.h:65
llvm::MachineOperand::getSymbolName
const char * getSymbolName() const
Definition: MachineOperand.h:608
llvm::MipsII::MO_GPREL
@ MO_GPREL
MO_GPREL - Represents the offset from the current gp value to be used for the relocatable object file...
Definition: MipsBaseInfo.h:48
llvm::MipsMCExpr::createGpOff
static const MipsMCExpr * createGpOff(MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
Definition: MipsMCExpr.cpp:32
MachineOperand.h
llvm::MCOperand
Instances of this class represent operands of the MCInst class.
Definition: MCInst.h:35
llvm::MCSymbolRefExpr::VK_None
@ VK_None
Definition: MCExpr.h:195
llvm::MachineOperand::MO_RegisterMask
@ MO_RegisterMask
Mask of preserved registers.
Definition: MachineOperand.h:64
llvm::MipsMCInstLower::LowerOperand
MCOperand LowerOperand(const MachineOperand &MO, int64_t offset=0) const
Definition: MipsMCInstLower.cpp:177
llvm::MipsII::MO_CALL_LO16
@ MO_CALL_LO16
Definition: MipsBaseInfo.h:92
llvm::MipsII::MO_HIGHER
@ MO_HIGHER
MO_HIGHER/HIGHEST - Represents the highest or higher half word of a 64-bit symbol address.
Definition: MipsBaseInfo.h:85
MCExpr.h
llvm::MipsMCInstLower::MipsMCInstLower
MipsMCInstLower(MipsAsmPrinter &asmprinter)
Definition: MipsMCInstLower.cpp:28
llvm::MipsII::MO_GOT_PAGE
@ MO_GOT_PAGE
Definition: MipsBaseInfo.h:80
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::MipsMCExpr::MEK_CALL_LO16
@ MEK_CALL_LO16
Definition: MipsMCExpr.h:23
llvm::MachineOperand::MO_ConstantPoolIndex
@ MO_ConstantPoolIndex
Address of indexed Constant in Constant Pool.
Definition: MachineOperand.h:58