<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-02 17:13 GMT+02:00 Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Hi Nicolas,<div><br></div><div> I remember now. Of course, the big change is in holding state internally to LargeIntegers in native platform word order. That's a big change. But merging the VM all the time is a pain. Why don't we do something like this:</div>
<div><br></div><div>1. add a VM define, e.g. NativeOrderedLargeIntegers that can be set via a VM generation option. This define will end up in interp.h.</div><div><br></div><div>2. split the LargeIntegersPlugin (like the ThreadedFFIPlugin is split) into the old one and the native one, with LargeIntegers.c simply pulling in one or the other depending on the define.</div>
<div><br></div><div>3. in positive32BitIntegerFor et al use</div><div><br></div><div> self cppIf: NativeOrderedLargeIntegers</div><div> ifTrue: [...your code...]</div><div> ifFalse: [...the existing code...]</div>
<div><br></div><div>4. adopt your image header flags code, and make the image munging code convert integers as required</div><div><br></div><div>Then you don't have to merge and when we want to make the change we can simply set the variable in the generation configurations.</div>
<div><br></div><div>Meanwhile I see I /do/ have to fix the existing plugin :-(</div></div><div class="gmail_extra"><br></div></blockquote><div><br></div><div>That sounds right for the future.<br><br></div><div>I'm pretty sure there is currently a problem at least in large int div.<br>
</div><div>Most of the 32bit version is using unsigned arithmetic, so it is much more robust.<br></div><div>I may help updating the 8bits version using the exact same tricks, but it's only possible during late evenings or early nights, I'm fully booked.<br>
<br></div><div>Nicolas<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 30, 2014 at 4:45 PM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-01 0:40 GMT+02:00 Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi Nicolas,<div><br><div class="gmail_extra"><div class="gmail_quote"><div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<div class="gmail_extra">Hi Eliot,<br></div><div class="gmail_extra">look how I did it in the 32bits LargInt variant:<br></div></div></blockquote><div><br></div><div>if the 32-bit large int version passes all the tests why hasn't it replaced the byte one?</div>
<div><br></div><br></div></div></div></div></blockquote><div><br></div><div>Yes, 32bits large int pass all tests.<br></div><div>I use such modified VM exclusively.<br></div><div>All the code is maintained at <a href="http://smalltalkhub.com/#!/~nice/NiceVMExperiments" target="_blank">http://smalltalkhub.com/#!/~nice/NiceVMExperiments</a> for classical VM and Cog.<br>
</div><div>I have not tested anything on Spur yet, but do not expect major problem.<br><br></div><div>It works well as is, but I'd like some improvments:<br></div><div>- Prevent byte-wise copy to be used in BigEndian processor<br>
</div><div>- Provide accelerated primitives for byteAt: byteAt:put: operations (I don't remember how I implemented them currently, it's too long ago)<br></div></div></div></div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div>
<br></blockquote></div><br></div></div>