[PATCH 2/7] riscv: Implement cmpxchg8/16() using Zabha

Andrea Parri parri.andrea at gmail.com
Tue May 28 16:54:21 PDT 2024


> +zabha:									\
> +	__asm__ __volatile__ (						\
> +		prepend							\
> +		"	amocas" cas_sfx " %0, %z2, %1\n"		\
> +		append							\
> +		: "+&r" (r), "+A" (*(p))				\
> +		: "rJ" (n)						\
> +		: "memory");						\

Couldn't a platform have Zabha but not have Zacas?  I don't see how this
asm goto could work in such case, what am I missing?

  Andrea



More information about the linux-riscv mailing list