[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/riscv: check whether the assembler has Zbb extension support
commit bc5827fad1e842bb902fc281889e6d3138c2ccab Author: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> AuthorDate: Mon Apr 22 15:12:03 2024 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Apr 22 15:12:03 2024 +0200 xen/riscv: check whether the assembler has Zbb extension support 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> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- 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 9f3ed4ff06..05c113f2c2 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) $(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) -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |