target_phys_addr_t booke206_tlb_to_page_size(CPUState *env, ppcmas_tlb_t *tlb)

{

    uint32_t tlbncfg;

    int tlbn = booke206_tlbm_to_tlbn(env, tlb);

    int tlbm_size;



    tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + tlbn];



    if (tlbncfg & TLBnCFG_AVAIL) {

        tlbm_size = (tlb->mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT;

    } else {

        tlbm_size = (tlbncfg & TLBnCFG_MINSIZE) >> TLBnCFG_MINSIZE_SHIFT;

        tlbm_size <<= 1;

    }



    return 1024ULL << tlbm_size;

}

target_phys_addr_t booke206_tlb_to_page_size(CPUState *env, ppcmas_tlb_t *tlb)

{

    uint32_t tlbncfg;

    int tlbn = booke206_tlbm_to_tlbn(env, tlb);

    int tlbm_size;



    tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + tlbn];



    if (tlbncfg & TLBnCFG_AVAIL) {

        tlbm_size = (tlb->mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT;

    } else {

        tlbm_size = (tlbncfg & TLBnCFG_MINSIZE) >> TLBnCFG_MINSIZE_SHIFT;

        tlbm_size <<= 1;

    }



    return 1024ULL << tlbm_size;

}

target_phys_addr_t FUNC_0(CPUState *env, ppcmas_tlb_t *tlb)

{

    uint32_t tlbncfg;

    int VAR_0 = booke206_tlbm_to_tlbn(env, tlb);

    int VAR_1;



    tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + VAR_0];



    if (tlbncfg & TLBnCFG_AVAIL) {

        VAR_1 = (tlb->mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT;

    } else {

        VAR_1 = (tlbncfg & TLBnCFG_MINSIZE) >> TLBnCFG_MINSIZE_SHIFT;

        VAR_1 <<= 1;

    }



    return 1024ULL << VAR_1;

}

target_phys_addr_t FUNC_0(CPUState *env, ppcmas_tlb_t *tlb)
{ uint32_t tlbncfg; int VAR_0 = booke206_tlbm_to_tlbn(env, tlb); int VAR_1; tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + VAR_0]; if (tlbncfg & TLBnCFG_AVAIL) { VAR_1 = (tlb->mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT; } else { VAR_1 = (tlbncfg & TLBnCFG_MINSIZE) >> TLBnCFG_MINSIZE_SHIFT; VAR_1 <<= 1; } return 1024ULL << VAR_1; }