static void dec_pattern(DisasContext *dc)

{

    unsigned int mode;

    int l1;



    if ((dc->tb_flags & MSR_EE_FLAG)

          && !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)

          && !((dc->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) {

        tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);

        t_gen_raise_exception(dc, EXCP_HW_EXCP);

    }



    mode = dc->opcode & 3;

    switch (mode) {

        case 0:

            /* pcmpbf.  */

            LOG_DIS("pcmpbf r%d r%d r%d\n", dc->rd, dc->ra, dc->rb);

            if (dc->rd)

                gen_helper_pcmpbf(cpu_R[dc->rd], cpu_R[dc->ra], cpu_R[dc->rb]);

            break;

        case 2:

            LOG_DIS("pcmpeq r%d r%d r%d\n", dc->rd, dc->ra, dc->rb);

            if (dc->rd) {

                TCGv t0 = tcg_temp_local_new();

                l1 = gen_new_label();

                tcg_gen_movi_tl(t0, 1);

                tcg_gen_brcond_tl(TCG_COND_EQ,

                                  cpu_R[dc->ra], cpu_R[dc->rb], l1);

                tcg_gen_movi_tl(t0, 0);

                gen_set_label(l1);

                tcg_gen_mov_tl(cpu_R[dc->rd], t0);

                tcg_temp_free(t0);

            }

            break;

        case 3:

            LOG_DIS("pcmpne r%d r%d r%d\n", dc->rd, dc->ra, dc->rb);

            l1 = gen_new_label();

            if (dc->rd) {

                TCGv t0 = tcg_temp_local_new();

                tcg_gen_movi_tl(t0, 1);

                tcg_gen_brcond_tl(TCG_COND_NE,

                                  cpu_R[dc->ra], cpu_R[dc->rb], l1);

                tcg_gen_movi_tl(t0, 0);

                gen_set_label(l1);

                tcg_gen_mov_tl(cpu_R[dc->rd], t0);

                tcg_temp_free(t0);

            }

            break;

        default:

            cpu_abort(dc->env,

                      "unsupported pattern insn opcode=%x\n", dc->opcode);

            break;

    }

}

static void dec_pattern(DisasContext *dc)

{

    unsigned int mode;

    int l1;



    if ((dc->tb_flags & MSR_EE_FLAG)

          && !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)

          && !((dc->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) {

        tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);

        t_gen_raise_exception(dc, EXCP_HW_EXCP);

    }



    mode = dc->opcode & 3;

    switch (mode) {

        case 0:

            

            LOG_DIS("pcmpbf r%d r%d r%d\n", dc->rd, dc->ra, dc->rb);

            if (dc->rd)

                gen_helper_pcmpbf(cpu_R[dc->rd], cpu_R[dc->ra], cpu_R[dc->rb]);

            break;

        case 2:

            LOG_DIS("pcmpeq r%d r%d r%d\n", dc->rd, dc->ra, dc->rb);

            if (dc->rd) {

                TCGv t0 = tcg_temp_local_new();

                l1 = gen_new_label();

                tcg_gen_movi_tl(t0, 1);

                tcg_gen_brcond_tl(TCG_COND_EQ,

                                  cpu_R[dc->ra], cpu_R[dc->rb], l1);

                tcg_gen_movi_tl(t0, 0);

                gen_set_label(l1);

                tcg_gen_mov_tl(cpu_R[dc->rd], t0);

                tcg_temp_free(t0);

            }

            break;

        case 3:

            LOG_DIS("pcmpne r%d r%d r%d\n", dc->rd, dc->ra, dc->rb);

            l1 = gen_new_label();

            if (dc->rd) {

                TCGv t0 = tcg_temp_local_new();

                tcg_gen_movi_tl(t0, 1);

                tcg_gen_brcond_tl(TCG_COND_NE,

                                  cpu_R[dc->ra], cpu_R[dc->rb], l1);

                tcg_gen_movi_tl(t0, 0);

                gen_set_label(l1);

                tcg_gen_mov_tl(cpu_R[dc->rd], t0);

                tcg_temp_free(t0);

            }

            break;

        default:

            cpu_abort(dc->env,

                      "unsupported pattern insn opcode=%x\n", dc->opcode);

            break;

    }

}

static void FUNC_0(DisasContext *VAR_0)

