On Wed, Jan 21, 2009 at 12:38 PM, Nicolas Cellier ncellier@ifrance.comwrote:
Eliot Miranda <eliot.miranda <at> gmail.com> writes:
Hi All,
anyone know the x86/IA32 really well? If so, read on. Otherwise
save yourself the yawn.
I just tried to save an instruction in Cog;s generated bitShift:
primitive. It seems to me that SARL (shift arithmetic right long) should set the sign flag based on the result, in fact it says as much in the manual; I quote from IA-32 Intel(R) Architecture Software Developer's Manual Volume 2B: Instruction Set Reference, N-Z p 4-192
Hi Eliot, I guess you are adressing case of SmallInteger, otherwise I would understand optimize as using some MMX 64 or 128 bits arithmetic (like PSRLLQ). If relevant, check my trivial optimizations for large ints at http://bugs.squeak.org/view.php?id=7109
Hi Nicholas,
yes I'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. I'll take a look at these. Thanks.
http://bugs.squeak.org/view.php?id=7109
Nicolas