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 Jun 13, 2024
1 parent 05f991d commit 090aedc
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,26 @@ 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`
Indicates that the compiler should not assume that unaligned scalar and
unaligned vector memory references are handled by the system.

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

NOTE: Non-strict also known as unaligned access or misaligned access
NOTE: The compiler may generate misaligned access if the program violates the
alignment assumption.
NOTE: The scope of this option isn't cover inline assembly.

## 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 090aedc

Please sign in to comment.