[Bug target/57648] Illegal use ARM Cortex M3 instruction LDMIA causes UserFault

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 19 07:59:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57648

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-code                  |
             Target|ARM Cortex M3               |
               Host|Windows 7 x64               |
      Known to fail|4.6.3, 4.7.2                |
              Build|4.7.2                       |

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What options did you configure GCC with?
What options are you using to compile the source with?

I think this is note in the changes page is what you need to read in this case:
On ARM, when compiling for ARMv6 (but not ARMv6-M), ARMv7-A, ARMv7-R, or
ARMv7-M, the new option -munaligned-access is active by default, which for some
sources generates code that accesses memory on unaligned addresses. This
requires the kernel of those systems to enable such accesses (controlled by
CP15 register c1, refer to ARM documentation). Alternatively, or for
compatibility with kernels where unaligned accesses are not supported, all code
has to be compiled with -mno-unaligned-access. Upstream Linux kernel releases
have automatically and unconditionally supported unaligned accesses as emitted
by GCC due to this option being active since version 2.6.28.



More information about the Gcc-bugs mailing list