Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lq0VH-0000x7-IH for qemu-devel@nongnu.org; Sat, 04 Apr 2009 03:41:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lq0VG-0000wo-Bo for qemu-devel@nongnu.org; Sat, 04 Apr 2009 03:41:22 -0400 Received: from [199.232.76.173] (port=43478 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lq0VG-0000wl-8B for qemu-devel@nongnu.org; Sat, 04 Apr 2009 03:41:22 -0400 Received: from savannah.gnu.org ([199.232.41.3]:47222 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lq0VF-00016U-VK for qemu-devel@nongnu.org; Sat, 04 Apr 2009 03:41:22 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Lq0VF-0006vW-FU for qemu-devel@nongnu.org; Sat, 04 Apr 2009 07:41:21 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Lq0VF-0006vO-3x for qemu-devel@nongnu.org; Sat, 04 Apr 2009 07:41:21 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sat, 04 Apr 2009 07:41:21 +0000 Subject: [Qemu-devel] [6971] Make i386-softmmu boot on Sparc host Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6971 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6971 Author: blueswir1 Date: 2009-04-04 07:41:20 +0000 (Sat, 04 Apr 2009) Log Message: ----------- Make i386-softmmu boot on Sparc host Modified Paths: -------------- trunk/cpu-exec.c Modified: trunk/cpu-exec.c =================================================================== --- trunk/cpu-exec.c 2009-04-03 07:33:24 UTC (rev 6970) +++ trunk/cpu-exec.c 2009-04-04 07:41:20 UTC (rev 6971) @@ -253,6 +253,11 @@ /* prepare setjmp context for exception handling */ for(;;) { if (setjmp(env->jmp_env) == 0) { +#if defined(__sparc__) && !defined(HOST_SOLARIS) +#undef env + env = cpu_single_env; +#define env cpu_single_env +#endif env->current_tb = NULL; /* if an exception is pending, we execute it here */ if (env->exception_index >= 0) { @@ -390,6 +395,11 @@ env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ); intno = cpu_get_pic_interrupt(env); qemu_log_mask(CPU_LOG_TB_IN_ASM, "Servicing hardware INT=0x%02x\n", intno); +#if defined(__sparc__) && !defined(HOST_SOLARIS) +#undef env + env = cpu_single_env; +#define env cpu_single_env +#endif do_interrupt(intno, 0, 0, 0, 1); /* ensure that no TB jump will be modified as the program flow was changed */