Richard Henderson <r...@twiddle.net> writes:

> On 04/27/2017 06:10 PM, Alex Bennée wrote:
>>
>> Richard Henderson <r...@twiddle.net> writes:
>>
>>> We need to coordinate with the TCG_OVERSIZED_GUEST test in cputlb.c,
>>> and allow 64-bit atomics even though sizeof(void *) == 4.
>>
>> Hmm you say this here but we never actually do it. But the other changes
>> seem fine.
>
> I don't understand this comment.
>
>>> +#if defined(__x86_64__) || defined(__sparc__)
>>> +# define ATOMIC_REG_SIZE  8
>>> +#else
>>> +# define ATOMIC_REG_SIZE  sizeof(void *)
>>> +#endif
>
> How does this "never actually do it"?

I meant this is independent of the definition of TCG_OVERSIZED_GUEST:

#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
#define TCG_OVERSIZED_GUEST 1
#else
#define TCG_OVERSIZED_GUEST 0
#endif

So maybe the comment should be clearer for ATOMIC_REG_SIZE that it
should match TCG_TARGET_REG_BITS (and therefore sync with
TCG_OVERSIZED_GUEST) in the atomic.h comment.

--
Alex Bennée

Reply via email to