This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] RISC-V: Add -mstrict-align option
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>, <gcc-patches at gcc dot gnu dot org>
- Cc: <patches at groups dot riscv dot org>
- Date: Mon, 1 May 2017 11:08:08 -0600
- Subject: Re: [PATCH] RISC-V: Add -mstrict-align option
- Authentication-results: sourceware.org; auth=none
- References: <20170501154010.15702-1-palmer@dabbelt.com>
On 05/01/2017 09:40 AM, Palmer Dabbelt wrote:
[snip]
diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt
index 0466bb2..0422e07 100644
--- a/gcc/config/riscv/riscv.opt
+++ b/gcc/config/riscv/riscv.opt
@@ -84,6 +84,10 @@ mcmodel=
Target Report RejectNegative Joined Enum(code_model) Var(riscv_cmodel) Init(TARGET_DEFAULT_CMODEL)
Specify the code model.
+mstrict-align
+Target Report Mask(STRICT_ALIGN) Save
+Assume that unaligned memory accesses are disallowed.
+
It's not clear from that description who is disallowing the accesses,
and what the assumption implies. How about just:
Do not generate unaligned memory accesses.
@@ -20945,6 +20946,11 @@ Put global and static data smaller than @var{n} bytes into a special section
@opindex msave-restore
Use smaller but slower prologue and epilogue code.
+@item -mstrict-align
+@itemx -mno-strict-align
+@opindex mstrict-align
+Assume that unaligned memory accesses are disallowed.
+
Ditto here.
-Sandra