From 4bc1a308b8c7de1d74acd1aee84adcbda2bab1be Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 16 May 2025 22:02:57 +0100 Subject: [PATCH] Permit underscores after single-letter extensions Signed-off-by: Luke Wren --- riscv_config/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscv_config/constants.py b/riscv_config/constants.py index b2c7d9a..9b9df0b 100644 --- a/riscv_config/constants.py +++ b/riscv_config/constants.py @@ -38,4 +38,4 @@ sub_extensions = Z_extensions + S_extensions isa_regex = \ - re.compile("^RV(32|64|128)[IE][ACDFGHJLMNPQSTUV]*(("+'|'.join(sub_extensions)+")(_("+'|'.join(sub_extensions)+"))*){,1}(X[a-z0-9]*)*(_X[a-z0-9]*)*$") + re.compile("^RV(32|64|128)[IE]_?(?:[ACDFGHJLMNPQSTUV]_?)*(("+'|'.join(sub_extensions)+")(_("+'|'.join(sub_extensions)+"))*){,1}(X[a-z0-9]*)*(_X[a-z0-9]*)*$")