[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH v9 21/26] target: [tcg, arm] Port to
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH v9 21/26] target: [tcg, arm] Port to insn_start |
Date: |
Wed, 28 Jun 2017 14:48:07 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Richard Henderson writes:
> On 06/25/2017 03:08 AM, Lluís Vilanova wrote:
>> +static void arm_trblock_insn_start(DisasContextBase *db, CPUState *cpu)
>> +{
>> + DisasContext *dc = container_of(db, DisasContext, base);
>> +
>> + dc->insn_start_idx = tcg_op_buf_count();
>> + tcg_gen_insn_start(dc->pc,
>> + (dc->condexec_cond << 4) | (dc->condexec_mask >> 1),
>> + 0);
>> +
>> +#ifdef CONFIG_USER_ONLY
>> + /* Intercept jump to the magic kernel page. */
>> + if (dc->pc >= 0xffff0000) {
>> + /* We always get here via a jump, so know we are not in a
>> + conditional execution block. */
>> + gen_exception_internal(EXCP_KERNEL_TRAP);
>> + dc->is_jmp = DJ_EXC;
>> + }
>> +#endif
>> +}
> I think this DJ_EXC block is better placed at the start of disas_insn.
> It is, however, the answer to one of my questions re patch 4/26.
It cannot, because DJ_EXC make the generic code break out of trasnlation before
doing anything else, which is what the original code does.
Cheers,
Lluis