From 18ef05600f53751837d6d959e594f9230b3cd845 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Wed, 29 May 2024 09:21:07 +0800 Subject: [PATCH] Add document for -mstrict-align and -mno-strict-align 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. --- README.mkd | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.mkd b/README.mkd index 4758683..dd0c249 100644 --- a/README.mkd +++ b/README.mkd @@ -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