> I solved that by placing one of the T[012] operands into memory > for HOST_I386, thereby freeing one reg. Here's some justification > of why that doesn't really cost performance: with three free regs > GCC is already spilling like mad in the snippets, we just trade one > of those memory accesses (to stack) with one other mem access to > the cpu_state structure, which will be in cache.
Do you have any evidence to support this claim? Last time I did this it caused a significant performance hit. I'd guess that most common ops are simple enough that we don't need more than 3 registers. > --- qemu-0.9.0.cvs.orig/softmmu_header.h > - : "%eax", "%ecx", "%edx", "memory", "cc"); > + : "%eax", "%edx", "memory", "cc"); This change is wrong. The inline asm calls C code which clobbers %ecx. Paul