From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5981 invoked by alias); 22 Jun 2009 23:21:32 -0000 Received: (qmail 5935 invoked by uid 48); 22 Jun 2009 23:21:12 -0000 Date: Mon, 22 Jun 2009 23:21:00 -0000 Subject: [Bug target/40523] New: GCC generates invalid instructions when building for Thumb-2 on armel X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "doko at ubuntu dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg01653.txt.bz2 [ 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