On 05/09/2011 12:38 PM, Max Filippov wrote:
> do I understand it right that if I use tb->flags or mem_index to make
> decisions during translation, then I must issue exit_tb on
> instructions that can change state they reflect?
Yes.
Quite often it's some sort of branch instruction anyway, such as
> > This is a case where you almost certainly want to check this
> > condition inside QEMU and translate the opcode differently.
> >
> > See cpu_get_tb_cpu_state, which sets bits in *flags. These
> > flags can then be checked in tb->flags while translating.
> > At which point you'd avoid all the
On 05/04/2011 09:33 AM, Richard Henderson wrote:
> This is a case where you almost certainly want to check this
> condition inside QEMU and translate the opcode differently.
>
> See cpu_get_tb_cpu_state, which sets bits in *flags. These
> flags can then be checked in tb->flags while translating.
On 05/03/2011 05:59 PM, Max Filippov wrote:
> +static void gen_check_privilege(DisasContext *dc)
> +{
> +if (option_enabled(dc, XTENSA_OPTION_MMU)) {
> +TCGv_i32 tmp = tcg_temp_new_i32();
> +int label = gen_new_label();
> +
> +tcg_gen_andi_i32(tmp, cpu_SR[PS], PS_EXCM);
- mark privileged opcodes with ring check;
- make debug exception on exception handler entry.
Signed-off-by: Max Filippov
---
target-xtensa/cpu.h | 91 +
target-xtensa/helper.c| 39 ++-
target-xtensa/helpers.h |2 +
target-xtensa/op