All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: qemu-devel@nongnu.org, edgar.iglesias@gmail.com
Cc: Anthony Liguori <aliguori@us.ibm.com>
Subject: Re: [Qemu-devel] [4721] CRIS: Add (untested) cpu-state save/load.
Date: Tue, 03 Mar 2009 18:48:24 +0100	[thread overview]
Message-ID: <49AD6D68.8090006@mail.berlios.de> (raw)
In-Reply-To: <E1K5r2C-0006LN-86@cvs.savannah.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

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!




[-- Attachment #2: cris.patch --]
[-- Type: text/x-diff, Size: 1391 bytes --]

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 17:48 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 [this message]
2009-03-04  1:56   ` Edgar E. Iglesias

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=49AD6D68.8090006@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=aliguori@us.ibm.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.