void cpu_dump_state (CPUState *env, FILE *f, fprintf_function cpu_fprintf,

                     int flags)

{

#define RGPL  4

#define RFPL  4



    int i;



    cpu_fprintf(f, "NIP " TARGET_FMT_lx "   LR " TARGET_FMT_lx " CTR "

                TARGET_FMT_lx " XER " TARGET_FMT_lx "\n",

                env->nip, env->lr, env->ctr, env->xer);

    cpu_fprintf(f, "MSR " TARGET_FMT_lx " HID0 " TARGET_FMT_lx "  HF "

                TARGET_FMT_lx " idx %d\n", env->msr, env->spr[SPR_HID0],

                env->hflags, env->mmu_idx);

#if !defined(NO_TIMER_DUMP)

    cpu_fprintf(f, "TB %08" PRIu32 " %08" PRIu64

#if !defined(CONFIG_USER_ONLY)

                " DECR %08" PRIu32

#endif

                "\n",

                cpu_ppc_load_tbu(env), cpu_ppc_load_tbl(env)

#if !defined(CONFIG_USER_ONLY)

                , cpu_ppc_load_decr(env)

#endif

                );

#endif

    for (i = 0; i < 32; i++) {

        if ((i & (RGPL - 1)) == 0)

            cpu_fprintf(f, "GPR%02d", i);

        cpu_fprintf(f, " %016" PRIx64, ppc_dump_gpr(env, i));

        if ((i & (RGPL - 1)) == (RGPL - 1))

            cpu_fprintf(f, "\n");

    }

    cpu_fprintf(f, "CR ");

    for (i = 0; i < 8; i++)

        cpu_fprintf(f, "%01x", env->crf[i]);

    cpu_fprintf(f, "  [");

    for (i = 0; i < 8; i++) {

        char a = '-';

        if (env->crf[i] & 0x08)

            a = 'L';

        else if (env->crf[i] & 0x04)

            a = 'G';

        else if (env->crf[i] & 0x02)

            a = 'E';

        cpu_fprintf(f, " %c%c", a, env->crf[i] & 0x01 ? 'O' : ' ');

    }

    cpu_fprintf(f, " ]             RES " TARGET_FMT_lx "\n",

                env->reserve_addr);

    for (i = 0; i < 32; i++) {

        if ((i & (RFPL - 1)) == 0)

            cpu_fprintf(f, "FPR%02d", i);

        cpu_fprintf(f, " %016" PRIx64, *((uint64_t *)&env->fpr[i]));

        if ((i & (RFPL - 1)) == (RFPL - 1))

            cpu_fprintf(f, "\n");

    }

    cpu_fprintf(f, "FPSCR %08x\n", env->fpscr);

#if !defined(CONFIG_USER_ONLY)

    cpu_fprintf(f, "SRR0 " TARGET_FMT_lx " SRR1 " TARGET_FMT_lx " SDR1 "

                TARGET_FMT_lx "\n", env->spr[SPR_SRR0], env->spr[SPR_SRR1],

                env->sdr1);

#endif



#undef RGPL

#undef RFPL

}

void cpu_dump_state (CPUState *env, FILE *f, fprintf_function cpu_fprintf,

                     int flags)

