PATCH: arm, mips and sparc targets on Host Solaris/sparc
Quoted 19 lines · ---- Thiemo Seufer
Quoted 9 lines · Ben Taylor
This patch is to fix (correctly) running mips, sparc and arm targets on a Solaris/Sparc host.
This patch reverts the patch posted February 2nd, 2007, (found at
http://lists.gnu.org/archive/html/qemu-devel/2007-02/msg00008.html
for reference). Juergen Keil found thatconfig.hwas not included intarget-arm/exec.handconfig.hwas included *after*dyngen-exec.hintarget-sparc/exec.h.[snip]
target-sparc/exec.h line 4
Quoted 6 lines
diff -ruN
qemu-ORIG/target-sparc/exec.hqemu/target-sparc/exec.htarget-sparc/exec.h +0
-0@@ -3,11 +3,7 @@#include "dyngen-exec.h" #include "config.h" ^^^^^^^^
Quoted 1 line
You missed a bit...
<sigh> Thanks for the catch.
Here's the updated patch....
Ben
target-arm/exec.h +1 -7
@@ -17,19 +17,13 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" #include "dyngen-exec.h" -#if defined(__sparc__) -struct CPUARMState *env; -uint32_t T0 ; -uint32_t T1 ; -uint32_t T2 ; -#else register struct CPUARMState *env asm(AREG0); register uint32_t T0 asm(AREG1); register uint32_t T1 asm(AREG2); register uint32_t T2 asm(AREG3); -#endif /* TODO: Put these in FP regs on targets that have such things. */ /* It is ok for FT0s and FT0d to overlap. Likewise FT1s and FT1d. */
target-mips/exec.h +0 -10
@@ -7,11 +7,7 @@#include "mips-defs.h" #include "dyngen-exec.h" -#if defined(__sparc__) -struct CPUMIPSState *env; -#else register struct CPUMIPSState *env asm(AREG0); -#endif #if defined (USE_64BITS_REGS )typedef int64_t host_int_t ;
@@ -21,11 +17,6 @@typedef uint32_t host_uint_t ;#endif -#if defined(__sparc__) -host_uint_t T0 ; -host_uint_t T1 ; -host_uint_t T2 ; -#else #if TARGET_LONG_BITS >HOST_LONG_BITS #define T0 (env->t0)#define T1 (env->t1)
@@ -35,7 +26,6 @@ register host_uint_t T1 asm(AREG2); register host_uint_t T2 asm(AREG3);#endif -#endif #if defined (USE_HOST_FLOAT_REGS )#error "implement me."
target-sparc/exec.h +1 -18
@@ -1,13 +1,9 @@#ifndef EXEC_SPARC_H #define EXEC_SPARC_H 1 -#include "dyngen-exec.h" #include "config.h" +#include "dyngen-exec.h" -#if defined(__sparc__) -struct CPUSPARCState *env; -#else register struct CPUSPARCState *env asm(AREG0); -#endif #ifdef TARGET_SPARC64 #define T0 (env->t0)
@@ -15,13 +11,8 @@#define T2 (env->t2)#define REGWPTR env->regwptr#else -#if defined(__sparc__) -register uint32_t T0 asm(AREG3); -register uint32_t T1 asm(AREG2); -#else register uint32_t T0 asm(AREG1); register uint32_t T1 asm(AREG2); -#endif #undef REG_REGWPTR // Broken#ifdef REG_REGWPTR
@@ -33,11 +24,7 @@#define reg_REGWPTR#ifdef AREG4 -#if defined(__sparc__) -register uint32_t T2 asm(AREG0); -#else register uint32_t T2 asm(AREG4); -#endif #define reg_T2#else #define T2 (env->t2)
@@ -45,14 +32,10 @@#else #define REGWPTR env->regwptr -#if defined(__sparc__) -register uint32_t T2 asm(AREG0); -#else register uint32_t T2 asm(AREG3);#endif #define reg_T2#endif -#endif #define FT0 (env->ft0)#define FT1 (env->ft1)