qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/9] unicore32-softmmu: add generic cpu state sa


From: guanxuetao
Subject: Re: [Qemu-devel] [PATCH 6/9] unicore32-softmmu: add generic cpu state save/load functions
Date: Mon, 28 May 2012 17:45:26 +0800 (CST)
User-agent: SquirrelMail/1.4.8-4.0.1.el5

> Am 25.05.2012 13:29, schrieb Guan Xuetao:
>> This patch adds generic cpu state save/load functions for UniCore32 ISA.
>> All architecture related registers are saved or loaded, and no
>> optimization.
>>
>> Signed-off-by: Guan Xuetao <address@hidden>
>> ---
>>  target-unicore32/machine.c |   99
>> ++++++++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 99 insertions(+), 0 deletions(-)
>>  create mode 100644 target-unicore32/machine.c
>>
>> diff --git a/target-unicore32/machine.c b/target-unicore32/machine.c
>> new file mode 100644
>> index 0000000..e8c52cd
>> --- /dev/null
>> +++ b/target-unicore32/machine.c
>> @@ -0,0 +1,99 @@
>> +/*
>> + * Generic machine functions for UniCore32 ISA
>> + *
>> + * Copyright (C) 2010-2012 Guan Xuetao
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation, or any later version.
>> + * See the COPYING file in the top-level directory.
>> + */
>> +#include "hw/hw.h"
>> +
>> +void cpu_save(QEMUFile *f, void *opaque)
>> +{
>> +    int i;
>> +    CPUUniCore32State *env = (CPUUniCore32State *)opaque;
>> +
>> +    for (i = 0; i < 32; i++) {
>> +        qemu_put_be32(f, env->regs[i]);
>> +    }
>> +    qemu_put_be32(f, cpu_asr_read(env));
>> +    qemu_put_be32(f, env->bsr);
> [snip]
>
> Please use VMState instead.
>
> Andreas

Thanks, I will try it.

Guan Xuetao





reply via email to

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