[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: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [PATCH for-2.12] target/arm: Don't corrupt insn_start arguments on 32-bit hosts |
Date: |
Tue, 10 Apr 2018 08:20:21 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 04/10/2018 08:13 AM, Peter Maydell wrote:
> 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.
Ah, the s390 code I thought I remembered is still sitting on a branch. I shall
have to revive that for the next devel cycle...
> If we can fix it in the tcg generic code instead that
> would be nicer than an ifdef here, though.
I am working on this now.
r~