static void dec_sr(DisasContext *dc)

{

    if (dc->format == OP_FMT_RI) {

        LOG_DIS("sri r%d, r%d, %d\n", dc->r1, dc->r0, dc->imm5);

    } else {

        LOG_DIS("sr r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);

    }



    if (!(dc->env->features & LM32_FEATURE_SHIFT)) {

        if (dc->format == OP_FMT_RI) {

            /* TODO: check r1 == 1 during runtime */

        } else {

            if (dc->imm5 != 1) {

                cpu_abort(dc->env, "hardware shifter is not available\n");

            }

        }

    }



    if (dc->format == OP_FMT_RI) {

        tcg_gen_sari_tl(cpu_R[dc->r1], cpu_R[dc->r0], dc->imm5);

    } else {

        TCGv t0 = tcg_temp_new();

        tcg_gen_andi_tl(t0, cpu_R[dc->r1], 0x1f);

        tcg_gen_sar_tl(cpu_R[dc->r2], cpu_R[dc->r0], t0);

        tcg_temp_free(t0);

    }

}

static void dec_sr(DisasContext *dc)

{

    if (dc->format == OP_FMT_RI) {

        LOG_DIS("sri r%d, r%d, %d\n", dc->r1, dc->r0, dc->imm5);

    } else {

        LOG_DIS("sr r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);

    }



    if (!(dc->env->features & LM32_FEATURE_SHIFT)) {

        if (dc->format == OP_FMT_RI) {

            

        } else {

            if (dc->imm5 != 1) {

                cpu_abort(dc->env, "hardware shifter is not available\n");

            }

        }

    }



    if (dc->format == OP_FMT_RI) {

        tcg_gen_sari_tl(cpu_R[dc->r1], cpu_R[dc->r0], dc->imm5);

    } else {

        TCGv t0 = tcg_temp_new();

        tcg_gen_andi_tl(t0, cpu_R[dc->r1], 0x1f);

        tcg_gen_sar_tl(cpu_R[dc->r2], cpu_R[dc->r0], t0);

        tcg_temp_free(t0);

    }

}

                cpu_abort(dc->env, "hardware shifter is not available\n");                 cpu_abort(dc->env, "hardware shifter is not available\n");     } else {
static void FUNC_0(DisasContext *VAR_0)

{

    if (VAR_0->format == OP_FMT_RI) {

        LOG_DIS("sri r%d, r%d, %d\n", VAR_0->r1, VAR_0->r0, VAR_0->imm5);

    } else {

        LOG_DIS("sr r%d, r%d, r%d\n", VAR_0->r2, VAR_0->r0, VAR_0->r1);

    }



    if (!(VAR_0->env->features & LM32_FEATURE_SHIFT)) {

        if (VAR_0->format == OP_FMT_RI) {

            

        } else {

            if (VAR_0->imm5 != 1) {

                cpu_abort(VAR_0->env, "hardware shifter is not available\n");

            }

        }

    }



    if (VAR_0->format == OP_FMT_RI) {

        tcg_gen_sari_tl(cpu_R[VAR_0->r1], cpu_R[VAR_0->r0], VAR_0->imm5);

    } else {

        TCGv t0 = tcg_temp_new();

        tcg_gen_andi_tl(t0, cpu_R[VAR_0->r1], 0x1f);

        tcg_gen_sar_tl(cpu_R[VAR_0->r2], cpu_R[VAR_0->r0], t0);

        tcg_temp_free(t0);

    }

}

static void FUNC_0(DisasContext *VAR_0)
{ if (VAR_0->format == OP_FMT_RI) { LOG_DIS("sri r%d, r%d, %d\n", VAR_0->r1, VAR_0->r0, VAR_0->imm5); } else { LOG_DIS("sr r%d, r%d, r%d\n", VAR_0->r2, VAR_0->r0, VAR_0->r1); } if (!(VAR_0->env->features & LM32_FEATURE_SHIFT)) { if (VAR_0->format == OP_FMT_RI) { } else { if (VAR_0->imm5 != 1) { cpu_abort(VAR_0->env, "hardware shifter is not available\n"); } } } if (VAR_0->format == OP_FMT_RI) { tcg_gen_sari_tl(cpu_R[VAR_0->r1], cpu_R[VAR_0->r0], VAR_0->imm5); } else { TCGv t0 = tcg_temp_new(); tcg_gen_andi_tl(t0, cpu_R[VAR_0->r1], 0x1f); tcg_gen_sar_tl(cpu_R[VAR_0->r2], cpu_R[VAR_0->r0], t0); tcg_temp_free(t0); } }