@@ -50,7 +50,7 @@ documentation](https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html)
5050## Specifying the target ISA with -march
5151
5252The 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,
5656e.g. ` -march=rv64g ` . A target ` -march ` which includes floating point
@@ -80,18 +80,24 @@ conventional to give a string such as `rv32g+firstext+secondext`.
8080RISC-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
96102See the [ RISC-V ELF
97103psABI] ( 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
165171set.
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
169175disable 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 `
260266followed by an alphabetical name and an optional version number.
261267
262268To 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