[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH for-2.8] target-arm/translate-a64: fix gen_load_ex
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [PATCH for-2.8] target-arm/translate-a64: fix gen_load_exclusive |
Date: |
Mon, 5 Dec 2016 09:15:25 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
On 12/05/2016 09:04 AM, Alex Bennée wrote:
>> It's not trying to be "clever", it's trying to be correct, giving an atomic
>> 64-bit load.
>
> Ahh right I see. What happens if the backend is 32bit, will it issue two
> loads anyway?
Yes. I did bring this up when the atomics patch set went in.
In principal there's no reason we can't handle this like the 128-bit path, with
a special helper for a 32-bit host using __atomic_load_64 if available, which
it would be for i686 (via fpu) and armv7 (via ldrexd), or
gen_helper_exit_atomic if not.
But it's nasty and slow, and work that's unnecessary if we simply decide that
32-bit hosts cannot run mttcg.
> I don't know how often these load-exclusive paired operations are used
> in real code but I think we should at least fix it so the values are
> loaded properly for 2.8 and do the proper atomic fix for 2.9.
Yep.
r~