{

    unsigned int VAR_1;

    int VAR_2;



    if ((VAR_0->tb_flags & MSR_EE_FLAG)

          && !(VAR_0->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)

          && !((VAR_0->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) {

        tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);

        t_gen_raise_exception(VAR_0, EXCP_HW_EXCP);

    }



    VAR_1 = VAR_0->opcode & 3;

    switch (VAR_1) {

        case 0:

            

            LOG_DIS("pcmpbf r%d r%d r%d\n", VAR_0->rd, VAR_0->ra, VAR_0->rb);

            if (VAR_0->rd)

                gen_helper_pcmpbf(cpu_R[VAR_0->rd], cpu_R[VAR_0->ra], cpu_R[VAR_0->rb]);

            break;

        case 2:

            LOG_DIS("pcmpeq r%d r%d r%d\n", VAR_0->rd, VAR_0->ra, VAR_0->rb);

            if (VAR_0->rd) {

                TCGv t0 = tcg_temp_local_new();

                VAR_2 = gen_new_label();

                tcg_gen_movi_tl(t0, 1);

                tcg_gen_brcond_tl(TCG_COND_EQ,

                                  cpu_R[VAR_0->ra], cpu_R[VAR_0->rb], VAR_2);

                tcg_gen_movi_tl(t0, 0);

                gen_set_label(VAR_2);

                tcg_gen_mov_tl(cpu_R[VAR_0->rd], t0);

                tcg_temp_free(t0);

            }

            break;

        case 3:

            LOG_DIS("pcmpne r%d r%d r%d\n", VAR_0->rd, VAR_0->ra, VAR_0->rb);

            VAR_2 = gen_new_label();

            if (VAR_0->rd) {

                TCGv t0 = tcg_temp_local_new();

                tcg_gen_movi_tl(t0, 1);

                tcg_gen_brcond_tl(TCG_COND_NE,

                                  cpu_R[VAR_0->ra], cpu_R[VAR_0->rb], VAR_2);

                tcg_gen_movi_tl(t0, 0);

                gen_set_label(VAR_2);

                tcg_gen_mov_tl(cpu_R[VAR_0->rd], t0);

                tcg_temp_free(t0);

            }

            break;

        default:

            cpu_abort(VAR_0->env,

                      "unsupported pattern insn opcode=%x\n", VAR_0->opcode);

            break;

    }

}

static void FUNC_0(DisasContext *VAR_0)
{ unsigned int VAR_1; int VAR_2; if ((VAR_0->tb_flags & MSR_EE_FLAG)
&& !(VAR_0->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)
&& !((VAR_0->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exception(VAR_0, EXCP_HW_EXCP); } VAR_1 = VAR_0->opcode & 3; switch (VAR_1) { case 0:
LOG_DIS("pcmpbf r%d r%d r%d\n", VAR_0->rd, VAR_0->ra, VAR_0->rb); if (VAR_0->rd)
gen_helper_pcmpbf(cpu_R[VAR_0->rd], cpu_R[VAR_0->ra], cpu_R[VAR_0->rb]); break; case 2:
LOG_DIS("pcmpeq r%d r%d r%d\n", VAR_0->rd, VAR_0->ra, VAR_0->rb); if (VAR_0->rd) { TCGv t0 = tcg_temp_local_new(); VAR_2 = gen_new_label(); tcg_gen_movi_tl(t0, 1); tcg_gen_brcond_tl(TCG_COND_EQ,
cpu_R[VAR_0->ra], cpu_R[VAR_0->rb], VAR_2); tcg_gen_movi_tl(t0, 0); gen_set_label(VAR_2); tcg_gen_mov_tl(cpu_R[VAR_0->rd], t0); tcg_temp_free(t0); } break; case 3:
LOG_DIS("pcmpne r%d r%d r%d\n", VAR_0->rd, VAR_0->ra, VAR_0->rb); VAR_2 = gen_new_label(); if (VAR_0->rd) { TCGv t0 = tcg_temp_local_new(); tcg_gen_movi_tl(t0, 1); tcg_gen_brcond_tl(TCG_COND_NE,
cpu_R[VAR_0->ra], cpu_R[VAR_0->rb], VAR_2); tcg_gen_movi_tl(t0, 0); gen_set_label(VAR_2); tcg_gen_mov_tl(cpu_R[VAR_0->rd], t0); tcg_temp_free(t0); } break; default:
cpu_abort(VAR_0->env,
"unsupported pattern insn opcode=%x\n", VAR_0->opcode); break; } }