qemu/target/microblaze/translate.c
/*
 * Returns true if the insn is illegal in userspace.
 * If exceptions are enabled, an exception is raised.
 */
Returns true if the insn is illegal in userspace.
If exceptions are enabled, an exception is raised.
Returns true if the insn is illegal in userspace . If exceptions are enabled an exception is raised .
static bool trap_userspace(DisasContext *dc, bool cond)
{
    int mem_index = cpu_mmu_index(&dc->cpu->env, false);
    bool cond_user = cond && mem_index == MMU_USER_IDX;
    if (cond_user && (dc->tb_flags & MSR_EE_FLAG)) {
        tcg_gen_movi_i64(cpu_SR[SR_ESR], ESR_EC_PRIVINSN);
        t_gen_raise_exception(dc, EXCP_HW_EXCP);
    }
    return cond_user;
}
static bool trap_userspace ( DisasContext * dc , bool cond ) { int mem_index = cpu_mmu_index ( & dc -> cpu -> env , false ) ; bool cond_user = cond && mem_index == MMU_USER_IDX ; if ( cond_user && ( dc -> tb_flags & MSR_EE_FLAG ) ) { tcg_gen_movi_i64 ( cpu_SR [ SR_ESR ] , ESR_EC_PRIVINSN ) ; t_gen_raise_exception ( dc , EXCP_HW_EXCP ) ; } return cond_user ; }
Returns true if the insn is illegal in userspace.
Returns true if the insn is illegal in userspace .