Home | History | Annotate | Download | only in SystemZ

Lines Matching refs:AM

146   // Try to fold more of the base or index of AM into AM, where IsBase
148 bool expandAddress(SystemZAddressingMode &AM, bool IsBase) const;
150 // Try to describe N in AM, returning true on success.
151 bool selectAddress(SDValue N, SystemZAddressingMode &AM) const;
153 // Extract individual target operands from matched address AM.
154 void getAddressOperands(const SystemZAddressingMode &AM, EVT VT,
156 void getAddressOperands(const SystemZAddressingMode &AM, EVT VT,
361 // Change the base or index in AM to Value, where IsBase selects
363 static void changeComponent(SystemZAddressingMode &AM, bool IsBase,
366 AM.Base = Value;
368 AM.Index = Value;
371 // The base or index of AM is equivalent to Value + ADJDYNALLOC,
373 // ADJDYNALLOC into AM.
374 static bool expandAdjDynAlloc(SystemZAddressingMode &AM, bool IsBase,
376 if (AM.isDynAlloc() && !AM.IncludesDynAlloc) {
377 changeComponent(AM, IsBase, Value);
378 AM.IncludesDynAlloc = true;
384 // The base of AM is equivalent to Base + Index. Try to use Index as
386 static bool expandIndex(SystemZAddressingMode &AM, SDValue Base,
388 if (AM.hasIndexField() && !AM.Index.getNode()) {
389 AM.Base = Base;
390 AM.Index = Index;
396 // The base or index of AM is equivalent to Op0 + Op1, where IsBase selects
397 // between the base and index. Try to fold Op1 into AM's displacement.
398 static bool expandDisp(SystemZAddressingMode &AM, bool IsBase,
401 int64_t TestDisp = AM.Disp + Op1;
402 if (selectDisp(AM.DR, TestDisp)) {
403 changeComponent(AM, IsBase, Op0);
404 AM.Disp = TestDisp;
413 bool SystemZDAGToDAGISel::expandAddress(SystemZAddressingMode &AM,
415 SDValue N = IsBase ? AM.Base : AM.Index;
429 return expandAdjDynAlloc(AM, IsBase, Op1);
431 return expandAdjDynAlloc(AM, IsBase, Op0);
434 return expandDisp(AM, IsBase, Op1,
437 return expandDisp(AM, IsBase, Op0,
440 if (IsBase && expandIndex(AM, Op0, Op1))
449 return expandDisp(AM, IsBase, Base, Offset);
527 // Return true if Addr is suitable for AM, updating AM if so.
529 SystemZAddressingMode &AM) const {
532 AM.Base = Addr;
536 expandDisp(AM, true, SDValue(),
541 while (expandAddress(AM, true) ||
542 (AM.Index.getNode() && expandAddress(AM, false)))
546 if (AM.Form == SystemZAddressingMode::FormBDXLA &&
547 !shouldUseLA(AM.Base.getNode(), AM.Disp, AM.Index.getNode()))
551 if (!isValidDisp(AM.DR, AM.Disp))
555 if (AM.isDynAlloc() && !AM.IncludesDynAlloc)
558 DEBUG(AM.dump());
575 void SystemZDAGToDAGISel::getAddressOperands(const SystemZAddressingMode &AM,
578 Base = AM.Base;
597 Disp = CurDAG->getTargetConstant(AM.Disp, VT);
600 void SystemZDAGToDAGISel::getAddressOperands(const SystemZAddressingMode &AM,
604 getAddressOperands(AM, VT, Base, Disp);
606 Index = AM.Index;
615 SystemZAddressingMode AM(SystemZAddressingMode::FormBD, DR);
616 if (!selectAddress(Addr, AM))
619 getAddressOperands(AM, Addr.getValueType(), Base, Disp);
626 SystemZAddressingMode AM(SystemZAddressingMode::FormBDXNormal, DR);
627 if (!selectAddress(Addr, AM) || AM.Index.getNode())
630 getAddressOperands(AM, Addr.getValueType(), Base, Disp);
638 SystemZAddressingMode AM(Form, DR);
639 if (!selectAddress(Addr, AM))
642 getAddressOperands(AM, Addr.getValueType(), Base, Disp, Index);