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: unassig...@gcc.gnu.org

        ReportedBy: michael.h...@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.

Reply via email to