Lines Matching full:mo

61   unsigned getMachineOpValue(const MCInst &MI, const MCOperand &MO,
223 AArch64MCCodeEmitter::getMachineOpValue(const MCInst &MI, const MCOperand &MO, in getMachineOpValue() argument
226 if (MO.isReg()) in getMachineOpValue()
227 return Ctx.getRegisterInfo()->getEncodingValue(MO.getReg()); in getMachineOpValue()
229 assert(MO.isImm() && "did not expect relocated expression"); in getMachineOpValue()
230 return static_cast<unsigned>(MO.getImm()); in getMachineOpValue()
237 const MCOperand &MO = MI.getOperand(OpIdx); in getLdStUImm12OpValue() local
240 if (MO.isImm()) in getLdStUImm12OpValue()
241 ImmVal = static_cast<uint32_t>(MO.getImm()); in getLdStUImm12OpValue()
243 assert(MO.isExpr() && "unable to encode load/store imm operand"); in getLdStUImm12OpValue()
245 Fixups.push_back(MCFixup::create(0, MO.getExpr(), Kind, MI.getLoc())); in getLdStUImm12OpValue()
258 const MCOperand &MO = MI.getOperand(OpIdx); in getAdrLabelOpValue() local
261 if (MO.isImm()) in getAdrLabelOpValue()
262 return MO.getImm(); in getAdrLabelOpValue()
263 assert(MO.isExpr() && "Unexpected target type!"); in getAdrLabelOpValue()
264 const MCExpr *Expr = MO.getExpr(); in getAdrLabelOpValue()
285 const MCOperand &MO = MI.getOperand(OpIdx); in getAddSubImmOpValue() local
292 if (MO.isImm()) in getAddSubImmOpValue()
293 return MO.getImm() | (ShiftVal == 0 ? 0 : (1 << ShiftVal)); in getAddSubImmOpValue()
294 assert(MO.isExpr() && "Unable to encode MCOperand!"); in getAddSubImmOpValue()
295 const MCExpr *Expr = MO.getExpr(); in getAddSubImmOpValue()
320 const MCOperand &MO = MI.getOperand(OpIdx); in getCondBranchTargetOpValue() local
323 if (MO.isImm()) in getCondBranchTargetOpValue()
324 return MO.getImm(); in getCondBranchTargetOpValue()
325 assert(MO.isExpr() && "Unexpected target type!"); in getCondBranchTargetOpValue()
328 Fixups.push_back(MCFixup::create(0, MO.getExpr(), Kind, MI.getLoc())); in getCondBranchTargetOpValue()
342 const MCOperand &MO = MI.getOperand(OpIdx); in getPAuthPCRelOpValue() local
346 if (MO.isImm()) in getPAuthPCRelOpValue()
347 return -(MO.getImm()); in getPAuthPCRelOpValue()
348 assert(MO.isExpr() && "Unexpected target type!"); in getPAuthPCRelOpValue()
351 Fixups.push_back(MCFixup::create(0, MO.getExpr(), Kind, MI.getLoc())); in getPAuthPCRelOpValue()
365 const MCOperand &MO = MI.getOperand(OpIdx); in getLoadLiteralOpValue() local
368 if (MO.isImm()) in getLoadLiteralOpValue()
369 return MO.getImm(); in getLoadLiteralOpValue()
370 assert(MO.isExpr() && "Unexpected target type!"); in getLoadLiteralOpValue()
373 Fixups.push_back(MCFixup::create(0, MO.getExpr(), Kind, MI.getLoc())); in getLoadLiteralOpValue()
394 const MCOperand &MO = MI.getOperand(OpIdx); in getMoveWideImmOpValue() local
396 if (MO.isImm()) in getMoveWideImmOpValue()
397 return MO.getImm(); in getMoveWideImmOpValue()
398 assert(MO.isExpr() && "Unexpected movz/movk immediate"); in getMoveWideImmOpValue()
401 0, MO.getExpr(), MCFixupKind(AArch64::fixup_aarch64_movw), MI.getLoc())); in getMoveWideImmOpValue()
413 const MCOperand &MO = MI.getOperand(OpIdx); in getTestBranchTargetOpValue() local
416 if (MO.isImm()) in getTestBranchTargetOpValue()
417 return MO.getImm(); in getTestBranchTargetOpValue()
418 assert(MO.isExpr() && "Unexpected ADR target type!"); in getTestBranchTargetOpValue()
421 Fixups.push_back(MCFixup::create(0, MO.getExpr(), Kind, MI.getLoc())); in getTestBranchTargetOpValue()
435 const MCOperand &MO = MI.getOperand(OpIdx); in getBranchTargetOpValue() local
438 if (MO.isImm()) in getBranchTargetOpValue()
439 return MO.getImm(); in getBranchTargetOpValue()
440 assert(MO.isExpr() && "Unexpected ADR target type!"); in getBranchTargetOpValue()
445 Fixups.push_back(MCFixup::create(0, MO.getExpr(), Kind, MI.getLoc())); in getBranchTargetOpValue()
463 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShifterOpValue() local
464 assert(MO.isImm() && "Expected an immediate value for the shift amount!"); in getVecShifterOpValue()
466 switch (MO.getImm()) { in getVecShifterOpValue()
487 const MCOperand &MO = MI.getOperand(OpIdx); in getFixedPointScaleOpValue() local
488 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getFixedPointScaleOpValue()
489 return 64 - MO.getImm(); in getFixedPointScaleOpValue()
496 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShiftR64OpValue() local
497 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getVecShiftR64OpValue()
498 return 64 - MO.getImm(); in getVecShiftR64OpValue()
505 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShiftR32OpValue() local
506 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getVecShiftR32OpValue()
507 return 32 - MO.getImm(); in getVecShiftR32OpValue()
514 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShiftR16OpValue() local
515 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getVecShiftR16OpValue()
516 return 16 - MO.getImm(); in getVecShiftR16OpValue()
523 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShiftR8OpValue() local
524 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getVecShiftR8OpValue()
525 return 8 - MO.getImm(); in getVecShiftR8OpValue()
532 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShiftL64OpValue() local
533 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getVecShiftL64OpValue()
534 return MO.getImm() - 64; in getVecShiftL64OpValue()
541 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShiftL32OpValue() local
542 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getVecShiftL32OpValue()
543 return MO.getImm() - 32; in getVecShiftL32OpValue()
550 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShiftL16OpValue() local
551 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getVecShiftL16OpValue()
552 return MO.getImm() - 16; in getVecShiftL16OpValue()
559 const MCOperand &MO = MI.getOperand(OpIdx); in getVecShiftL8OpValue() local
560 assert(MO.isImm() && "Expected an immediate value for the scale amount!"); in getVecShiftL8OpValue()
561 return MO.getImm() - 8; in getVecShiftL8OpValue()
642 const MCOperand &MO = MI.getOperand(OpIdx); in getSVEIncDecImm() local
643 assert(MO.isImm() && "Expected an immediate value!"); in getSVEIncDecImm()
645 return MO.getImm() - 1; in getSVEIncDecImm()
653 const MCOperand &MO = MI.getOperand(OpIdx); in getMoveVecShifterOpValue() local
654 assert(MO.isImm() && in getMoveVecShifterOpValue()
656 unsigned ShiftVal = AArch64_AM::getShiftValue(MO.getImm()); in getMoveVecShifterOpValue()