* [Buildroot] [PATCH] arch/config: Enable RISC-V Toolchain with Vector Extension
@ 2023-06-09 17:46 Tianrui Wei via buildroot
2023-07-23 10:11 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Tianrui Wei via buildroot @ 2023-06-09 17:46 UTC (permalink / raw)
To: buildroot; +Cc: Mark Corbin
This commits adds support for building a RISC-V toolchain with the
vector extension.
Signed-off-by: Tianrui Wei <tianrui@tianruiwei.com>
---
arch/Config.in.riscv | 8 ++++++++
arch/arch.mk.riscv | 3 +++
2 files changed, 11 insertions(+)
diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv
index b5e84389e0..c5b6c48ed3 100644
--- a/arch/Config.in.riscv
+++ b/arch/Config.in.riscv
@@ -18,6 +18,9 @@ config BR2_RISCV_ISA_RVD
config BR2_RISCV_ISA_RVC
bool
+config BR2_RISCV_ISA_RVV
+ bool
+
choice
prompt "Target Architecture Variant"
default BR2_riscv_g
@@ -63,6 +66,11 @@ config BR2_RISCV_ISA_CUSTOM_RVD
config BR2_RISCV_ISA_CUSTOM_RVC
bool "Compressed Instructions (C)"
select BR2_RISCV_ISA_RVC
+
+config BR2_RISCV_ISA_CUSTOM_RVV
+ bool "Vector Instructions (V)"
+ select BR2_RISCV_ISA_RVV
+
endif
choice
diff --git a/arch/arch.mk.riscv b/arch/arch.mk.riscv
index 8d2236147c..ee5c434b97 100644
--- a/arch/arch.mk.riscv
+++ b/arch/arch.mk.riscv
@@ -26,6 +26,9 @@ endif
ifeq ($(BR2_RISCV_ISA_RVC),y)
GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c
endif
+ifeq ($(BR2_RISCV_ISA_RVV),y)
+GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)v
+endif
# Starting from gcc 12.x, csr and fence instructions have been
# separated from the base I instruction set, and special -march
--
2.41.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] arch/config: Enable RISC-V Toolchain with Vector Extension
2023-06-09 17:46 [Buildroot] [PATCH] arch/config: Enable RISC-V Toolchain with Vector Extension Tianrui Wei via buildroot
@ 2023-07-23 10:11 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-23 10:11 UTC (permalink / raw)
To: Tianrui Wei via buildroot; +Cc: Tianrui Wei, Mark Corbin, Romain Naour
Hello Tianrui,
On Fri, 9 Jun 2023 17:46:42 +0000
Tianrui Wei via buildroot <buildroot@buildroot.org> wrote:
> This commits adds support for building a RISC-V toolchain with the
> vector extension.
>
> Signed-off-by: Tianrui Wei <tianrui@tianruiwei.com>
> ---
> arch/Config.in.riscv | 8 ++++++++
> arch/arch.mk.riscv | 3 +++
> 2 files changed, 11 insertions(+)
I've applied to master, after adding a "select
BR2_ARCH_NEEDS_GCC_AT_LEAST_12" which was missing, to ensure that only
gcc >= 12.x can be selected when vector extension is enabled, since
support for this was only added in gcc 12.x.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-23 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-09 17:46 [Buildroot] [PATCH] arch/config: Enable RISC-V Toolchain with Vector Extension Tianrui Wei via buildroot
2023-07-23 10:11 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.