Home
last modified time | relevance | path

Searched refs:MO (Results 1 – 25 of 272) sorted by relevance

1234567891011

/external/llvm/lib/Target/MSP430/
DMSP430MCInstLower.cpp30 GetGlobalAddressSymbol(const MachineOperand &MO) const { in GetGlobalAddressSymbol()
31 switch (MO.getTargetFlags()) { in GetGlobalAddressSymbol()
36 return Printer.Mang->getSymbol(MO.getGlobal()); in GetGlobalAddressSymbol()
40 GetExternalSymbolSymbol(const MachineOperand &MO) const { in GetExternalSymbolSymbol()
41 switch (MO.getTargetFlags()) { in GetExternalSymbolSymbol()
46 return Printer.GetExternalSymbolSymbol(MO.getSymbolName()); in GetExternalSymbolSymbol()
50 GetJumpTableSymbol(const MachineOperand &MO) const { in GetJumpTableSymbol()
54 << MO.getIndex(); in GetJumpTableSymbol()
56 switch (MO.getTargetFlags()) { in GetJumpTableSymbol()
66 GetConstantPoolIndexSymbol(const MachineOperand &MO) const { in GetConstantPoolIndexSymbol()
[all …]
/external/llvm/lib/Target/MBlaze/
DMBlazeMCInstLower.cpp33 GetGlobalAddressSymbol(const MachineOperand &MO) const { in GetGlobalAddressSymbol()
34 switch (MO.getTargetFlags()) { in GetGlobalAddressSymbol()
39 return Printer.Mang->getSymbol(MO.getGlobal()); in GetGlobalAddressSymbol()
43 GetExternalSymbolSymbol(const MachineOperand &MO) const { in GetExternalSymbolSymbol()
44 switch (MO.getTargetFlags()) { in GetExternalSymbolSymbol()
49 return Printer.GetExternalSymbolSymbol(MO.getSymbolName()); in GetExternalSymbolSymbol()
53 GetJumpTableSymbol(const MachineOperand &MO) const { in GetJumpTableSymbol()
57 << MO.getIndex(); in GetJumpTableSymbol()
58 switch (MO.getTargetFlags()) { in GetJumpTableSymbol()
68 GetConstantPoolIndexSymbol(const MachineOperand &MO) const { in GetConstantPoolIndexSymbol()
[all …]
/external/llvm/lib/Target/PowerPC/
DPPCCodeEmitter.cpp56 MachineRelocation GetRelocation(const MachineOperand &MO,
61 const MachineOperand &MO) const;
141 const MachineOperand &MO = MI.getOperand(OpNo); in get_crbitm_encoding() local
144 (MO.getReg() >= PPC::CR0 && MO.getReg() <= PPC::CR7)); in get_crbitm_encoding()
145 return 0x80 >> getPPCRegisterNumbering(MO.getReg()); in get_crbitm_encoding()
148 MachineRelocation PPCCodeEmitter::GetRelocation(const MachineOperand &MO, in GetRelocation() argument
161 if (MO.isGlobal()) in GetRelocation()
163 const_cast<GlobalValue *>(MO.getGlobal()), in GetRelocation()
164 Cst, isa<Function>(MO.getGlobal())); in GetRelocation()
165 if (MO.isSymbol()) in GetRelocation()
[all …]
DPPCMCInstLower.cpp32 static MCSymbol *GetSymbolFromOperand(const MachineOperand &MO, AsmPrinter &AP){ in GetSymbolFromOperand() argument
36 if (!MO.isGlobal()) { in GetSymbolFromOperand()
37 assert(MO.isSymbol() && "Isn't a symbol reference"); in GetSymbolFromOperand()
39 Name += MO.getSymbolName(); in GetSymbolFromOperand()
41 const GlobalValue *GV = MO.getGlobal(); in GetSymbolFromOperand()
43 if (MO.getTargetFlags() == PPCII::MO_DARWIN_STUB || in GetSymbolFromOperand()
44 (MO.getTargetFlags() & PPCII::MO_NLP_FLAG)) in GetSymbolFromOperand()
52 if (MO.getTargetFlags() == PPCII::MO_DARWIN_STUB) { in GetSymbolFromOperand()
60 if (MO.isGlobal()) { in GetSymbolFromOperand()
63 StubValueTy(AP.Mang->getSymbol(MO.getGlobal()), in GetSymbolFromOperand()
[all …]
/external/llvm/lib/Target/ARM/
DARMMCInstLower.cpp26 MCOperand ARMAsmPrinter::GetSymbolRef(const MachineOperand &MO, in GetSymbolRef() argument
29 switch (MO.getTargetFlags()) { in GetSymbolRef()
33 switch (MO.getTargetFlags()) { in GetSymbolRef()
57 if (!MO.isJTI() && MO.getOffset()) in GetSymbolRef()
59 MCConstantExpr::Create(MO.getOffset(), in GetSymbolRef()
66 bool ARMAsmPrinter::lowerOperand(const MachineOperand &MO, in lowerOperand() argument
68 switch (MO.getType()) { in lowerOperand()
72 if (MO.isImplicit() && MO.getReg() != ARM::CPSR) in lowerOperand()
74 assert(!MO.getSubReg() && "Subregs should be eliminated!"); in lowerOperand()
75 MCOp = MCOperand::CreateReg(MO.getReg()); in lowerOperand()
[all …]
/external/llvm/lib/Target/PowerPC/MCTargetDesc/
DPPCMCCodeEmitter.cpp73 unsigned getMachineOpValue(const MCInst &MI,const MCOperand &MO,
116 const MCOperand &MO = MI.getOperand(OpNo); in getDirectBrEncoding() local
117 if (MO.isReg() || MO.isImm()) return getMachineOpValue(MI, MO, Fixups); in getDirectBrEncoding()
120 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), in getDirectBrEncoding()
138 const MCOperand &MO = MI.getOperand(OpNo); in getCondBrEncoding() local
139 if (MO.isReg() || MO.isImm()) return getMachineOpValue(MI, MO, Fixups); in getCondBrEncoding()
142 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), in getCondBrEncoding()
149 const MCOperand &MO = MI.getOperand(OpNo); in getHA16Encoding() local
150 if (MO.isReg() || MO.isImm()) return getMachineOpValue(MI, MO, Fixups); in getHA16Encoding()
153 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), in getHA16Encoding()
[all …]
/external/llvm/lib/Target/AArch64/
DAArch64MCInstLower.cpp31 AArch64AsmPrinter::lowerSymbolOperand(const MachineOperand &MO, in lowerSymbolOperand() argument
37 switch (MO.getTargetFlags()) { in lowerSymbolOperand()
78 if (!MO.isJTI() && MO.getOffset()) in lowerSymbolOperand()
80 MCConstantExpr::Create(MO.getOffset(), in lowerSymbolOperand()
87 bool AArch64AsmPrinter::lowerOperand(const MachineOperand &MO, in lowerOperand() argument
89 switch (MO.getType()) { in lowerOperand()
92 if (MO.isImplicit()) in lowerOperand()
94 assert(!MO.getSubReg() && "Subregs should be eliminated!"); in lowerOperand()
95 MCOp = MCOperand::CreateReg(MO.getReg()); in lowerOperand()
98 MCOp = MCOperand::CreateImm(MO.getImm()); in lowerOperand()
[all …]
DAArch64AsmPrinter.cpp43 static bool printModifiedFPRAsmOperand(const MachineOperand &MO, in printModifiedFPRAsmOperand() argument
47 if (!MO.isReg()) in printModifiedFPRAsmOperand()
50 for (MCRegAliasIterator AR(MO.getReg(), TRI, true); AR.isValid(); ++AR) { in printModifiedFPRAsmOperand()
61 static bool printModifiedGPRAsmOperand(const MachineOperand &MO, in printModifiedGPRAsmOperand() argument
67 if (MO.isImm() && MO.getImm() == 0) { in printModifiedGPRAsmOperand()
70 } else if (MO.isReg()) { in printModifiedGPRAsmOperand()
71 if (MO.getReg() == AArch64::XSP || MO.getReg() == AArch64::WSP) { in printModifiedGPRAsmOperand()
76 for (MCRegAliasIterator AR(MO.getReg(), TRI, true); AR.isValid(); ++AR) { in printModifiedGPRAsmOperand()
87 bool AArch64AsmPrinter::printSymbolicAddress(const MachineOperand &MO, in printSymbolicAddress() argument
92 switch (MO.getType()) { in printSymbolicAddress()
[all …]
/external/llvm/lib/Target/Hexagon/
DHexagonMCInstLower.cpp27 static MCOperand GetSymbolRef(const MachineOperand& MO, const MCSymbol* Symbol, in GetSymbolRef() argument
34 if (!MO.isJTI() && MO.getOffset()) in GetSymbolRef()
35 ME = MCBinaryExpr::CreateAdd(ME, MCConstantExpr::Create(MO.getOffset(), MC), in GetSymbolRef()
48 const MachineOperand &MO = MI->getOperand(i); in HexagonLowerToMC() local
51 switch (MO.getType()) { in HexagonLowerToMC()
57 if (MO.isImplicit()) continue; in HexagonLowerToMC()
58 MCO = MCOperand::CreateReg(MO.getReg()); in HexagonLowerToMC()
61 APFloat Val = MO.getFPImm()->getValueAPF(); in HexagonLowerToMC()
68 MCO = MCOperand::CreateImm(MO.getImm()); in HexagonLowerToMC()
72 (MCSymbolRefExpr::Create(MO.getMBB()->getSymbol(), in HexagonLowerToMC()
[all …]
DHexagonAsmPrinter.cpp77 const MachineOperand &MO = MI->getOperand(OpNo); in printOperand() local
79 switch (MO.getType()) { in printOperand()
82 O << HexagonInstPrinter::getRegisterName(MO.getReg()); in printOperand()
85 O << MO.getImm(); in printOperand()
88 O << *MO.getMBB()->getSymbol(); in printOperand()
91 O << *GetJTISymbol(MO.getIndex()); in printOperand()
95 O << *GetCPISymbol(MO.getIndex()); in printOperand()
98 O << *GetExternalSymbolSymbol(MO.getSymbolName()); in printOperand()
102 O << *Mang->getSymbol(MO.getGlobal()); in printOperand()
103 printOffset(MO.getOffset(), O); in printOperand()
[all …]
/external/llvm/lib/CodeGen/
DMachineInstr.cpp213 hash_code llvm::hash_value(const MachineOperand &MO) { in hash_value() argument
214 switch (MO.getType()) { in hash_value()
217 return hash_combine(MO.getType(), MO.getReg(), MO.getSubReg(), MO.isDef()); in hash_value()
219 return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getImm()); in hash_value()
221 return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getCImm()); in hash_value()
223 return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getFPImm()); in hash_value()
225 return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getMBB()); in hash_value()
227 return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getIndex()); in hash_value()
230 return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getIndex(), in hash_value()
231 MO.getOffset()); in hash_value()
[all …]
DMachineInstrBundle.cpp53 MachineOperand &MO = MII->getOperand(i); in runOnMachineFunction() local
54 if (MO.isReg() && MO.isInternalRead()) in runOnMachineFunction()
55 MO.setIsInternalRead(false); in runOnMachineFunction()
125 MachineOperand &MO = FirstMI->getOperand(i); in finalizeBundle() local
126 if (!MO.isReg()) in finalizeBundle()
128 if (MO.isDef()) { in finalizeBundle()
129 Defs.push_back(&MO); in finalizeBundle()
133 unsigned Reg = MO.getReg(); in finalizeBundle()
138 MO.setIsInternalRead(); in finalizeBundle()
139 if (MO.isKill()) in finalizeBundle()
[all …]
DRegAllocFast.cpp219 bool RAFast::isLastUseOfLocalReg(MachineOperand &MO) { in isLastUseOfLocalReg() argument
222 if (StackSlotForVirtReg[MO.getReg()] != -1) in isLastUseOfLocalReg()
226 MachineRegisterInfo::reg_nodbg_iterator I = MRI->reg_nodbg_begin(MO.getReg()); in isLastUseOfLocalReg()
227 if (&I.getOperand() != &MO) in isLastUseOfLocalReg()
235 MachineOperand &MO = LR.LastUse->getOperand(LR.LastOpNum); in addKillFlag() local
236 if (MO.isUse() && !LR.LastUse->isRegTiedToDefOperand(LR.LastOpNum)) { in addKillFlag()
237 if (MO.getReg() == LR.PhysReg) in addKillFlag()
238 MO.setIsKill(); in addKillFlag()
347 void RAFast::usePhysReg(MachineOperand &MO) { in usePhysReg() argument
348 unsigned PhysReg = MO.getReg(); in usePhysReg()
[all …]
DRegisterScavenging.cpp142 const MachineOperand &MO = MI->getOperand(i); in forward() local
143 if (MO.isRegMask()) in forward()
144 (isPred ? DefRegs : KillRegs).setBitsNotInMask(MO.getRegMask()); in forward()
145 if (!MO.isReg()) in forward()
147 unsigned Reg = MO.getReg(); in forward()
151 if (MO.isUse()) { in forward()
153 if (MO.isUndef()) in forward()
155 if (!isPred && MO.isKill()) in forward()
158 assert(MO.isDef()); in forward()
159 if (!isPred && MO.isDead()) in forward()
[all …]
DDeadMachineInstructionElim.cpp67 const MachineOperand &MO = MI->getOperand(i); in isDead() local
68 if (MO.isReg() && MO.isDef()) { in isDead()
69 unsigned Reg = MO.getReg(); in isDead()
124 const MachineOperand &MO = MI->getOperand(i); in runOnMachineFunction() local
125 if (!MO.isReg() || !MO.isDef()) in runOnMachineFunction()
127 unsigned Reg = MO.getReg(); in runOnMachineFunction()
153 const MachineOperand &MO = MI->getOperand(i); in runOnMachineFunction() local
154 if (MO.isReg() && MO.isDef()) { in runOnMachineFunction()
155 unsigned Reg = MO.getReg(); in runOnMachineFunction()
164 } else if (MO.isRegMask()) { in runOnMachineFunction()
[all …]
DMachineLICM.cpp412 const MachineOperand &MO = MI->getOperand(i); in ProcessMI() local
413 if (MO.isFI()) { in ProcessMI()
415 int FI = MO.getIndex(); in ProcessMI()
426 if (MO.isRegMask()) { in ProcessMI()
427 PhysRegClobbers.setBitsNotInMask(MO.getRegMask()); in ProcessMI()
431 if (!MO.isReg()) in ProcessMI()
433 unsigned Reg = MO.getReg(); in ProcessMI()
439 if (!MO.isDef()) { in ProcessMI()
447 if (MO.isImplicit()) { in ProcessMI()
450 if (!MO.isDead()) in ProcessMI()
[all …]
DProcessImplicitDefs.cpp70 for (MIOperands MO(MI); MO.isValid(); ++MO) in canTurnIntoImplicitDef() local
71 if (MO->isReg() && MO->isUse() && MO->readsReg()) in canTurnIntoImplicitDef()
86 MachineOperand &MO = UI.getOperand(); in processImplicitDef() local
87 MO.setIsUndef(); in processImplicitDef()
88 MachineInstr *UserMI = MO.getParent(); in processImplicitDef()
105 for (MIOperands MO(UserMI); MO.isValid(); ++MO) { in processImplicitDef() local
106 if (!MO->isReg()) in processImplicitDef()
108 unsigned UserReg = MO->getReg(); in processImplicitDef()
114 if (MO->isUse()) in processImplicitDef()
115 MO->setIsUndef(); in processImplicitDef()
/external/llvm/lib/Target/XCore/
DXCoreMCInstLower.cpp35 MCOperand XCoreMCInstLower::LowerSymbolOperand(const MachineOperand &MO, in LowerSymbolOperand() argument
43 Symbol = MO.getMBB()->getSymbol(); in LowerSymbolOperand()
46 Symbol = Mang->getSymbol(MO.getGlobal()); in LowerSymbolOperand()
47 Offset += MO.getOffset(); in LowerSymbolOperand()
50 Symbol = Printer.GetBlockAddressSymbol(MO.getBlockAddress()); in LowerSymbolOperand()
51 Offset += MO.getOffset(); in LowerSymbolOperand()
54 Symbol = Printer.GetExternalSymbolSymbol(MO.getSymbolName()); in LowerSymbolOperand()
55 Offset += MO.getOffset(); in LowerSymbolOperand()
58 Symbol = Printer.GetJTISymbol(MO.getIndex()); in LowerSymbolOperand()
61 Symbol = Printer.GetCPISymbol(MO.getIndex()); in LowerSymbolOperand()
[all …]
/external/llvm/lib/Target/Mips/
DMipsCodeEmitter.cpp103 const MachineOperand &MO) const;
106 const MachineOperand &MO) const;
158 const MachineOperand &MO) const { in getRelocation()
174 MachineOperand MO = MI.getOperand(OpNo); in getJumpTargetOpValue() local
175 if (MO.isGlobal()) in getJumpTargetOpValue()
176 emitGlobalAddress(MO.getGlobal(), getRelocation(MI, MO), true); in getJumpTargetOpValue()
177 else if (MO.isSymbol()) in getJumpTargetOpValue()
178 emitExternalSymbolAddress(MO.getSymbolName(), getRelocation(MI, MO)); in getJumpTargetOpValue()
179 else if (MO.isMBB()) in getJumpTargetOpValue()
180 emitMachineBasicBlock(MO.getMBB(), getRelocation(MI, MO)); in getJumpTargetOpValue()
[all …]
DMipsAsmPrinter.cpp54 bool MipsAsmPrinter::lowerOperand(const MachineOperand &MO, MCOperand &MCOp) { in lowerOperand() argument
55 MCOp = MCInstLowering.LowerOperand(MO); in lowerOperand()
329 const MachineOperand &MO = MI->getOperand(OpNum); in PrintAsmOperand() local
335 if ((MO.getType()) != MachineOperand::MO_Immediate) in PrintAsmOperand()
337 O << "0x" << StringRef(utohexstr(MO.getImm())).lower(); in PrintAsmOperand()
340 if ((MO.getType()) != MachineOperand::MO_Immediate) in PrintAsmOperand()
342 O << "0x" << StringRef(utohexstr(MO.getImm() & 0xffff)).lower(); in PrintAsmOperand()
345 if ((MO.getType()) != MachineOperand::MO_Immediate) in PrintAsmOperand()
347 O << MO.getImm(); in PrintAsmOperand()
350 if ((MO.getType()) != MachineOperand::MO_Immediate) in PrintAsmOperand()
[all …]
DMipsMCInstLower.cpp36 MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO, in LowerSymbolOperand() argument
42 switch(MO.getTargetFlags()) { in LowerSymbolOperand()
73 Symbol = MO.getMBB()->getSymbol(); in LowerSymbolOperand()
77 Symbol = Mang->getSymbol(MO.getGlobal()); in LowerSymbolOperand()
78 Offset += MO.getOffset(); in LowerSymbolOperand()
82 Symbol = AsmPrinter.GetBlockAddressSymbol(MO.getBlockAddress()); in LowerSymbolOperand()
83 Offset += MO.getOffset(); in LowerSymbolOperand()
87 Symbol = AsmPrinter.GetExternalSymbolSymbol(MO.getSymbolName()); in LowerSymbolOperand()
88 Offset += MO.getOffset(); in LowerSymbolOperand()
92 Symbol = AsmPrinter.GetJTISymbol(MO.getIndex()); in LowerSymbolOperand()
[all …]
/external/llvm/lib/Target/AArch64/MCTargetDesc/
DAArch64MCCodeEmitter.cpp77 unsigned getAddressWithFixup(const MCOperand &MO,
89 unsigned getMachineOpValue(const MCInst &MI,const MCOperand &MO,
121 unsigned AArch64MCCodeEmitter::getAddressWithFixup(const MCOperand &MO, in getAddressWithFixup() argument
124 if (!MO.isExpr()) { in getAddressWithFixup()
128 assert(MO.isImm() && "Unexpected address requested"); in getAddressWithFixup()
129 return MO.getImm(); in getAddressWithFixup()
132 const MCExpr *Expr = MO.getExpr(); in getAddressWithFixup()
220 const MCOperand &MO = MI.getOperand(OpIdx); in getAddSubImmOpValue() local
221 if (MO.isImm()) in getAddSubImmOpValue()
222 return static_cast<unsigned>(MO.getImm()); in getAddSubImmOpValue()
[all …]
/external/llvm/lib/Target/X86/
DX86AsmPrinter.cpp77 void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO, in printSymbolOperand() argument
79 switch (MO.getType()) { in printSymbolOperand()
82 O << *GetJTISymbol(MO.getIndex()); in printSymbolOperand()
85 O << *GetCPISymbol(MO.getIndex()); in printSymbolOperand()
86 printOffset(MO.getOffset(), O); in printSymbolOperand()
89 const GlobalValue *GV = MO.getGlobal(); in printSymbolOperand()
92 if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB) in printSymbolOperand()
94 else if (MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY || in printSymbolOperand()
95 MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE || in printSymbolOperand()
96 MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE) in printSymbolOperand()
[all …]
/external/llvm/lib/Target/ARM/MCTargetDesc/
DARMMCCodeEmitter.cpp74 unsigned getMachineOpValue(const MCInst &MI,const MCOperand &MO,
406 getMachineOpValue(const MCInst &MI, const MCOperand &MO, in getMachineOpValue() argument
408 if (MO.isReg()) { in getMachineOpValue()
409 unsigned Reg = MO.getReg(); in getMachineOpValue()
422 } else if (MO.isImm()) { in getMachineOpValue()
423 return static_cast<unsigned>(MO.getImm()); in getMachineOpValue()
424 } else if (MO.isFPImm()) { in getMachineOpValue()
425 return static_cast<unsigned>(APFloat(MO.getFPImm()) in getMachineOpValue()
436 const MCOperand &MO = MI.getOperand(OpIdx); in EncodeAddrModeOpValues() local
439 Reg = CTX.getRegisterInfo().getEncodingValue(MO.getReg()); in EncodeAddrModeOpValues()
[all …]
/external/llvm/lib/Target/R600/MCTargetDesc/
DSIMCCodeEmitter.cpp49 uint32_t getLitEncoding(const MCOperand &MO) const;
63 virtual uint64_t getMachineOpValue(const MCInst &MI, const MCOperand &MO,
86 uint32_t SIMCCodeEmitter::getLitEncoding(const MCOperand &MO) const { in getLitEncoding()
89 if (MO.isImm()) in getLitEncoding()
90 Imm.I = MO.getImm(); in getLitEncoding()
91 else if (MO.isFPImm()) in getLitEncoding()
92 Imm.F = MO.getFPImm(); in getLitEncoding()
172 const MCOperand &MO, in getMachineOpValue() argument
174 if (MO.isReg()) in getMachineOpValue()
175 return MRI.getEncodingValue(MO.getReg()); in getMachineOpValue()
[all …]

1234567891011