<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
Here is a patch to enhance the XCores handling of large frames.<br>
<br>
Q: is the handling of register scavenging correct below? e.g. the use of RS->setUsed() &  RegState::Kill<br>
      // We previously asserted SPAdj == 0.<br>
      unsigned ScratchOffset = RS->scavengeRegister(&XCore::GRRegsRegClass, II, 0);<br>
      RS->setUsed(ScratchOffset);<br>
      loadConstant(II, TII, ScratchOffset, Offset);<br>
      BuildMI(MBB, II, dl, TII.get(XCore::LDW_3r), Reg)<br>
              .addReg(FrameReg)<br>
              .addReg(ScratchOffset, RegState::Kill);<br>
<br>
Details:<br>
<br>
    eliminateFrameIndex() has been reworked to handle both small & large frames<br>
    with either a FP or SP.<br>
    An additional Slot is required for Scavenging spills when not using FP for large frames.<br>
    Reworked the handling of Register Scavenging.<br>
<br>
    Whether we are using an FP or not, whether it is a large frame or not,<br>
    and whether we are using a large code model or not are now independent.<br>
<br>
Robert<br>
<br>
</div>
</body>
</html>