<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 07/11/13 21:27, Robert Lytton wrote:<br>
    </div>
    <blockquote
cite="mid:E55040AE4CA5DE4A84D2754CE295AF30014BB9E9@EXMAILBOX1.vo.spidergroup.co.uk"
      type="cite">
      <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>
      <div style="direction: ltr;font-family: Tahoma;color:
        #000000;font-size: 10pt;">Hi,<br>
        <br>
        Here is a patch that allows the XCore target to handle large
        frames.<br>
        <br>
            Large frame offsets are loaded from the ConstantPool.<br>
            Where possible, offsets are encoded using the smaller MKMSK
        instruction.<br>
            Large frame offsets can only be used when there is a
        frame-pointer.<br>
        <br>
        At present, functions must be compiled using
        '-fno-omit-frame-pointer'.<br>
        A follow up patch will add heuristics to automatically
        -disable-fp-elim as necessary.<br>
        <br>
        Robert<br>
        <br>
      </div>
    </blockquote>
    <br>
    +  if (Value && !(Value & (Value+1))) {<br>
    +    // Value = 2^N - 1, where N != 0.<br>
    +    int N = 1;<br>
    +    while (Value >>= 1)<br>
    +      ++N;<br>
    <br>
    You can use the functions in MathExtras.h to simplify this:<br>
    if (isMask_32(Value)) {<br>
      int N = Log2_32(Value) + 1<br>
    <br>
    Looks good to me otherwise.<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Richard Osborne | XMOS
<a class="moz-txt-link-freetext" href="http://www.xmos.com">http://www.xmos.com</a>
</pre>
  </body>
</html>