On Wed, Aug 31, 2005 at 02:23:03PM +0300, Vahur Sinijärv wrote: > So, my question is: Should this requirement of using secondary memory to > move MMX registers between general regs be relaxed ?
No. > I do not see the point why you should discourage the register allocator > from using mmx registers, move through memory is clearly inefficent and > enlarges resulting code (if the function containing moves is inlined in > several places, even more so). First, what you think is "clearly inefficient" is at least two cycles faster, at least for AMD (Intel hasn't published anything as useful as instruction latencies since early PentiumPro). I'm not sure what sort of pipeline bypasses are or are not responsible, but *all* cross function unit moves are discouraged. Second, proper use of MMX requires proper placement of emms instructions. Allowing the register allocator to use MMX registers at will breaks that. r~