Revision f43e3525 target-ppc/helper.c
b/target-ppc/helper.c | ||
---|---|---|
589 | 589 |
for (i = 0; i < 8; i++) { |
590 | 590 |
#if defined(TARGET_PPC64) |
591 | 591 |
if (is_64b) { |
592 |
pte0 = ldq_phys(env->htab_base + pteg_off + (i * 16)); |
|
593 |
pte1 = ldq_phys(env->htab_base + pteg_off + (i * 16) + 8); |
|
592 |
if (env->external_htab) { |
|
593 |
pte0 = ldq_p(env->external_htab + pteg_off + (i * 16)); |
|
594 |
pte1 = ldq_p(env->external_htab + pteg_off + (i * 16) + 8); |
|
595 |
} else { |
|
596 |
pte0 = ldq_phys(env->htab_base + pteg_off + (i * 16)); |
|
597 |
pte1 = ldq_phys(env->htab_base + pteg_off + (i * 16) + 8); |
|
598 |
} |
|
594 | 599 |
|
595 | 600 |
/* We have a TLB that saves 4K pages, so let's |
596 | 601 |
* split a huge page to 4k chunks */ |
... | ... | |
606 | 611 |
} else |
607 | 612 |
#endif |
608 | 613 |
{ |
609 |
pte0 = ldl_phys(env->htab_base + pteg_off + (i * 8)); |
|
610 |
pte1 = ldl_phys(env->htab_base + pteg_off + (i * 8) + 4); |
|
614 |
if (env->external_htab) { |
|
615 |
pte0 = ldl_p(env->external_htab + pteg_off + (i * 8)); |
|
616 |
pte1 = ldl_p(env->external_htab + pteg_off + (i * 8) + 4); |
|
617 |
} else { |
|
618 |
pte0 = ldl_phys(env->htab_base + pteg_off + (i * 8)); |
|
619 |
pte1 = ldl_phys(env->htab_base + pteg_off + (i * 8) + 4); |
|
620 |
} |
|
611 | 621 |
r = pte32_check(ctx, pte0, pte1, h, rw, type); |
612 | 622 |
LOG_MMU("Load pte from " TARGET_FMT_lx " => " TARGET_FMT_lx " " |
613 | 623 |
TARGET_FMT_lx " %d %d %d " TARGET_FMT_lx "\n", |
... | ... | |
647 | 657 |
if (pte_update_flags(ctx, &pte1, ret, rw) == 1) { |
648 | 658 |
#if defined(TARGET_PPC64) |
649 | 659 |
if (is_64b) { |
650 |
stq_phys_notdirty(env->htab_base + pteg_off + (good * 16) + 8, |
|
651 |
pte1); |
|
660 |
if (env->external_htab) { |
|
661 |
stq_p(env->external_htab + pteg_off + (good * 16) + 8, |
|
662 |
pte1); |
|
663 |
} else { |
|
664 |
stq_phys_notdirty(env->htab_base + pteg_off + |
|
665 |
(good * 16) + 8, pte1); |
|
666 |
} |
|
652 | 667 |
} else |
653 | 668 |
#endif |
654 | 669 |
{ |
655 |
stl_phys_notdirty(env->htab_base + pteg_off + (good * 8) + 4, |
|
656 |
pte1); |
|
670 |
if (env->external_htab) { |
|
671 |
stl_p(env->external_htab + pteg_off + (good * 8) + 4, |
|
672 |
pte1); |
|
673 |
} else { |
|
674 |
stl_phys_notdirty(env->htab_base + pteg_off + |
|
675 |
(good * 8) + 4, pte1); |
|
676 |
} |
|
657 | 677 |
} |
658 | 678 |
} |
659 | 679 |
} |
Also available in: Unified diff