{

#define RGPL  4

#define RFPL  4



    int i;



    cpu_fprintf(f, "NIP " TARGET_FMT_lx "   LR " TARGET_FMT_lx " CTR "

                TARGET_FMT_lx " XER " TARGET_FMT_lx "\n",

                env->nip, env->lr, env->ctr, env->xer);

    cpu_fprintf(f, "MSR " TARGET_FMT_lx " HID0 " TARGET_FMT_lx "  HF "

                TARGET_FMT_lx " idx %d\n", env->msr, env->spr[SPR_HID0],

                env->hflags, env->mmu_idx);

#if !defined(NO_TIMER_DUMP)

    cpu_fprintf(f, "TB %08" PRIu32 " %08" PRIu64

#if !defined(CONFIG_USER_ONLY)

                " DECR %08" PRIu32

#endif

                "\n",

                cpu_ppc_load_tbu(env), cpu_ppc_load_tbl(env)

#if !defined(CONFIG_USER_ONLY)

                , cpu_ppc_load_decr(env)

#endif

                );

#endif

    for (i = 0; i < 32; i++) {

        if ((i & (RGPL - 1)) == 0)

            cpu_fprintf(f, "GPR%02d", i);

        cpu_fprintf(f, " %016" PRIx64, ppc_dump_gpr(env, i));

        if ((i & (RGPL - 1)) == (RGPL - 1))

            cpu_fprintf(f, "\n");

    }

    cpu_fprintf(f, "CR ");

    for (i = 0; i < 8; i++)

        cpu_fprintf(f, "%01x", env->crf[i]);

    cpu_fprintf(f, "  [");

    for (i = 0; i < 8; i++) {

        char a = '-';

        if (env->crf[i] & 0x08)

            a = 'L';

        else if (env->crf[i] & 0x04)

            a = 'G';

        else if (env->crf[i] & 0x02)

            a = 'E';

        cpu_fprintf(f, " %c%c", a, env->crf[i] & 0x01 ? 'O' : ' ');

    }

    cpu_fprintf(f, " ]             RES " TARGET_FMT_lx "\n",

                env->reserve_addr);

    for (i = 0; i < 32; i++) {

        if ((i & (RFPL - 1)) == 0)

            cpu_fprintf(f, "FPR%02d", i);

        cpu_fprintf(f, " %016" PRIx64, *((uint64_t *)&env->fpr[i]));

        if ((i & (RFPL - 1)) == (RFPL - 1))

            cpu_fprintf(f, "\n");

    }

    cpu_fprintf(f, "FPSCR %08x\n", env->fpscr);

#if !defined(CONFIG_USER_ONLY)

    cpu_fprintf(f, "SRR0 " TARGET_FMT_lx " SRR1 " TARGET_FMT_lx " SDR1 "

                TARGET_FMT_lx "\n", env->spr[SPR_SRR0], env->spr[SPR_SRR1],

                env->sdr1);

#endif



#undef RGPL

#undef RFPL

}

void FUNC_0 (CPUState *VAR_0, FILE *VAR_1, fprintf_function VAR_2,

                     int VAR_3)

{

#define RGPL  4

#define RFPL  4



    int VAR_4;



    VAR_2(VAR_1, "NIP " TARGET_FMT_lx "   LR " TARGET_FMT_lx " CTR "

                TARGET_FMT_lx " XER " TARGET_FMT_lx "\n",

                VAR_0->nip, VAR_0->lr, VAR_0->ctr, VAR_0->xer);

    VAR_2(VAR_1, "MSR " TARGET_FMT_lx " HID0 " TARGET_FMT_lx "  HF "

                TARGET_FMT_lx " idx %d\n", VAR_0->msr, VAR_0->spr[SPR_HID0],

                VAR_0->hflags, VAR_0->mmu_idx);

#if !defined(NO_TIMER_DUMP)

    VAR_2(VAR_1, "TB %08" PRIu32 " %08" PRIu64

#if !defined(CONFIG_USER_ONLY)

                " DECR %08" PRIu32

#endif

                "\n",

                cpu_ppc_load_tbu(VAR_0), cpu_ppc_load_tbl(VAR_0)

#if !defined(CONFIG_USER_ONLY)

                , cpu_ppc_load_decr(VAR_0)

#endif

                );

#endif

    for (VAR_4 = 0; VAR_4 < 32; VAR_4++) {

        if ((VAR_4 & (RGPL - 1)) == 0)

            VAR_2(VAR_1, "GPR%02d", VAR_4);

        VAR_2(VAR_1, " %016" PRIx64, ppc_dump_gpr(VAR_0, VAR_4));

        if ((VAR_4 & (RGPL - 1)) == (RGPL - 1))

            VAR_2(VAR_1, "\n");

    }

    VAR_2(VAR_1, "CR ");

    for (VAR_4 = 0; VAR_4 < 8; VAR_4++)

        VAR_2(VAR_1, "%01x", VAR_0->crf[VAR_4]);

    VAR_2(VAR_1, "  [");

    for (VAR_4 = 0; VAR_4 < 8; VAR_4++) {

        char VAR_5 = '-';

        if (VAR_0->crf[VAR_4] & 0x08)

            VAR_5 = 'L';

        else if (VAR_0->crf[VAR_4] & 0x04)

            VAR_5 = 'G';

        else if (VAR_0->crf[VAR_4] & 0x02)

            VAR_5 = 'E';

        VAR_2(VAR_1, " %c%c", VAR_5, VAR_0->crf[VAR_4] & 0x01 ? 'O' : ' ');

    }

    VAR_2(VAR_1, " ]             RES " TARGET_FMT_lx "\n",

                VAR_0->reserve_addr);

    for (VAR_4 = 0; VAR_4 < 32; VAR_4++) {

        if ((VAR_4 & (RFPL - 1)) == 0)

            VAR_2(VAR_1, "FPR%02d", VAR_4);

        VAR_2(VAR_1, " %016" PRIx64, *((uint64_t *)&VAR_0->fpr[VAR_4]));

        if ((VAR_4 & (RFPL - 1)) == (RFPL - 1))

            VAR_2(VAR_1, "\n");

    }

    VAR_2(VAR_1, "FPSCR %08x\n", VAR_0->fpscr);

#if !defined(CONFIG_USER_ONLY)

    VAR_2(VAR_1, "SRR0 " TARGET_FMT_lx " SRR1 " TARGET_FMT_lx " SDR1 "

                TARGET_FMT_lx "\n", VAR_0->spr[SPR_SRR0], VAR_0->spr[SPR_SRR1],

                VAR_0->sdr1);

#endif



#undef RGPL

#undef RFPL

}

