qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH for-2.12] target/arm: Don't corrupt insn_start arg


From: Peter Maydell
Subject: Re: [Qemu-arm] [PATCH for-2.12] target/arm: Don't corrupt insn_start arguments on 32-bit hosts
Date: Mon, 9 Apr 2018 23:13:05 +0100

On 9 April 2018 at 23:09, Richard Henderson <address@hidden> wrote:
> On 04/09/2018 08:38 PM, Peter Maydell wrote:
>> +#if TARGET_LONG_BITS <= TCG_TARGET_REG_BITS
>>      tcg_set_insn_param(s->insn_start, 2, syn);
>> +#else
>> +    /* tcg_gen_insn_start has split every target_ulong argument to
>> +     * op_insn_start into two 32-bit arguments, so we want the low
>> +     * half of the 3rd argument, which is at index 4.
>> +     */
>> +    tcg_set_insn_param(s->insn_start, 4, syn);
>> +#endif
>>
>
> Ouch, good catch.
>
> I think we should fix this in tcg_set_insn_param instead,
> as several other targets are also affected by this.

Are they? My grep didn't find anybody else using
tcg_set_insn_param() except the gen-icount.h code,
which isn't using target_long arguments.

If we can fix it in the tcg generic code instead that
would be nicer than an ifdef here, though.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]