Lines Matching defs:MO

55   unsigned getMachineOpValue(const MCInst &MI, const MCOperand &MO,
216 AArch64MCCodeEmitter::getMachineOpValue(const MCInst &MI, const MCOperand &MO,
219 if (MO.isReg())
220 return Ctx.getRegisterInfo()->getEncodingValue(MO.getReg());
222 assert(MO.isImm() && "did not expect relocated expression");
223 return static_cast<unsigned>(MO.getImm());
230 const MCOperand &MO = MI.getOperand(OpIdx);
233 if (MO.isImm())
234 ImmVal = static_cast<uint32_t>(MO.getImm());
236 assert(MO.isExpr() && "unable to encode load/store imm operand");
238 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), Kind, MI.getLoc()));
251 const MCOperand &MO = MI.getOperand(OpIdx);
254 if (MO.isImm())
255 return MO.getImm();
256 assert(MO.isExpr() && "Unexpected target type!");
257 const MCExpr *Expr = MO.getExpr();
278 const MCOperand &MO = MI.getOperand(OpIdx);
285 if (MO.isImm())
286 return MO.getImm() | (ShiftVal == 0 ? 0 : (1 << 12));
287 assert(MO.isExpr() && "Unable to encode MCOperand!");
288 const MCExpr *Expr = MO.getExpr();
304 const MCOperand &MO = MI.getOperand(OpIdx);
307 if (MO.isImm())
308 return MO.getImm();
309 assert(MO.isExpr() && "Unexpected target type!");
312 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), Kind, MI.getLoc()));
326 const MCOperand &MO = MI.getOperand(OpIdx);
329 if (MO.isImm())
330 return MO.getImm();
331 assert(MO.isExpr() && "Unexpected target type!");
334 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), Kind, MI.getLoc()));
355 const MCOperand &MO = MI.getOperand(OpIdx);
357 if (MO.isImm())
358 return MO.getImm();
359 assert(MO.isExpr() && "Unexpected movz/movk immediate");
362 0, MO.getExpr(), MCFixupKind(AArch64::fixup_aarch64_movw), MI.getLoc()));
374 const MCOperand &MO = MI.getOperand(OpIdx);
377 if (MO.isImm())
378 return MO.getImm();
379 assert(MO.isExpr() && "Unexpected ADR target type!");
382 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), Kind, MI.getLoc()));
396 const MCOperand &MO = MI.getOperand(OpIdx);
399 if (MO.isImm())
400 return MO.getImm();
401 assert(MO.isExpr() && "Unexpected ADR target type!");
406 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), Kind, MI.getLoc()));
424 const MCOperand &MO = MI.getOperand(OpIdx);
425 assert(MO.isImm() && "Expected an immediate value for the shift amount!");
427 switch (MO.getImm()) {
448 const MCOperand &MO = MI.getOperand(OpIdx);
449 assert(MO.isImm() && "Expected an immediate value for the shift amount!");
450 return 64 - (MO.getImm());
456 const MCOperand &MO = MI.getOperand(OpIdx);
457 assert(MO.isImm() && "Expected an immediate value for the shift amount!");
458 return 64 - (MO.getImm() | 32);
465 const MCOperand &MO = MI.getOperand(OpIdx);
466 assert(MO.isImm() && "Expected an immediate value for the shift amount!");
467 return 32 - (MO.getImm() | 16);
474 const MCOperand &MO = MI.getOperand(OpIdx);
475 assert(MO.isImm() && "Expected an immediate value for the shift amount!");
476 return 16 - (MO.getImm() | 8);
484 const MCOperand &MO = MI.getOperand(OpIdx);
485 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
486 return 64 - MO.getImm();
493 const MCOperand &MO = MI.getOperand(OpIdx);
494 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
495 return 64 - MO.getImm();
502 const MCOperand &MO = MI.getOperand(OpIdx);
503 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
504 return 32 - MO.getImm();
511 const MCOperand &MO = MI.getOperand(OpIdx);
512 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
513 return 16 - MO.getImm();
520 const MCOperand &MO = MI.getOperand(OpIdx);
521 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
522 return 8 - MO.getImm();
529 const MCOperand &MO = MI.getOperand(OpIdx);
530 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
531 return MO.getImm() - 64;
538 const MCOperand &MO = MI.getOperand(OpIdx);
539 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
540 return MO.getImm() - 32;
547 const MCOperand &MO = MI.getOperand(OpIdx);
548 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
549 return MO.getImm() - 16;
556 const MCOperand &MO = MI.getOperand(OpIdx);
557 assert(MO.isImm() && "Expected an immediate value for the scale amount!");
558 return MO.getImm() - 8;
566 const MCOperand &MO = MI.getOperand(OpIdx);
567 assert(MO.isImm() &&
569 unsigned ShiftVal = AArch64_AM::getShiftValue(MO.getImm());