This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/55218] New: armv6 doesn't use unaligned access for packed structures


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]