qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Stefan Weil <weil@mail.berlios.de>
Cc: edgar.iglesias@gmail.com, Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [4721] CRIS: Add (untested) cpu-state save/load.
Date: Wed, 4 Mar 2009 02:56:23 +0100	[thread overview]
Message-ID: <20090304015623.GA8482@laped> (raw)
In-Reply-To: <49AD6D68.8090006@mail.berlios.de>

On Tue, Mar 03, 2009 at 06:48:24PM +0100, Stefan Weil wrote:
> 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.

Thanks, applied.

Cheers

> 
> Regards
> 
> Stefan Weil
> 
> 
> PS. Antony, maybe such bugs might be a good reason to use
>     the -Wmissing-noreturn option!
> 
> 
> 

> Fix several endless loops.
> 
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> 
> 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);

      reply	other threads:[~2009-03-03 18:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-09 23:44 [Qemu-devel] [4721] CRIS: Add (untested) cpu-state save/load Edgar E. Iglesias
2009-03-03 17:48 ` Stefan Weil
2009-03-04  1:56   ` Edgar E. Iglesias [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090304015623.GA8482@laped \
    --to=edgar.iglesias@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=weil@mail.berlios.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).