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,
382 static void changeComponent(SystemZAddressingMode &AM, bool IsBase, in changeComponent() argument
385 AM.Base = Value; in changeComponent()
387 AM.Index = Value; in changeComponent()
393 static bool expandAdjDynAlloc(SystemZAddressingMode &AM, bool IsBase, in expandAdjDynAlloc() argument
395 if (AM.isDynAlloc() && !AM.IncludesDynAlloc) { in expandAdjDynAlloc()
396 changeComponent(AM, IsBase, Value); in expandAdjDynAlloc()
397 AM.IncludesDynAlloc = true; in expandAdjDynAlloc()
405 static bool expandIndex(SystemZAddressingMode &AM, SDValue Base, in expandIndex() argument
407 if (AM.hasIndexField() && !AM.Index.getNode()) { in expandIndex()
408 AM.Base = Base; in expandIndex()
409 AM.Index = Index; in expandIndex()
417 static bool expandDisp(SystemZAddressingMode &AM, bool IsBase, in expandDisp() argument
420 int64_t TestDisp = AM.Disp + Op1; in expandDisp()
421 if (selectDisp(AM.DR, TestDisp)) { in expandDisp()
422 changeComponent(AM, IsBase, Op0); in expandDisp()
423 AM.Disp = TestDisp; in expandDisp()
432 bool SystemZDAGToDAGISel::expandAddress(SystemZAddressingMode &AM, in expandAddress() argument
434 SDValue N = IsBase ? AM.Base : AM.Index; in expandAddress()
448 return expandAdjDynAlloc(AM, IsBase, Op1); in expandAddress()
450 return expandAdjDynAlloc(AM, IsBase, Op0); in expandAddress()
453 return expandDisp(AM, IsBase, Op1, in expandAddress()
456 return expandDisp(AM, IsBase, Op0, in expandAddress()
459 if (IsBase && expandIndex(AM, Op0, Op1)) in expandAddress()
468 return expandDisp(AM, IsBase, Base, Offset); in expandAddress()
548 SystemZAddressingMode &AM) const { in selectAddress()
551 AM.Base = Addr; in selectAddress()
555 expandDisp(AM, true, SDValue(), in selectAddress()
560 expandAdjDynAlloc(AM, true, SDValue())) in selectAddress()
564 while (expandAddress(AM, true) || in selectAddress()
565 (AM.Index.getNode() && expandAddress(AM, false))) in selectAddress()
569 if (AM.Form == SystemZAddressingMode::FormBDXLA && in selectAddress()
570 !shouldUseLA(AM.Base.getNode(), AM.Disp, AM.Index.getNode())) in selectAddress()
574 if (!isValidDisp(AM.DR, AM.Disp)) in selectAddress()
578 if (AM.isDynAlloc() && !AM.IncludesDynAlloc) in selectAddress()
581 DEBUG(AM.dump()); in selectAddress()
598 void SystemZDAGToDAGISel::getAddressOperands(const SystemZAddressingMode &AM, in getAddressOperands() argument
601 Base = AM.Base; in getAddressOperands()
620 Disp = CurDAG->getTargetConstant(AM.Disp, SDLoc(Base), VT); in getAddressOperands()
623 void SystemZDAGToDAGISel::getAddressOperands(const SystemZAddressingMode &AM, in getAddressOperands() argument
627 getAddressOperands(AM, VT, Base, Disp); in getAddressOperands()
629 Index = AM.Index; in getAddressOperands()
638 SystemZAddressingMode AM(SystemZAddressingMode::FormBD, DR); in selectBDAddr() local
639 if (!selectAddress(Addr, AM)) in selectBDAddr()
642 getAddressOperands(AM, Addr.getValueType(), Base, Disp); in selectBDAddr()
649 SystemZAddressingMode AM(SystemZAddressingMode::FormBDXNormal, DR); in selectMVIAddr() local
650 if (!selectAddress(Addr, AM) || AM.Index.getNode()) in selectMVIAddr()
653 getAddressOperands(AM, Addr.getValueType(), Base, Disp); in selectMVIAddr()
661 SystemZAddressingMode AM(Form, DR); in selectBDXAddr() local
662 if (!selectAddress(Addr, AM)) in selectBDXAddr()
665 getAddressOperands(AM, Addr.getValueType(), Base, Disp, Index); in selectBDXAddr()