Skip to content

Commit

Permalink
Add document for -mstrict-align and -mno-strict-align
Browse files Browse the repository at this point in the history
We have those two option for a while, but not document in this repo yet,
however we are intend to claify the scope of the option recently, so
it's time to document down what we have agree among different community.
  • Loading branch information
kito-cheng committed May 29, 2024
1 parent 3e7dc6b commit 18ef056
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,22 @@ specification, and in the draft [CORE-V Builtin
Function](https://github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md)
specification.

## Common Toolchain Command Line Options

This section lists common RISC-V specific toolchain command line options.

### `-mstrict-align`/`-mno-strict-align`
Control the code generation for scalar memory access with strict alignment (also known as unaligned access or misaligned access).

`-mstrict-align`: The compiler disallows misaligned access for scalar memory access.
`-mno-strict-align`: The compiler allows misaligned access for scalar memory access.

NOTE: The compiler may generate misaligned access if the program violates the alignment assumption.

## TODO

* `-mdiv`, `-mno-div`, `-mfdiv`, `-mno-fdiv`, `-msave-restore`,
`-mno-save-restore`, `-mstrict-align`, `-mno-strict-align`,
`-mexplicit-relocs`, `-mno-explicit-relocs`
* `-mdiv`, `-mno-div`, `-mfdiv`, `-mno-fdiv`, `-msave-restore`,
`-mno-save-restore`, `-mexplicit-relocs`, `-mno-explicit-relocs`

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

Expand Down

0 comments on commit 18ef056

Please sign in to comment.