[ARM] LLVM's -arm-assume-misaligned-load-store equivalent in GCC?
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Jan 9 20:27:00 GMT 2020
Hi Christophe,
> Actually I got a confirmation of what I suspected: the offending function foo()
> is part of ARM CMSIS libraries, although the users are able to recompile them,
> they don't want to modify that source code. Having a compilation option to
> avoid generating problematic code sequences would be OK for them.
Well if LDRD instructions are incorrectly generated in those libraries for unaligned
accesses then why not report it as a CMSIS bug? Adding a complex new option like
this (with high impact to code quality) to workaround what seems a simple bug is
way overkill.
> So from the user's perspective, the wrong code is part of a 3rd party library
> which they can recompile but do not want to modify.
Would we expect every user of CMSIS to find this bug, find its cause, figure out
that a future GCC may have a new special option to avoid it, wait until that GCC
is released and then recompile?
Really, the best option is to report and modify the source until it is fixed.
Cheers,
Wilco
More information about the Gcc
mailing list