From 9ff1eb631438529ed371605fe9949ecbf056dbd5 Mon Sep 17 00:00:00 2001 From: Jiawei Date: Fri, 30 Jun 2023 21:09:38 +0800 Subject: [PATCH] Update Profile name defination with BNF Update Profile name defination with BNF, split the name defination into four part. Signed-off-by: Jiawei --- README.mkd | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.mkd b/README.mkd index b363cc2..41a08a5 100644 --- a/README.mkd +++ b/README.mkd @@ -70,7 +70,19 @@ Profiles should be recognized and used in the `-march=` option. The benefit use `-march` option is easy for toolchain parsing the profiles string and expanding it into normal extensions combinations. -Profiles format has the following form `-march=[+]+`. +Profiles format has the following BNF form `"-march=""+"[option-ext]*`. + +`profile-name ::= "RV"` + +`profile-family-name ::= "I" | "M" | "A"` + +`profile-ratified-year ::= "20" | "22" | "23"` + +`privilege-mode ::= "U" | "S" | "M"` + +`ISA-XLEN ::= "64" | "32"` + +`option-ext ::= 'a legal RISC-V extension name'` As the spec defines, to use the profiles it should follow profile naming convention (See [3.4 form spec doc](https://github.com/riscv/riscv-profiles)), the toolchain