mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target-ppc: convert software TLB instructions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5819 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
4bf5801db4
commit
0f3955e2d2
5 changed files with 36 additions and 42 deletions
|
@ -2460,7 +2460,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
|
|||
|
||||
/* Software driven TLBs management */
|
||||
/* PowerPC 602/603 software TLB load instructions helpers */
|
||||
void do_load_6xx_tlb (int is_code)
|
||||
static void helper_load_6xx_tlb (target_ulong new_EPN, int is_code)
|
||||
{
|
||||
target_ulong RPN, CMP, EPN;
|
||||
int way;
|
||||
|
@ -2482,11 +2482,22 @@ void do_load_6xx_tlb (int is_code)
|
|||
}
|
||||
#endif
|
||||
/* Store this TLB */
|
||||
ppc6xx_tlb_store(env, (uint32_t)(T0 & TARGET_PAGE_MASK),
|
||||
ppc6xx_tlb_store(env, (uint32_t)(new_EPN & TARGET_PAGE_MASK),
|
||||
way, is_code, CMP, RPN);
|
||||
}
|
||||
|
||||
void do_load_74xx_tlb (int is_code)
|
||||
void helper_load_6xx_tlbd (target_ulong EPN)
|
||||
{
|
||||
helper_load_6xx_tlb(EPN, 0);
|
||||
}
|
||||
|
||||
void helper_load_6xx_tlbi (target_ulong EPN)
|
||||
{
|
||||
helper_load_6xx_tlb(EPN, 1);
|
||||
}
|
||||
|
||||
/* PowerPC 74xx software TLB load instructions helpers */
|
||||
static void helper_load_74xx_tlb (target_ulong new_EPN, int is_code)
|
||||
{
|
||||
target_ulong RPN, CMP, EPN;
|
||||
int way;
|
||||
|
@ -2503,10 +2514,20 @@ void do_load_74xx_tlb (int is_code)
|
|||
}
|
||||
#endif
|
||||
/* Store this TLB */
|
||||
ppc6xx_tlb_store(env, (uint32_t)(T0 & TARGET_PAGE_MASK),
|
||||
ppc6xx_tlb_store(env, (uint32_t)(new_EPN & TARGET_PAGE_MASK),
|
||||
way, is_code, CMP, RPN);
|
||||
}
|
||||
|
||||
void helper_load_74xx_tlbd (target_ulong EPN)
|
||||
{
|
||||
helper_load_74xx_tlb(EPN, 0);
|
||||
}
|
||||
|
||||
void helper_load_74xx_tlbi (target_ulong EPN)
|
||||
{
|
||||
helper_load_74xx_tlb(EPN, 1);
|
||||
}
|
||||
|
||||
static always_inline target_ulong booke_tlb_to_page_size (int size)
|
||||
{
|
||||
return 1024 << (2 * size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue