<br><br><div class="gmail_quote">On Wed, Apr 6, 2011 at 8:35 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Arushi,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I got this from C code compiled by llvm-gcc.<br>
<br>
There is a consistent prototype for the function<br>
<br>
TypHandle       Cyclotomic ( hdRes, n, m )<br>
     TypHandle           hdRes;<br>
     long                n,  m;<br>
<br>
the call looks as follows,<br>
  hdI = ProdCyc( hdI, Cyclotomic( HdResult, n, 1 ) );<br>
</blockquote>
<br></div>
I bet the call occurs before the function is defined.  In this case C treats<br>
the callee as being a varargs function (...) of the kind you see in your IR.<br></blockquote><div><br></div><div>Unfortunately that is't true either :(</div><div><br></div><div>Also, the calls which do not pass a constant int, do not get the cast on the function. </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Ciao, Duncan.<div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
which is basically<br>
<br>
Cyclotomic( HdResult, n, 1 );<br>
<br>
The problem is the fact that it interprets 1 as an int32 instead of an int64.<br>
And later converts it by assuming an unsigned to unsigned cast.<br>
<br>
Arushi<br>
</blockquote>
<br>
</div></div></blockquote></div><br>