Lines Matching refs:AM
151 bool expandAddress(SystemZAddressingMode &AM, bool IsBase) const;
154 bool selectAddress(SDValue N, SystemZAddressingMode &AM) const;
157 void getAddressOperands(const SystemZAddressingMode &AM, EVT VT,
159 void getAddressOperands(const SystemZAddressingMode &AM, EVT VT,
407 static void changeComponent(SystemZAddressingMode &AM, bool IsBase, in changeComponent() argument
410 AM.Base = Value; in changeComponent()
412 AM.Index = Value; in changeComponent()
418 static bool expandAdjDynAlloc(SystemZAddressingMode &AM, bool IsBase, in expandAdjDynAlloc() argument
420 if (AM.isDynAlloc() && !AM.IncludesDynAlloc) { in expandAdjDynAlloc()
421 changeComponent(AM, IsBase, Value); in expandAdjDynAlloc()
422 AM.IncludesDynAlloc = true; in expandAdjDynAlloc()
430 static bool expandIndex(SystemZAddressingMode &AM, SDValue Base, in expandIndex() argument
432 if (AM.hasIndexField() && !AM.Index.getNode()) { in expandIndex()
433 AM.Base = Base; in expandIndex()
434 AM.Index = Index; in expandIndex()
442 static bool expandDisp(SystemZAddressingMode &AM, bool IsBase, in expandDisp() argument
445 int64_t TestDisp = AM.Disp + Op1; in expandDisp()
446 if (selectDisp(AM.DR, TestDisp)) { in expandDisp()
447 changeComponent(AM, IsBase, Op0); in expandDisp()
448 AM.Disp = TestDisp; in expandDisp()
457 bool SystemZDAGToDAGISel::expandAddress(SystemZAddressingMode &AM, in expandAddress() argument
459 SDValue N = IsBase ? AM.Base : AM.Index; in expandAddress()
473 return expandAdjDynAlloc(AM, IsBase, Op1); in expandAddress()
475 return expandAdjDynAlloc(AM, IsBase, Op0); in expandAddress()
478 return expandDisp(AM, IsBase, Op1, in expandAddress()
481 return expandDisp(AM, IsBase, Op0, in expandAddress()
484 if (IsBase && expandIndex(AM, Op0, Op1)) in expandAddress()
493 return expandDisp(AM, IsBase, Base, Offset); in expandAddress()
573 SystemZAddressingMode &AM) const { in selectAddress()
576 AM.Base = Addr; in selectAddress()
580 expandDisp(AM, true, SDValue(), in selectAddress()
585 expandAdjDynAlloc(AM, true, SDValue())) in selectAddress()
589 while (expandAddress(AM, true) || in selectAddress()
590 (AM.Index.getNode() && expandAddress(AM, false))) in selectAddress()
594 if (AM.Form == SystemZAddressingMode::FormBDXLA && in selectAddress()
595 !shouldUseLA(AM.Base.getNode(), AM.Disp, AM.Index.getNode())) in selectAddress()
599 if (!isValidDisp(AM.DR, AM.Disp)) in selectAddress()
603 if (AM.isDynAlloc() && !AM.IncludesDynAlloc) in selectAddress()
606 LLVM_DEBUG(AM.dump(CurDAG)); in selectAddress()
629 void SystemZDAGToDAGISel::getAddressOperands(const SystemZAddressingMode &AM, in getAddressOperands() argument
632 Base = AM.Base; in getAddressOperands()
651 Disp = CurDAG->getTargetConstant(AM.Disp, SDLoc(Base), VT); in getAddressOperands()
654 void SystemZDAGToDAGISel::getAddressOperands(const SystemZAddressingMode &AM, in getAddressOperands() argument
658 getAddressOperands(AM, VT, Base, Disp); in getAddressOperands()
660 Index = AM.Index; in getAddressOperands()
669 SystemZAddressingMode AM(SystemZAddressingMode::FormBD, DR); in selectBDAddr() local
670 if (!selectAddress(Addr, AM)) in selectBDAddr()
673 getAddressOperands(AM, Addr.getValueType(), Base, Disp); in selectBDAddr()
680 SystemZAddressingMode AM(SystemZAddressingMode::FormBDXNormal, DR); in selectMVIAddr() local
681 if (!selectAddress(Addr, AM) || AM.Index.getNode()) in selectMVIAddr()
684 getAddressOperands(AM, Addr.getValueType(), Base, Disp); in selectMVIAddr()
692 SystemZAddressingMode AM(Form, DR); in selectBDXAddr() local
693 if (!selectAddress(Addr, AM)) in selectBDXAddr()
696 getAddressOperands(AM, Addr.getValueType(), Base, Disp, Index); in selectBDXAddr()