From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F1uoE-0006gc-6d for qemu-devel@nongnu.org; Wed, 25 Jan 2006 19:16:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F1uoB-0006df-3g for qemu-devel@nongnu.org; Wed, 25 Jan 2006 19:16:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1uoA-0006dE-P4 for qemu-devel@nongnu.org; Wed, 25 Jan 2006 19:16:14 -0500 Received: from [128.114.48.10] (helo=services.cse.ucsc.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F1ule-0001nr-1A for qemu-devel@nongnu.org; Wed, 25 Jan 2006 19:13:38 -0500 Received: from [128.114.59.92] (nether.cse.ucsc.edu [128.114.59.92]) (authenticated bits=0) by services.cse.ucsc.edu (8.13.1/8.13.1) with ESMTP id k0Q0DJLX018398 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 25 Jan 2006 16:13:20 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v623) Content-Transfer-Encoding: 7bit Message-Id: <9dac3d29183b812695b856f90d657b19@soe.ucsc.edu> Content-Type: text/plain; charset=US-ASCII; format=flowed From: Jose Renau Date: Wed, 25 Jan 2006 16:13:17 -0800 Subject: [Qemu-devel] sun4u patch 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 The following patch is to make sparc64-softmmu compilable (tested on OS X). Index: target-sparc/op.c =================================================================== --- target-sparc/op.c (revision 71) +++ target-sparc/op.c (working copy) @@ -851,6 +851,7 @@ void OPPROTO op_wrtick(void) { + do_op_not_supported("op_wrtick"); // XXX write cycle counter and bit 31 } @@ -1428,6 +1429,17 @@ { do_fitod(); } +#ifdef TARGET_SPARC64 +void OPPROTO op_fxtos(void) +{ + do_fxtos(); +} + +void OPPROTO op_fxtod(void) +{ + do_fxtod(); +} +#endif #else void OPPROTO op_fitos(void) { @@ -1545,8 +1557,8 @@ void OPPROTO op_sir(void) { - // XXX - + do_op_not_supported("op_sir"); + // XXX } void OPPROTO op_ld_asi_reg() Index: target-sparc/exec.h =================================================================== --- target-sparc/exec.h (revision 71) +++ target-sparc/exec.h (working copy) @@ -73,6 +73,7 @@ void do_ldd_user(target_ulong addr); void do_ldd_raw(target_ulong addr); void do_interrupt(int intno); +void do_op_not_supported(const char *str); void raise_exception(int tt); void memcpy32(target_ulong *dst, const target_ulong *src); target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev); Index: target-sparc/op_helper.c =================================================================== --- target-sparc/op_helper.c (revision 71) +++ target-sparc/op_helper.c (working copy) @@ -3,6 +3,11 @@ //#define DEBUG_PCALL //#define DEBUG_MMU +void do_op_not_supported(const char *str) +{ + fprintf(logfile, "%s not supported\n", str); +} + void raise_exception(int tt) { env->exception_index = tt; @@ -19,6 +24,16 @@ { DT0 = (double) *((int32_t *)&FT1); } + +void do_fxtos(void) +{ + FT0 = (float) *((int32_t *)&FT1); +} + +void do_fxtod(void) +{ + DT0 = (double) *((int32_t *)&FT1); +} #endif void do_fabss(void) Index: target-sparc/translate.c =================================================================== --- target-sparc/translate.c (revision 71) +++ target-sparc/translate.c (working copy) @@ -1361,7 +1361,8 @@ } else if (xop == 0x2b) { /* rdtbr / V9 flushw */ #ifdef TARGET_SPARC64 - gen_op_flushw(1); + // gen_op_flushw(1); + gen_op_flushw(); #else if (!supervisor(dc)) goto priv_insn;