Patchwork arm cpu state loading fix

login
register
mail settings
Submitter Dmitry Koshelev
Date Oct. 17, 2011, 10:53 a.m.
Message ID <CAKUHwZpm+WW2vdM1WjHV+rmYe8mbsP8Ydtnub7UxxxzfMD9m8A@mail.gmail.com>
Download mbox | patch
Permalink /patch/120157/
State New
Headers show

Comments

Dmitry Koshelev - Oct. 17, 2011, 10:53 a.m.
Floating registers loading fix.

Signed-off-by: Dmitry Koshelev <karaghiozis@gmail.com>
---
 target-arm/machine.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Peter Maydell - Oct. 17, 2011, 11:19 a.m.
On 17 October 2011 11:53, Dmitry Koshelev <karaghiozis@gmail.com> wrote:
> Floating registers loading fix.
>
> Signed-off-by: Dmitry Koshelev <karaghiozis@gmail.com>
> ---
>  target-arm/machine.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/target-arm/machine.c b/target-arm/machine.c
> index 3925d3a..73d82c9 100644
> --- a/target-arm/machine.c
> +++ b/target-arm/machine.c
> @@ -175,7 +175,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
>         env->vfp.vec_stride = qemu_get_be32(f);
>
>         if (arm_feature(env, ARM_FEATURE_VFP3)) {
> -            for (i = 0;  i < 16; i++) {
> +            for (i = 16;  i < 32; i++) {
>                 CPU_DoubleU u;
>                 u.l.upper = qemu_get_be32(f);
>                 u.l.lower = qemu_get_be32(f);

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM
Juan Quintela - Oct. 17, 2011, 11:50 a.m.
Dmitry Koshelev <karaghiozis@gmail.com> wrote:
> Floating registers loading fix.
>
> Signed-off-by: Dmitry Koshelev <karaghiozis@gmail.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

/me really wonders if arm migration has ever worked :-(
Peter Maydell - Oct. 17, 2011, 11:57 a.m.
On 17 October 2011 12:50, Juan Quintela <quintela@redhat.com> wrote:
> Dmitry Koshelev <karaghiozis@gmail.com> wrote:
>> Floating registers loading fix.
>>
>> Signed-off-by: Dmitry Koshelev <karaghiozis@gmail.com>
>
> Reviewed-by: Juan Quintela <quintela@redhat.com>
>
> /me really wonders if arm migration has ever worked :-(

I've used save/restore successfully on versatilepb models
before, but only for debug, not for serious work (which
would be why I didn't hit this bug -- the test case I was
working on was probably integer only code); and in order
to get that to work I had to fix a lot of devices. There
are still some ARM devboard device models which are missing
save/restore support.

-- PMM

Patch

diff --git a/target-arm/machine.c b/target-arm/machine.c
index 3925d3a..73d82c9 100644
--- a/target-arm/machine.c
+++ b/target-arm/machine.c
@@ -175,7 +175,7 @@  int cpu_load(QEMUFile *f, void *opaque, int version_id)
         env->vfp.vec_stride = qemu_get_be32(f);

         if (arm_feature(env, ARM_FEATURE_VFP3)) {
-            for (i = 0;  i < 16; i++) {
+            for (i = 16;  i < 32; i++) {
                 CPU_DoubleU u;
                 u.l.upper = qemu_get_be32(f);
                 u.l.lower = qemu_get_be32(f);