在 2022/1/23 下午5:00, Xi Ruoyao 写道:
On Sun, 2022-01-23 at 16:39 +0800, 程璐璐 wrote:
在 2022/1/22 下午4:42, Xi Ruoyao 写道:
On Sat, 2022-01-22 at 15:55 +0800, Chenghua Xu wrote:
+mstrict-align
+Target Var(TARGET_STRICT_ALIGN) Init(0)
+Do not generate unaligned memory accesses.
Section 2.1.8 of LoongArch spec says "load/store instruction *may* be
implemented to allow unaligned memory access".  As it's not a "must",
should we really enable this by default?
Currently, our main architecture supports this feature. Later, in the compiler
the value of this macro will be set according to the architecture.
My suggestion is to make -mstrict-align default for the default
('-march=loongarch64'), as it should generate code working on every
architecture following the spec.  And, -mno-strict-align should be the
default of -march=la464, which is the current main architecture
supporting unaligned access.

Ok we will consider your suggestion!

Reply via email to