Skip to content

Commit a816980

Browse files
authored
Merge pull request #22 from a4lg/minor-formatting
Minor formatting and additions
2 parents b355149 + 793c1cb commit a816980

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

README.mkd

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ documentation](https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html)
5050
## Specifying the target ISA with -march
5151

5252
The compiler and assembler both accept the `-march` flag to specify the target
53-
ISA, e.g. "rv32imafd". The abbreviation "g" can be used to represent either
53+
ISA, e.g. `rv32imafd`. The abbreviation `g` can be used to represent either
5454
`IMAFD` (when targeting RISC-V ISA specification version 2.2 or earlier) or
5555
`IMAFD_Zicsr_Zifencei` (version 20190608 or later) base and extensions,
5656
e.g. `-march=rv64g`. A target `-march` which includes floating point
@@ -80,18 +80,24 @@ conventional to give a string such as `rv32g+firstext+secondext`.
8080
RISC-V compilers support the following ABIs, which can be specified using
8181
`-mabi`:
8282

83-
* `ilp32`: int, long, pointers are 32-bit. GPRs and the stack are used for
84-
parameter passing.
85-
* `ilp32f`: int, long, pointers are 32-bit. GPRs, 32-bit FPRs, and the stack
86-
are used for parameter passing.
87-
* `ilp32d`: int, long, pointers are 32-bit. GPRs, 64-bit FPRs and the stack
88-
are used for parameter passing.
89-
* `lp64`: long, pointers are 64-bit. GPRs and the the stack are used for
90-
parameter passing.
91-
* `lp64f`: long, pointers are 64-bit. GPRs, 32-bit FPRs, and the stack are
92-
used for parameter passing.
93-
* `lp64d`: long, pointers are 64-bit. GPRs, 64-bit FPRs, and the stack are
94-
used for parameter passing.
83+
* [`ilp32`](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#abi-ilp32):
84+
int, long, pointers are 32-bit. GPRs and the stack are used for
85+
parameter passing.
86+
* [`ilp32f`](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#abi-ilp32f):
87+
int, long, pointers are 32-bit. GPRs, 32-bit FPRs, and the stack are
88+
used for parameter passing.
89+
* [`ilp32d`](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#abi-ilp32d):
90+
int, long, pointers are 32-bit. GPRs, 64-bit FPRs and the stack are
91+
used for parameter passing.
92+
* [`lp64`](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#abi-lp64):
93+
long, pointers are 64-bit. GPRs and the the stack are used for
94+
parameter passing.
95+
* [`lp64f`](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#abi-lp64f):
96+
long, pointers are 64-bit. GPRs, 32-bit FPRs, and the stack are used for
97+
parameter passing.
98+
* [`lp64d`](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#abi-lp64d):
99+
long, pointers are 64-bit. GPRs, 64-bit FPRs, and the stack are used for
100+
parameter passing.
95101

96102
See the [RISC-V ELF
97103
psABI](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc)
@@ -104,7 +110,7 @@ impossible combinations of `-march` and `-mabi` such as `-march=rv32i` and
104110

105111
### Issues for consideration
106112
* Should the `-mabi` string be parsed case insensitively?
107-
* How should the RV32E ABI be specified? ilp32e?
113+
* How should the RV32E ABI be specified? `ilp32e`?
108114

109115
## Specifying the target code model with -mcmodel
110116

@@ -165,7 +171,7 @@ targeted RISC-V variant includes support for the 'C' compressed instruction
165171
set.
166172

167173
### Issues for consideration
168-
* There is currently no way to enable support for the C ISA extension, but to
174+
* There is currently no way to enable support for the 'C' ISA extension, but to
169175
disable the automatic 'compression' of instructions.
170176

171177
## C/C++ preprocessor definitions
@@ -256,7 +262,7 @@ extension, comply with this conventions isn't guarantee upstream will accept.
256262

257263
### Vendor extension naming scheme
258264

259-
According to the RISC-V ISA spec, non-standard extensions are named using a single `x`
265+
According to the RISC-V ISA spec, non-standard extensions are named using a single `X`
260266
followed by an alphabetical name and an optional version number.
261267

262268
To make it easier to identify and prevent naming conflict, vendor extensions
@@ -306,8 +312,9 @@ for readability.
306312

307313
## TODO
308314

309-
* mdiv, mno-div, mfdiv, mno-fdiv, msave-restore, mno-save-restore,
310-
mstrict-align, mno-strict-align, -mexplicit-relocs, -mno-explicit-relocs
315+
* `-mdiv`, `-mno-div`, `-mfdiv`, `-mno-fdiv`, `-msave-restore`,
316+
`-mno-save-restore`, `-mstrict-align`, `-mno-strict-align`,
317+
`-mexplicit-relocs`, `-mno-explicit-relocs`
311318

312319
## Appendix: Exposing a vendor-specific extension across the toolchain
313320

0 commit comments

Comments
 (0)