@@ -4,16 +4,25 @@
# SPDX-License-Identifier: GPL-2.0-only
#
+# RISC-V profile name -> equivalent ISA string. These are determined from compiler output, like:
+# tgamblin@alchemist ~ $ riscv64-linux-gnu-gcc -march=rva20u64 -mabi=lp64d -Q --help=target | grep rv64
+# -march=rv64imafdc_ziccamoa_ziccif_zicclsm_ziccrse_zicntr_zicsr_zmmul_za128rs_zaamo_zalrsc_zca_zcd
+RISCV_PROFILES = {
+ 'rva20u64': 'rv64imafdc_ziccamoa_ziccif_zicclsm_ziccrse_zicntr_zicsr_zmmul_za128rs_zaamo_zalrsc_zca_zcd',
+}
+
# riscv_isa_to_tune(isa)
#
# Automatically translate a RISC-V ISA string to TUNE_FEATURES
#
# Abbreviations, such as rv32g -> rv32imaffd_zicsr_zifencei are supported.
#
-# Profiles, such as rva22u64, are NOT supported, you must use ISA strings.
+# Profiles are supported for the names listed in RISCV_PROFILES. Otherwise, you
+# must use ISA strings.
#
def riscv_isa_to_tune(isa):
_isa = isa.lower()
+ _isa = RISCV_PROFILES.get(_isa, _isa)
feature = []
iter = 0
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> --- meta/lib/oe/tune.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)