[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v7 03/19] xen/riscv: introduce extenstion support check by compiler
On Fri, 2024-04-05 at 08:08 +0200, Jan Beulich wrote: > On 04.04.2024 18:17, Oleksii wrote: > > On Thu, 2024-04-04 at 17:43 +0200, Jan Beulich wrote: > > > On 04.04.2024 17:18, Oleksii wrote: > > > > On Thu, 2024-04-04 at 12:07 +0200, Jan Beulich wrote: > > > > > On 03.04.2024 12:19, Oleksii Kurochko wrote: > > > > > > --- a/xen/arch/riscv/arch.mk > > > > > > +++ b/xen/arch/riscv/arch.mk > > > > > > @@ -3,16 +3,27 @@ > > > > > > > > > > > > $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) > > > > > > > > > > > > -CFLAGS-$(CONFIG_RISCV_64) += -mabi=lp64 > > > > > > +riscv-abi-$(CONFIG_RISCV_32) := -mabi=ilp32 > > > > > > +riscv-abi-$(CONFIG_RISCV_64) := -mabi=lp64 > > > > > > > > > > > > riscv-march-$(CONFIG_RISCV_ISA_RV64G) := rv64g > > > > > > 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) > > > > > > > > > > While committing another question popped up: Why "" (i.e. no > > > > > insn) > > > > > here, ... > > > > > > > > > > > +zihintpause := $(call as-insn,\ > > > > > > + $(CC) $(riscv-generic- > > > > > > flags)_zihintpause,"pause",_zihintpause) > > > > > > > > > > ... but "pause" here? > > > > > > > > In the case of the Zbb extension, we don't check for a specific > > > > instruction, but with the Zihintpause, the idea was to verify > > > > if > > > > the > > > > pause instruction is supported or not. > > > > > > And why's this verification relevant here, but not for Zbb? > > It is not relevant and can be dropped. > > Is it really not? Aren't you checking two things for Zihintpause > (compiler > and assembler support), while checking only one (compiler) for Zbb? You are right. I made again an assumption that binutils are as new as a compiler. Then it makes sense to replace an argument if as-insn "" with andn t0, t0, t0 for Zbb: -zbb := $(call as-insn,$(CC) $(riscv-generic-flags)_zbb,"",_zbb) +zbb_insn := "andn t0, t0, t0" +zbb := $(call as-insn,$(CC) $(riscv-generic- flags)_zbb,${zbb_insn},_zbb) ~ Oleksii > > Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |