From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FFOHt-000707-Op for qemu-devel@nongnu.org; Fri, 03 Mar 2006 23:22:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FFOHo-0006yC-5P for qemu-devel@nongnu.org; Fri, 03 Mar 2006 23:22:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FFEQQ-00059l-69 for qemu-devel@nongnu.org; Fri, 03 Mar 2006 12:50:46 -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 1FFE2O-0008Cb-Et for qemu-devel@nongnu.org; Fri, 03 Mar 2006 12:25:56 -0500 Received: from [172.16.1.35] (adsl-70-137-168-23.dsl.snfc21.sbcglobal.net [70.137.168.23]) (authenticated bits=0) by services.cse.ucsc.edu (8.13.1/8.13.1) with ESMTP id k23HO5om011278 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 3 Mar 2006 09:24:05 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v623) Message-Id: <2018a165b78b9d71816efac286cc36d6@soe.ucsc.edu> Content-Type: multipart/mixed; boundary=Apple-Mail-6--109312415 From: Jose Renau Date: Fri, 3 Mar 2006 09:24:04 -0800 Subject: [Qemu-devel] sparc32/sparc64 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 --Apple-Mail-6--109312415 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Without this patch I could not compile qemu for sparc64 on OS X (PPC). --Apple-Mail-6--109312415 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="qemu.patch" Content-Disposition: attachment; filename=qemu.patch Index: dyngen-exec.h =================================================================== RCS file: /sources/qemu/qemu/dyngen-exec.h,v retrieving revision 1.26 diff -b -B -d -U5 -r1.26 dyngen-exec.h --- dyngen-exec.h 24 Jul 2005 15:11:38 -0000 1.26 +++ dyngen-exec.h 3 Mar 2006 17:05:22 -0000 @@ -33,18 +33,20 @@ typedef unsigned long uint64_t; #else typedef unsigned long long uint64_t; #endif +#ifdef HOST_PPC typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; #if defined (__x86_64__) || defined(__ia64) typedef signed long int64_t; #else typedef signed long long int64_t; #endif +#endif #define INT8_MIN (-128) #define INT16_MIN (-32767-1) #define INT32_MIN (-2147483647-1) #define INT64_MIN (-(int64_t)(9223372036854775807)-1) Index: dyngen.c =================================================================== RCS file: /sources/qemu/qemu/dyngen.c,v retrieving revision 1.41 diff -b -B -d -U5 -r1.41 dyngen.c --- dyngen.c 4 Feb 2006 20:47:57 -0000 1.41 +++ dyngen.c 3 Mar 2006 17:05:26 -0000 @@ -1192,17 +1192,17 @@ if (strstart(sym_name, "__op_param", &p)) { snprintf(name, name_size, "param%s", p); } else if (strstart(sym_name, "__op_gen_label", &p)) { snprintf(name, name_size, "gen_labels[param%s]", p); } else { -#ifdef HOST_SPARC +//#ifdef HOST_SPARC if (sym_name[0] == '.') - snprintf(name, sizeof(name), + snprintf(name, name_size, "(long)(&__dot_%s)", sym_name + 1); else -#endif +//#endif snprintf(name, name_size, "(long)(&%s)", sym_name); } } #ifdef HOST_IA64 @@ -1588,18 +1588,18 @@ continue; if (*sym_name && !strstart(sym_name, "__op_param", NULL) && !strstart(sym_name, "__op_jmp", NULL) && !strstart(sym_name, "__op_gen_label", NULL)) { -#if defined(HOST_SPARC) +//#if defined(HOST_SPARC) if (sym_name[0] == '.') { fprintf(outfile, "extern char __dot_%s __asm__(\"%s\");\n", sym_name+1, sym_name); continue; } -#endif +//#endif #if defined(__APPLE__) /* set __attribute((unused)) on darwin because we wan't to avoid warning when we don't use the symbol */ fprintf(outfile, "extern char %s __attribute__((unused));\n", sym_name); #elif defined(HOST_IA64) if (ELF64_R_TYPE(rel->r_info) != R_IA64_PCREL21B) Index: target-sparc/op.c =================================================================== RCS file: /sources/qemu/qemu/target-sparc/op.c,v retrieving revision 1.18 diff -b -B -d -U5 -r1.18 op.c --- target-sparc/op.c 30 Oct 2005 17:28:50 -0000 1.18 +++ target-sparc/op.c 3 Mar 2006 17:05:31 -0000 @@ -849,11 +849,11 @@ T0 = 0; // XXX read cycle counter and bit 31 } void OPPROTO op_wrtick(void) { - // XXX write cycle counter and bit 31 + T0 = 0; // XXX write cycle counter and bit 31 } void OPPROTO op_rdtpc(void) { T0 = env->tpc[env->tl]; @@ -1436,10 +1436,11 @@ void OPPROTO op_fitod(void) { DT0 = (double) *((int32_t *)&FT1); } +#endif #ifdef TARGET_SPARC64 void OPPROTO op_fxtos(void) { FT0 = (float) *((int64_t *)&DT1); @@ -1448,11 +1449,10 @@ void OPPROTO op_fxtod(void) { DT0 = (double) *((int64_t *)&DT1); } #endif -#endif void OPPROTO op_fdtos(void) { FT0 = (float) DT1; } @@ -1543,12 +1543,11 @@ do_retry(); } void OPPROTO op_sir(void) { - // XXX - + T0 = 0; // XXX } void OPPROTO op_ld_asi_reg() { T0 += PARAM1; --Apple-Mail-6--109312415 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed --- Never take life seriously. Nobody gets out alive, anyway. - Bumper Sticker --Apple-Mail-6--109312415--