diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-30 16:22:56 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-30 16:22:56 +0000 |
commit | 0f3955e2d28d71bc18935913e0bc2c5d134b1568 (patch) | |
tree | 47a019856ad6758c58c1fcbed74f0d72b93d42f4 /target-ppc/op_helper.c | |
parent | 4bf5801db44a1bb13e80b35bb0ea7aeed9780050 (diff) |
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
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r-- | target-ppc/op_helper.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 6addc7429a..1ea5a988df 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -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); |