On Sun, Oct 16, 2016 at 18:40:05 -0700, Richard Henderson wrote:
> On 10/16/2016 03:17 PM, Emilio G. Cota wrote:
> >>+#if DATA_SIZE == 1
> >>> +# define END
> >>> +#elif defined(HOST_WORDS_BIGENDIAN)
> >>> +# define END _be
> >>> +#else
> >>> +# define END _le
> >>> +#endif
> >It took me a while
On 10/16/2016 03:17 PM, Emilio G. Cota wrote:
+#if DATA_SIZE == 1
> +# define END
> +#elif defined(HOST_WORDS_BIGENDIAN)
> +# define END _be
> +#else
> +# define END _le
> +#endif
It took me a while to figure out that ATOMIC_NAME needs END (ATOMIC_NAME
is defined later in the patch).
It might
On 10/16/2016 03:17 PM, Emilio G. Cota wrote:
> +/* Note that for addition, we need to use a separate cmpxchg loop instead
> + of bswaps for the reverse-host-endian helpers. */
> +ABI_TYPE ATOMIC_NAME(fetch_add)(CPUArchState *env, target_ulong addr,
> + ABI_TYPE val EXT
On Tue, Oct 11, 2016 at 14:40:39 -0500, Richard Henderson wrote:
> Add all of cmpxchg, op_fetch, fetch_op, and xchg.
> Handle both endian-ness, and sizes up to 8.
> Handle expanding non-atomically, when emulating in serial.
>
> Signed-off-by: Richard Henderson
> ---
> Makefile.objs | 2
Richard Henderson writes:
> Add all of cmpxchg, op_fetch, fetch_op, and xchg.
> Handle both endian-ness, and sizes up to 8.
> Handle expanding non-atomically, when emulating in serial.
>
> Signed-off-by: Richard Henderson
Reviewed-by: Alex Bennée
> ---
> Makefile.objs | 2 +-
> Ma
Add all of cmpxchg, op_fetch, fetch_op, and xchg.
Handle both endian-ness, and sizes up to 8.
Handle expanding non-atomically, when emulating in serial.
Signed-off-by: Richard Henderson
---
Makefile.objs | 2 +-
Makefile.target | 1 +
atomic_template.h | 173 +++