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/40523] New: GCC generates invalid instructions when building for Thumb-2 on armel


[ forwarded from https://launchpad.net/+bugs/347864 ]

seen on the 4.3 branch, fixed in 4.4 and trunk.

When building for the Thumb-2 instruction set, GCC appears to generate Thumb2
loads and stores with invalid address offsets and base register writeback. The
Thumb-2 instruction set does not support the full offset range for these
instructions, causing the assembler to fail.

The failure is observed as follows:
g++ -march=armv7 -mthumb -O2 -c asbug.c++

/tmp/ccrSTYGR.s:525: Error: offset out of range

Line 545 of the generated assembler is:
        ldr r2, [sl, #264]!
However, the allowed offset range for this instruction is restricted to be
<256.


-- 
           Summary: GCC generates invalid instructions when building for
                    Thumb-2 on armel
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: doko at ubuntu dot com
GCC target triplet: arm-linux-gnueabi


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


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