diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-18 08:47:10 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-18 08:47:10 +0000 |
commit | 36f696517b1723d627b79aa924bac7c678de01b0 (patch) | |
tree | ea0063b4b3fdd86185f8e73885316f07b6c0dbe1 /target-ppc/translate.c | |
parent | 33d68b5f00011c8101aec93ba1bb2b470e35151d (diff) |
As icbi is not a priviledge instruction and is treated as a load by the MMU
it needs to be implemented for every MMU translation mode.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2492 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r-- | target-ppc/translate.c | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index e5c281293a..82919a5875 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -3069,17 +3069,48 @@ GEN_HANDLER(dcbz, 0x1F, 0x16, 0x1F, 0x03E00001, PPC_CACHE) } /* icbi */ +#define op_icbi() (*gen_op_icbi[ctx->mem_idx])() +#if defined(TARGET_PPC64) +#if defined(CONFIG_USER_ONLY) +static GenOpFunc *gen_op_icbi[] = { + &gen_op_icbi_raw, + &gen_op_icbi_raw, + &gen_op_icbi_64_raw, + &gen_op_icbi_64_raw, +}; +#else +static GenOpFunc *gen_op_icbi[] = { + &gen_op_icbi_user, + &gen_op_icbi_user, + &gen_op_icbi_kernel, + &gen_op_icbi_kernel, + &gen_op_icbi_64_user, + &gen_op_icbi_64_user, + &gen_op_icbi_64_kernel, + &gen_op_icbi_64_kernel, +}; +#endif +#else +#if defined(CONFIG_USER_ONLY) +static GenOpFunc *gen_op_icbi[] = { + &gen_op_icbi_raw, + &gen_op_icbi_raw, +}; +#else +static GenOpFunc *gen_op_icbi[] = { + &gen_op_icbi_user, + &gen_op_icbi_user, + &gen_op_icbi_kernel, + &gen_op_icbi_kernel, +}; +#endif +#endif GEN_HANDLER(icbi, 0x1F, 0x16, 0x1E, 0x03E00001, PPC_CACHE) { /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->nip - 4); gen_addr_reg_index(ctx); -#if defined(TARGET_PPC64) - if (ctx->sf_mode) - gen_op_icbi_64(); - else -#endif - gen_op_icbi(); + op_icbi(); RET_STOP(ctx); } |