On 07/02/2010 08:37 AM, Paolo Bonzini wrote: > The second (more real) reason is inline assembly failures, for example > (32-bit x86): > > register int e asm("edi"); > > static inline int h() > { > int x; > asm volatile ("mov $0, %0" : "=D" (x)); > } > > int g() > { > int f = e; > h(); > return e - f; > } > > fails to compile because gcc cannot assign edi to %0 in h(). Some host > headers may use assembly in a way that breaks qemu. With only one > global register in use, however, it makes sense IMO to drop the custom > inclusion hacks and see if anyone screams.
A few months ago I developed a patch that would allow the global env variable to be accessed via %fs (plus a backing TLS variable), which means that no hardware register needs to be reserved for i386. I never quite got around to finishing it because I don't know how to set up a segment register in Windows, and it seemed like the kind of patch that could easily get quagmired. Is there any interest in a patch like this? Should I try to revive it? r~