Skip to content

Commit

Permalink
Update Profile name defination with BNF
Browse files Browse the repository at this point in the history
Update Profile name defination with BNF, split the name defination into four part.

Signed-off-by: Jiawei <[email protected]>
  • Loading branch information
pz9115 authored Jun 30, 2023
1 parent 47389da commit 9ff1eb6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -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=<profile-name>[+<option-ext>]+`.
Profiles format has the following BNF form `"-march="<profile-name>"+"[option-ext]*`.

`profile-name ::= "RV"<profile-family-name><profile-ratified-year><privilege-mode><ISA-XLEN>`

`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
Expand Down

0 comments on commit 9ff1eb6

Please sign in to comment.