This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/55218] New: armv6 doesn't use unaligned access for packed structures
- From: "michael.hope at linaro dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Nov 2012 22:00:21 +0000
- Subject: [Bug target/55218] New: armv6 doesn't use unaligned access for packed structures
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55218
Bug #: 55218
Summary: armv6 doesn't use unaligned access for packed
structures
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: michael.hope@linaro.org
Created attachment 28622
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28622
Test case
The GCC ARM target uses the armv6 and above unaligned loads for packed
structures and block copies. This works correctly for -march=armv7-a and
-march=armv6t2, but generates the old byte-by-byte field access for
-march=armv6.
The block copy is fine. readelf -A shows that the compiler intended to use
unaligned access. I'm suspicious that GCC is using the extv pattern to extract
the field, and this pattern is only available on cores with Thumb-2 support.