qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v9 09/10] target-avr: updating translate.c to us


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v9 09/10] target-avr: updating translate.c to use instructions translation
Date: Tue, 5 Jul 2016 22:02:17 +0100

On 1 July 2016 at 15:47, Michael Rolnik <address@hidden> wrote:
> Signed-off-by: Michael Rolnik <address@hidden>
> ---
>  target-avr/Makefile.objs |   4 +-
>  target-avr/translate.c   | 142 
> ++++++++++++++++++++---------------------------
>  2 files changed, 64 insertions(+), 82 deletions(-)


>
>  void restore_state_to_opc(CPUAVRState *env, TranslationBlock *tb,
> -                                target_ulong *data)
> +                            target_ulong *data)
>  {
>      env->pc_w = data[0];
>  }
>
>  void avr_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
> -                                int flags)
> +                            int flags)
>  {
>      AVRCPU *cpu = AVR_CPU(cs);
>      CPUAVRState *env = &cpu->env;
> +    int i;
>
>      cpu_fprintf(f, "\n");
>      cpu_fprintf(f, "PC:    %06x\n", env->pc_w);
> @@ -272,7 +252,7 @@ void avr_cpu_dump_state(CPUState *cs, FILE *f, 
> fprintf_function cpu_fprintf,
>                          env->sregC ? 'I' : '-');
>
>      cpu_fprintf(f, "\n");
> -    for (int i = 0; i < ARRAY_SIZE(env->r); i++) {
> +    for (i = 0; i < ARRAY_SIZE(env->r); i++) {
>          cpu_fprintf(f, "R[%02d]:  %02x   ", i, env->r[i]);
>
>          if ((i % 8) == 7) {
> @@ -281,7 +261,7 @@ void avr_cpu_dump_state(CPUState *cs, FILE *f, 
> fprintf_function cpu_fprintf,
>      }
>
>      cpu_fprintf(f, "\n");
> -    for (int i = 0; i < ARRAY_SIZE(env->io); i++) {
> +    for (i = 0; i < ARRAY_SIZE(env->io); i++) {
>          cpu_fprintf(f, "IO[%02d]: %02x   ", i, env->io[i]);
>
>          if ((i % 8) == 7) {

Later patches in the series shouldn't be randomly changing
stuff like this. Get it right in the first patch, please.

thanks
-- PMM



reply via email to

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