From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeYjP-0004IB-K8 for qemu-devel@nongnu.org; Tue, 03 Mar 2009 12:48:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeYjN-0004Hq-Dp for qemu-devel@nongnu.org; Tue, 03 Mar 2009 12:48:39 -0500 Received: from [199.232.76.173] (port=41473 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeYjN-0004Hn-37 for qemu-devel@nongnu.org; Tue, 03 Mar 2009 12:48:37 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:50995) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LeYjL-00032y-Hk for qemu-devel@nongnu.org; Tue, 03 Mar 2009 12:48:37 -0500 Message-ID: <49AD6D68.8090006@mail.berlios.de> Date: Tue, 03 Mar 2009 18:48:24 +0100 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [4721] CRIS: Add (untested) cpu-state save/load. References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------010700080307030607010500" 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, edgar.iglesias@gmail.com Cc: Anthony Liguori This is a multi-part message in MIME format. --------------010700080307030607010500 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Edgar E. Iglesias schrieb: > Revision: 4721 > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4721 > Author: edgar_igl > Date: 2008-06-09 23:44:20 +0000 (Mon, 09 Jun 2008) > > Log Message: > ----------- > CRIS: Add (untested) cpu-state save/load. > > Modified Paths: > -------------- > trunk/hw/etraxfs.c > trunk/target-cris/machine.c It's indeed untested and even unused. Using compiler option -Wmissing-noreturn I detected several endless loops. The appended patch fixes them - please apply it to Qemu trunk. Regards Stefan Weil PS. Antony, maybe such bugs might be a good reason to use the -Wmissing-noreturn option! --------------010700080307030607010500 Content-Type: text/x-diff; name="cris.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cris.patch" Fix several endless loops. Signed-off-by: Stefan Weil Index: target-cris/machine.c =================================================================== --- target-cris/machine.c (Revision 6676) +++ target-cris/machine.c (Arbeitskopie) @@ -34,14 +34,14 @@ qemu_put_be32(f, env->cc_size); qemu_put_be32(f, env->cc_x); - for (s = 0; s < 4; i++) { + for (s = 0; s < 4; s++) { for (i = 0; i < 16; i++) qemu_put_be32(f, env->sregs[s][i]); } qemu_put_be32(f, env->mmu_rand_lfsr); for (mmu = 0; mmu < 2; mmu++) { - for (s = 0; s < 4; i++) { + for (s = 0; s < 4; s++) { for (i = 0; i < 16; i++) { qemu_put_be32(f, env->tlbsets[mmu][s][i].lo); qemu_put_be32(f, env->tlbsets[mmu][s][i].hi); @@ -77,14 +77,14 @@ env->cc_size = qemu_get_be32(f); env->cc_x = qemu_get_be32(f); - for (s = 0; s < 4; i++) { + for (s = 0; s < 4; s++) { for (i = 0; i < 16; i++) env->sregs[s][i] = qemu_get_be32(f); } env->mmu_rand_lfsr = qemu_get_be32(f); for (mmu = 0; mmu < 2; mmu++) { - for (s = 0; s < 4; i++) { + for (s = 0; s < 4; s++) { for (i = 0; i < 16; i++) { env->tlbsets[mmu][s][i].lo = qemu_get_be32(f); env->tlbsets[mmu][s][i].hi = qemu_get_be32(f); --------------010700080307030607010500--