void FUNC_0 (CPUState *VAR_0, FILE *VAR_1, fprintf_function VAR_2,
int VAR_3)
{ #define RGPL  4
#define RFPL  4
int VAR_4; VAR_2(VAR_1, "NIP " TARGET_FMT_lx "   LR " TARGET_FMT_lx " CTR "
TARGET_FMT_lx " XER " TARGET_FMT_lx "\n",
VAR_0->nip, VAR_0->lr, VAR_0->ctr, VAR_0->xer); VAR_2(VAR_1, "MSR " TARGET_FMT_lx " HID0 " TARGET_FMT_lx "  HF "
TARGET_FMT_lx " idx %d\n", VAR_0->msr, VAR_0->spr[SPR_HID0],
VAR_0->hflags, VAR_0->mmu_idx); #if !defined(NO_TIMER_DUMP)
VAR_2(VAR_1, "TB %08" PRIu32 " %08" PRIu64
#if !defined(CONFIG_USER_ONLY)
" DECR %08" PRIu32
#endif
"\n",
cpu_ppc_load_tbu(VAR_0), cpu_ppc_load_tbl(VAR_0)
#if !defined(CONFIG_USER_ONLY)
, cpu_ppc_load_decr(VAR_0)
#endif
); #endif
for (VAR_4 = 0; VAR_4 < 32; VAR_4++) { if ((VAR_4 & (RGPL - 1)) == 0)
VAR_2(VAR_1, "GPR%02d", VAR_4); VAR_2(VAR_1, " %016" PRIx64, ppc_dump_gpr(VAR_0, VAR_4)); if ((VAR_4 & (RGPL - 1)) == (RGPL - 1))
VAR_2(VAR_1, "\n"); } VAR_2(VAR_1, "CR "); for (VAR_4 = 0; VAR_4 < 8; VAR_4++) VAR_2(VAR_1, "%01x", VAR_0->crf[VAR_4]); VAR_2(VAR_1, "  ["); for (VAR_4 = 0; VAR_4 < 8; VAR_4++) { char VAR_5 = '-'; if (VAR_0->crf[VAR_4] & 0x08)
VAR_5 = 'L'; else if (VAR_0->crf[VAR_4] & 0x04)
VAR_5 = 'G'; else if (VAR_0->crf[VAR_4] & 0x02)
VAR_5 = 'E'; VAR_2(VAR_1, " %c%c", VAR_5, VAR_0->crf[VAR_4] & 0x01 ? 'O' : ' '); } VAR_2(VAR_1, " ]             RES " TARGET_FMT_lx "\n",
VAR_0->reserve_addr); for (VAR_4 = 0; VAR_4 < 32; VAR_4++) { if ((VAR_4 & (RFPL - 1)) == 0)
VAR_2(VAR_1, "FPR%02d", VAR_4); VAR_2(VAR_1, " %016" PRIx64, *((uint64_t *)&VAR_0->fpr[VAR_4])); if ((VAR_4 & (RFPL - 1)) == (RFPL - 1))
VAR_2(VAR_1, "\n"); } VAR_2(VAR_1, "FPSCR %08x\n", VAR_0->fpscr); #if !defined(CONFIG_USER_ONLY)
VAR_2(VAR_1, "SRR0 " TARGET_FMT_lx " SRR1 " TARGET_FMT_lx " SDR1 "
TARGET_FMT_lx "\n", VAR_0->spr[SPR_SRR0], VAR_0->spr[SPR_SRR1],
VAR_0->sdr1); #endif
#undef RGPL
#undef RFPL
}