Revision efdef95f target-ppc/helper.c

b/target-ppc/helper.c
774 774

  
775 775
    return 0;
776 776
}
777

  
778
int ppc_load_slb_esid (CPUPPCState *env, target_ulong rb, target_ulong *rt)
779
{
780
    int slot = rb & 0xfff;
781
    ppc_slb_t *slb = &env->slb[slot];
782

  
783
    if (slot >= env->slb_nr) {
784
        return -1;
785
    }
786

  
787
    *rt = slb->esid;
788
    return 0;
789
}
790

  
791
int ppc_load_slb_vsid (CPUPPCState *env, target_ulong rb, target_ulong *rt)
792
{
793
    int slot = rb & 0xfff;
794
    ppc_slb_t *slb = &env->slb[slot];
795

  
796
    if (slot >= env->slb_nr) {
797
        return -1;
798
    }
799

  
800
    *rt = slb->vsid;
801
    return 0;
802
}
777 803
#endif /* defined(TARGET_PPC64) */
778 804

  
779 805
/* Perform segment based translation */

Also available in: Unified diff