Revision 9c2149c8 target-mips/op_helper.c

b/target-mips/op_helper.c
411 411
       that might be a further win.  */
412 412
    mips_tlb_flush_extra (env, MIPS_TLB_NB);
413 413

  
414
    /* Wildly undefined effects for CP0_index containing a too high value and
414
    /* Wildly undefined effects for CP0_Index containing a too high value and
415 415
       MIPS_TLB_NB not being a power of two.  But so does real silicon.  */
416
    invalidate_tlb(env, env->CP0_index & (MIPS_TLB_NB - 1), 0);
417
    fill_tlb(env->CP0_index & (MIPS_TLB_NB - 1));
416
    invalidate_tlb(env, env->CP0_Index & (MIPS_TLB_NB - 1), 0);
417
    fill_tlb(env->CP0_Index & (MIPS_TLB_NB - 1));
418 418
}
419 419

  
420 420
void do_tlbwr (void)
......
439 439
        /* Check ASID, virtual page number & size */
440 440
        if ((tlb->G == 1 || tlb->ASID == ASID) && tlb->VPN == tag) {
441 441
            /* TLB match */
442
            env->CP0_index = i;
442
            env->CP0_Index = i;
443 443
            break;
444 444
        }
445 445
    }
......
455 455
	    }
456 456
	}
457 457

  
458
        env->CP0_index |= 0x80000000;
458
        env->CP0_Index |= 0x80000000;
459 459
    }
460 460
}
461 461

  
......
465 465
    uint8_t ASID;
466 466

  
467 467
    ASID = env->CP0_EntryHi & 0xFF;
468
    tlb = &env->tlb[env->CP0_index & (MIPS_TLB_NB - 1)];
468
    tlb = &env->tlb[env->CP0_Index & (MIPS_TLB_NB - 1)];
469 469

  
470 470
    /* If this will change the current ASID, flush qemu's TLB.  */
471 471
    if (ASID != tlb->ASID)

Also available in: Unified diff