Commit 9ddff3d2c44ceeba8dcbb5294183404ce73448c2

Authored by blueswir1
1 parent 679dee3c

Make i386-softmmu boot on Sparc host

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6971 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 10 additions and 0 deletions
cpu-exec.c
... ... @@ -253,6 +253,11 @@ int cpu_exec(CPUState *env1)
253 253 /* prepare setjmp context for exception handling */
254 254 for(;;) {
255 255 if (setjmp(env->jmp_env) == 0) {
  256 +#if defined(__sparc__) && !defined(HOST_SOLARIS)
  257 +#undef env
  258 + env = cpu_single_env;
  259 +#define env cpu_single_env
  260 +#endif
256 261 env->current_tb = NULL;
257 262 /* if an exception is pending, we execute it here */
258 263 if (env->exception_index >= 0) {
... ... @@ -390,6 +395,11 @@ int cpu_exec(CPUState *env1)
390 395 env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ);
391 396 intno = cpu_get_pic_interrupt(env);
392 397 qemu_log_mask(CPU_LOG_TB_IN_ASM, "Servicing hardware INT=0x%02x\n", intno);
  398 +#if defined(__sparc__) && !defined(HOST_SOLARIS)
  399 +#undef env
  400 + env = cpu_single_env;
  401 +#define env cpu_single_env
  402 +#endif
393 403 do_interrupt(intno, 0, 0, 0, 1);
394 404 /* ensure that no TB jump will be modified as
395 405 the program flow was changed */
... ...