static void do_program_interrupt(CPUS390XState *env)

{

    uint64_t mask, addr;

    LowCore *lowcore;

    hwaddr len = TARGET_PAGE_SIZE;

    int ilen = env->int_pgm_ilen;



    switch (ilen) {

    case ILEN_LATER:

        ilen = get_ilen(cpu_ldub_code(env, env->psw.addr));

        break;

    case ILEN_LATER_INC:

        ilen = get_ilen(cpu_ldub_code(env, env->psw.addr));

        env->psw.addr += ilen;

        break;

    default:

        assert(ilen == 2 || ilen == 4 || ilen == 6);

    }



    qemu_log_mask(CPU_LOG_INT, "%s: code=0x%x ilen=%d\n",

                  __func__, env->int_pgm_code, ilen);



    lowcore = cpu_physical_memory_map(env->psa, &len, 1);



    lowcore->pgm_ilen = cpu_to_be16(ilen);

    lowcore->pgm_code = cpu_to_be16(env->int_pgm_code);

    lowcore->program_old_psw.mask = cpu_to_be64(get_psw_mask(env));

    lowcore->program_old_psw.addr = cpu_to_be64(env->psw.addr);

    mask = be64_to_cpu(lowcore->program_new_psw.mask);

    addr = be64_to_cpu(lowcore->program_new_psw.addr);



    cpu_physical_memory_unmap(lowcore, len, 1, len);



    DPRINTF("%s: %x %x %" PRIx64 " %" PRIx64 "\n", __func__,

            env->int_pgm_code, ilen, env->psw.mask,

            env->psw.addr);



    load_psw(env, mask, addr);

}

static void do_program_interrupt(CPUS390XState *env)

{

    uint64_t mask, addr;

    LowCore *lowcore;

    hwaddr len = TARGET_PAGE_SIZE;

    int ilen = env->int_pgm_ilen;



    switch (ilen) {

    case ILEN_LATER:

        ilen = get_ilen(cpu_ldub_code(env, env->psw.addr));

        break;

    case ILEN_LATER_INC:

        ilen = get_ilen(cpu_ldub_code(env, env->psw.addr));

        env->psw.addr += ilen;

        break;

    default:

        assert(ilen == 2 || ilen == 4 || ilen == 6);

    }



    qemu_log_mask(CPU_LOG_INT, "%s: code=0x%x ilen=%d\n",

                  __func__, env->int_pgm_code, ilen);



    lowcore = cpu_physical_memory_map(env->psa, &len, 1);



    lowcore->pgm_ilen = cpu_to_be16(ilen);

    lowcore->pgm_code = cpu_to_be16(env->int_pgm_code);

    lowcore->program_old_psw.mask = cpu_to_be64(get_psw_mask(env));

    lowcore->program_old_psw.addr = cpu_to_be64(env->psw.addr);

    mask = be64_to_cpu(lowcore->program_new_psw.mask);

    addr = be64_to_cpu(lowcore->program_new_psw.addr);



    cpu_physical_memory_unmap(lowcore, len, 1, len);



    DPRINTF("%s: %x %x %" PRIx64 " %" PRIx64 "\n", __func__,

            env->int_pgm_code, ilen, env->psw.mask,

            env->psw.addr);



    load_psw(env, mask, addr);

}

static void FUNC_0(CPUS390XState *VAR_0)

{

    uint64_t mask, addr;

    LowCore *lowcore;

    hwaddr len = TARGET_PAGE_SIZE;

    int VAR_1 = VAR_0->int_pgm_ilen;



    switch (VAR_1) {

    case ILEN_LATER:

        VAR_1 = get_ilen(cpu_ldub_code(VAR_0, VAR_0->psw.addr));

        break;

    case ILEN_LATER_INC:

        VAR_1 = get_ilen(cpu_ldub_code(VAR_0, VAR_0->psw.addr));

        VAR_0->psw.addr += VAR_1;

        break;

    default:

        assert(VAR_1 == 2 || VAR_1 == 4 || VAR_1 == 6);

    }



    qemu_log_mask(CPU_LOG_INT, "%s: code=0x%x VAR_1=%d\n",

                  __func__, VAR_0->int_pgm_code, VAR_1);



    lowcore = cpu_physical_memory_map(VAR_0->psa, &len, 1);



    lowcore->pgm_ilen = cpu_to_be16(VAR_1);

    lowcore->pgm_code = cpu_to_be16(VAR_0->int_pgm_code);

    lowcore->program_old_psw.mask = cpu_to_be64(get_psw_mask(VAR_0));

    lowcore->program_old_psw.addr = cpu_to_be64(VAR_0->psw.addr);

    mask = be64_to_cpu(lowcore->program_new_psw.mask);

    addr = be64_to_cpu(lowcore->program_new_psw.addr);



    cpu_physical_memory_unmap(lowcore, len, 1, len);



    DPRINTF("%s: %x %x %" PRIx64 " %" PRIx64 "\n", __func__,

            VAR_0->int_pgm_code, VAR_1, VAR_0->psw.mask,

            VAR_0->psw.addr);



    load_psw(VAR_0, mask, addr);

}

static void FUNC_0(CPUS390XState *VAR_0)
{ uint64_t mask, addr; LowCore *lowcore; hwaddr len = TARGET_PAGE_SIZE; int VAR_1 = VAR_0->int_pgm_ilen; switch (VAR_1) { case ILEN_LATER:
VAR_1 = get_ilen(cpu_ldub_code(VAR_0, VAR_0->psw.addr)); break; case ILEN_LATER_INC:
VAR_1 = get_ilen(cpu_ldub_code(VAR_0, VAR_0->psw.addr)); VAR_0->psw.addr += VAR_1; break; default:
assert(VAR_1 == 2 || VAR_1 == 4 || VAR_1 == 6); } qemu_log_mask(CPU_LOG_INT, "%s: code=0x%x VAR_1=%d\n",
__func__, VAR_0->int_pgm_code, VAR_1); lowcore = cpu_physical_memory_map(VAR_0->psa, &len, 1); lowcore->pgm_ilen = cpu_to_be16(VAR_1); lowcore->pgm_code = cpu_to_be16(VAR_0->int_pgm_code); lowcore->program_old_psw.mask = cpu_to_be64(get_psw_mask(VAR_0)); lowcore->program_old_psw.addr = cpu_to_be64(VAR_0->psw.addr); mask = be64_to_cpu(lowcore->program_new_psw.mask); addr = be64_to_cpu(lowcore->program_new_psw.addr); cpu_physical_memory_unmap(lowcore, len, 1, len); DPRINTF("%s: %x %x %" PRIx64 " %" PRIx64 "\n", __func__,
VAR_0->int_pgm_code, VAR_1, VAR_0->psw.mask,
VAR_0->psw.addr); load_psw(VAR_0, mask, addr); }