MOV ESI, [memory location]
PXOR MM0, MM0
MOV CX, 512
begin:
MOVQ ESI:[0], MM0
ADD ESI, 8
LOOPNZ begin
EMMS
My asm is a little rusty, but I think that would do a page bzero
in a significantly less portion of time. Specifically because there
is another pipeline added for MMX instructions, and it can post up
to 4 writes now. Theoretically (I'm going out on a limb here) the
main core would be decrementing while the MMX zeroed the memory.
This is just a starting thought, I'm sure somone else out there is
much more capable of hacking this into something more efficient.
A caveat of MMX seems to be that you have to save and restore the
FP registers, because it aliases them. MMX looks quite interesting,
however that copy+checksum is eluding me at the moment (maybe I'm
just looking at the obvious). FWIW, the URL to the MMX programmer
stuff is:
http://developer.intel.com/drg/mmx/manuals/prm/prm.htm
--Perry
-- Perry Harrington Linux rules all OSes. APSoft () email: perry@apsoft.com Think Blue. /\- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu