diff -r d19a5903d749 softmmu_header.h --- a/softmmu_header.h Tue Mar 27 13:23:10 2007 -0500 +++ b/softmmu_header.h Tue Mar 27 13:23:21 2007 -0500 @@ -240,9 +240,13 @@ static inline void glue(glue(st, SUFFIX) "2:\n" : : "r" (ptr), +#ifdef USE_REGISTER_VARIABLES /* NOTE: 'q' would be needed as constraint, but we could not use it with T1 ! */ "r" (v), +#else + "q" (v), +#endif "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS), "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)), diff -r d19a5903d749 target-i386/cpu.h --- a/target-i386/cpu.h Tue Mar 27 13:23:10 2007 -0500 +++ b/target-i386/cpu.h Tue Mar 27 13:23:21 2007 -0500 @@ -26,6 +26,10 @@ #define TARGET_LONG_BITS 64 #else #define TARGET_LONG_BITS 32 +#endif + +#if TARGET_LONG_BITS <= HOST_LONG_BITS && __GNUC__ < 4 +#define USE_REGISTER_VARIABLES #endif /* target supports implicit self modifying code */ @@ -424,7 +428,7 @@ typedef union { #endif typedef struct CPUX86State { -#if TARGET_LONG_BITS > HOST_LONG_BITS +#ifndef USE_REGISTER_VARIABLES /* temporaries if we cannot store them in host registers */ target_ulong t0, t1, t2; #endif diff -r d19a5903d749 target-i386/exec.h --- a/target-i386/exec.h Tue Mar 27 13:23:10 2007 -0500 +++ b/target-i386/exec.h Tue Mar 27 13:23:21 2007 -0500 @@ -27,12 +27,16 @@ #define TARGET_LONG_BITS 32 #endif +#if TARGET_LONG_BITS <= HOST_LONG_BITS && __GNUC__ < 4 +#define USE_REGISTER_VARIABLES +#endif + #include "cpu-defs.h" /* at least 4 register variables are defined */ register struct CPUX86State *env asm(AREG0); -#if TARGET_LONG_BITS > HOST_LONG_BITS +#ifndef USE_REGISTER_VARIABLES /* no registers can be used */ #define T0 (env->t0) @@ -88,7 +92,7 @@ register target_ulong EDI asm(AREG11); #define reg_EDI #endif -#endif /* ! (TARGET_LONG_BITS > HOST_LONG_BITS) */ +#endif /* ! USE_REGISTER_VARIABLES */ #define A0 T2