<br><br><div class="gmail_quote">On Wed, Jan 21, 2009 at 12:38 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:ncellier@ifrance.com">ncellier@ifrance.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">Eliot Miranda &lt;eliot.miranda &lt;at&gt; <a href="http://gmail.com" target="_blank">gmail.com</a>&gt; writes:<br>
<br>
&gt;<br>
&gt;<br>
&gt; Hi All,<br>
&gt;<br>
&gt; &nbsp;&nbsp; &nbsp;anyone know the x86/IA32 really well? &nbsp;If so, read on. &nbsp;Otherwise save<br>
yourself the yawn.<br>
&gt;<br>
&gt; I just tried to save an instruction in Cog;s generated bitShift: primitive.<br>
&nbsp;It seems to me that SARL (shift arithmetic right long) should set the sign flag<br>
based on the result, in fact it says as much in the manual; I quote from&nbsp;IA-32<br>
Intel&reg; Architecture&nbsp;Software Developer&#39;s&nbsp;Manual Volume 2B: &nbsp;Instruction Set<br>
Reference, N-Z p 4-192<br>
&gt;</div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d"><br>
<br>
</div>Hi Eliot,<br>
I guess you are adressing case of SmallInteger, otherwise I would understand<br>
optimize as using some MMX 64 or 128 bits arithmetic (like PSRLLQ).<br>
If relevant, check my trivial optimizations for large ints at<br>
<a href="http://bugs.squeak.org/view.php?id=7109" target="_blank">http://bugs.squeak.org/view.php?id=7109</a></blockquote><div><br></div><div><br></div><div>Hi Nicholas,</div><div><br></div><div>&nbsp;&nbsp; &nbsp;yes I&#39;m doing SmallInteger and also trying to keep the JIT very simple initially so no MMX registers or instructions in the stage one JIT until I do floating-point. &nbsp;I&#39;ll take a look at these. &nbsp;Thanks.</div>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
</blockquote><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><a href="http://bugs.squeak.org/view.php?id=7109" target="_blank"></a><br>
<font color="#888888"><br>
Nicolas<br>
<br>
<br>
</font></blockquote></div><br>