qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [4721] CRIS: Add (untested) cpu-state save/load.


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [4721] CRIS: Add (untested) cpu-state save/load.
Date: Wed, 4 Mar 2009 02:56:23 +0100
User-agent: Mutt/1.5.16 (2007-06-09)

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 <address@hidden>
> 
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]