Gopal V wrote:Direct hardware maps (like using CX for loop count etc) will need to be platform dependent ?. Or you could have a fixed reg that can be used for loop count (and gets mapped on hardware appropriately).
We currently don't have special registers, like %ecx for loops, they are not used in JIT either. My Pentium manual states, that these ops are not the fastest.
But in the long run, we should have some hints, that e.g. i386 needs %ecx as shift count, or that div uses %edx. But probably i386 is the only weird architecure with such ugly restrictions - and with far too few registers.
I'm OK with adding in documentation that encourages using particular registers for particular purposes, or having some sort of metadata for the JIT that notes loop registers or something. As long as it's out of band and optional, that's cool.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk