On 1 July 2016 at 15:47, Michael Rolnik <[email protected]> wrote:
> Signed-off-by: Michael Rolnik <[email protected]>
> ---
> 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