From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I2ten-00053l-Pb for qemu-devel@nongnu.org; Mon, 25 Jun 2007 14:51:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I2tek-00051J-Gv for qemu-devel@nongnu.org; Mon, 25 Jun 2007 14:51:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2tek-00050x-8t for qemu-devel@nongnu.org; Mon, 25 Jun 2007 14:51:22 -0400 Received: from mx2.suse.de ([195.135.220.15]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I2tej-0004pZ-Ko for qemu-devel@nongnu.org; Mon, 25 Jun 2007 14:51:22 -0400 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 304032170F for ; Mon, 25 Jun 2007 20:51:18 +0200 (CEST) From: Andreas Schwab Date: Mon, 25 Jun 2007 20:51:16 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Fixes for ia64 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 This patch fixes some problems with qemu hosted on ia64: - remove unaligned accesses in ia64_apply_fixes - make sure that the static variables are not optimized away in GOTO_TB. Andreas. --- dyngen.h 8 May 2007 23:30:44 -0000 1.14 +++ dyngen.h 25 Jun 2007 18:15:39 -0000 @@ -392,7 +392,8 @@ static inline void ia64_apply_fixes (uin 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, /* nop 0; brl IP */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0 }; - uint8_t *gen_code_ptr =3D *gen_code_pp, *plt_start, *got_start, *vp; + uint8_t *gen_code_ptr =3D *gen_code_pp, *plt_start, *got_start; + uint64_t *vp; struct ia64_fixup *fixup; unsigned int offset =3D 0; struct fdesc { @@ -429,12 +430,12 @@ static inline void ia64_apply_fixes (uin /* First, create the GOT: */ for (fixup =3D ltoff_fixes; fixup; fixup =3D fixup->next) { /* first check if we already have this value in the GOT: */ - for (vp =3D got_start; vp < gen_code_ptr; ++vp) - if (*(uint64_t *) vp =3D=3D fixup->value) + for (vp =3D (uint64_t *) got_start; vp < (uint64_t *) gen_code_ptr; ++v= p) + if (*vp =3D=3D fixup->value) break; - if (vp =3D=3D gen_code_ptr) { + if (vp =3D=3D (uint64_t *) gen_code_ptr) { /* Nope, we need to put the value in the GOT: */ - *(uint64_t *) vp =3D fixup->value; + *vp =3D fixup->value; gen_code_ptr +=3D 8; } ia64_imm22(fixup->addr, (long) vp - gp); --- exec-all.h 26 Mai 2007 14:58:26 +0200 1.57 +++ exec-all.h 25 Jun 2007 20:04:14 +0200=09 @@ -346,8 +346,8 @@ do {\ cache flushing, but slower because of indirect jump) */ #define GOTO_TB(opname, tbparam, n)\ do {\ - static void __attribute__((unused)) *dummy ## n =3D &&dummy_label ##= n;\ - static void __attribute__((unused)) *__op_label ## n \ + static void __attribute__((used)) *dummy ## n =3D &&dummy_label ## n= ;\ + static void __attribute__((used)) *__op_label ## n \ __asm__(ASM_OP_LABEL_NAME(n, opname)) =3D &&label ## n;\ goto *(void *)(((TranslationBlock *)tbparam)->tb_next[n]);\ label ## n: ;\ --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different."