[Bug target/65459] SLOW_UNALIGNED_ACCESS unconditionally set to 1 for ARM targets
ktkachov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 19 14:26:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65459
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktkachov at gcc dot gnu.org
--- Comment #2 from ktkachov at gcc dot gnu.org ---
FWIU ARMv6 and later supports unaligned accesses.
I guess the performance of unaligned accesses differs between cores.
The documentation for SLOW_UNALIGNED_ACCESS says:
"Define this macro to be the value 1 if memory accesses described by the
@var{mode} and @var{alignment} parameters have a cost many times greater
than aligned accesses, for example if they are emulated in a trap
handler."
It seems to me that on some modern cores even if unaligned access is more
expensive than normal it wouldn't be 'many times greater' so we should
definitely investigate setting this in a more intelligent way.
More information about the Gcc-bugs
mailing list