[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] xen/riscv: check whether the assembler has Zbb extension support
On Fri, 2024-04-19 at 12:26 +0200, Oleksii Kurochko wrote: > Update the argument of the as-insn for the Zbb case to verify that > Zbb is supported not only by a compiler, but also by an assembler. > > Also, check_extenstion(ext_name, "insn") helper macro is introduced > to check whether extension is supported by a compiler and an > assembler. > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> > --- > xen/arch/riscv/arch.mk | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk > index 53f3575e7d..a3d7d97ab6 100644 > --- a/xen/arch/riscv/arch.mk > +++ b/xen/arch/riscv/arch.mk > @@ -11,9 +11,14 @@ riscv-march-$(CONFIG_RISCV_ISA_C) := > $(riscv-march-y)c > > riscv-generic-flags := $(riscv-abi-y) -march=$(riscv-march-y) > > -zbb := $(call as-insn,$(CC) $(riscv-generic-flags)_zbb,"",_zbb) > -zihintpause := $(call as-insn, \ > - $(CC) $(riscv-generic- > flags)_zihintpause,"pause",_zihintpause) > +# check_extension: Check whether extenstion is supported by a > compiler and > +# an assembler. > +# Usage: $(call check_extension,extension_name,"instr") > +check_extension = $(call as-insn,$(CC) I missed to use correct naming. should be 'check-extension'. I will sent a new patch version. Sorry for flooding. ~ Oleksii > $(riscv-generic-flags)_$(1),$(2),_$(1)) > + > +zbb_insn := "andn t0, t0, t0" > +zbb := $(call check_extension,zbb,$(zbb_insn)) > +zihintpause := $(call check_extension,zihintpause,"pause") > > extensions := $(zbb) $(zihintpause) >
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |