Skip to content

Commit 47389da

Browse files
authored
Update profiles format descriptions
Update profiles format descriptions, follow all comments in discuss. Thanks Alex Bradbury and Kito Cheng's review. Signed-off-by: Jiawei <[email protected]>
1 parent ec70e4c commit 47389da

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

README.mkd

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,38 @@ The ISA subset naming conventions are described in Chapter 27 of the RISC-V
6161
user-level ISA specification. However, tools do not currently follow this
6262
specification (input is case sensitive, ...).
6363

64+
If the 'C' (compressed) instruction set extension is targeted, the compiler
65+
will generate compressed instructions where possible.
66+
6467
### Profile-based format
6568

66-
Profiles should be recognized and used in the `-march=` option.
67-
The benefit is that it is easy for toolchain parsing the profiles string and expanding it into normal extensions combinations. It’s also easy to combine a profile with any extensions.
69+
Profiles should be recognized and used in the `-march=` option. The benefit use
70+
`-march` option is easy for toolchain parsing the profiles string and expanding
71+
it into normal extensions combinations.
72+
73+
Profiles format has the following form `-march=<profile-name>[+<option-ext>]+`.
6874

69-
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 will check whether an input profile name is correct at first, then do the parse work.
75+
As the spec defines, to use the profiles it should follow profile naming convention
76+
(See [3.4 form spec doc](https://github.com/riscv/riscv-profiles)), the toolchain
77+
will check whether an input profile name is correct at first, then do the parse
78+
work.
7079

71-
In order to distinguish between ordinary extension input and input with profiles, profiles are assumed to be entered `at the beginning of the -march option`, and then input other extensions. Profiles `should use uppercase letters` in the -march option.
80+
In order to distinguish between ordinary extension input and input with profiles,
81+
profiles are assumed to be entered `at the beginning of the -march option`, and
82+
then input other extensions. Profiles `should use uppercase letters` in the `-march`
83+
option.
7284

7385
e.g. `-march = RVA20U64` is a legal profile input, it will be expand into:
7486

75-
`-march = rv64imafdc_zicsr_ziccif_ziccrse_ziccamoa_zicclsm_za128rs`
87+
`-march = rv64imafdc_zicsr_ziccif_ziccrse_ziccamoa_zicclsm_za128rs`,
7688
which include all the mandatory extensions required by this profile.
77-
Here we are `not dealing with optional extensions` to profiles in the toolchain.
7889

79-
Moreover, some extensions are still not ratified yet. So the toolchain only keeps their name strings only.
90+
`-march = RVA20U64+zba_zbb_zbc_zbs` is also a legal profile input, it will add
91+
four new extensions after expanded profile strings:
8092

81-
If the 'C' (compressed) instruction set extension is targeted, the compiler
82-
will generate compressed instructions where possible.
93+
`-march = rv64imafdc_zicsr_ziccif_ziccrse_ziccamoa_zicclsm_za128rs_zba_zbb_zbc_zbs`
94+
95+
and `-march = rva20u64` is an illegal profile input, it not use uppercase letters.
8396

8497
### Issues for consideration
8598
* Whether `riscv32` and `riscv64` should be accepted as synonyms for `rv32`

0 commit comments

Comments
 (0)