On 25.06.2024 15:51, Oleksii Kurochko wrote:
> --- a/xen/arch/riscv/include/asm/cmpxchg.h
> +++ b/xen/arch/riscv/include/asm/cmpxchg.h
> @@ -18,6 +18,20 @@
>          : "r" (new) \
>          : "memory" );
>  
> +/*
> + * Binutils < 2.37 doesn't understand ANDN.  If the toolchain is too
> +ld, form

Same question: Why's 2.37 suddenly of interest? Plus, why would age of the
tool chain matter? What you care about is whether you're permitted to use
the extension at runtime. Otherwise you could again ...

Also something went wrong with line wrapping here.

> + * it of a NOT+AND pair
> + */
> +#ifdef __riscv_zbb
> +#define ANDN_INSN(rd, rs1, rs2)                 \
> +    "andn " rd ", " rs1 ", " rs2 "\n"
> +#else
> +#define ANDN_INSN(rd, rs1, rs2)                 \
> +    "not " rd ", " rs2 "\n"                     \
> +    "and " rd ", " rs1 ", " rd "\n"

... resort to .insn.

Jan

Reply via email to