From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30837 invoked by alias); 3 Jun 2002 11:56:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 30776 invoked by uid 71); 3 Jun 2002 11:56:01 -0000 Resent-Date: 3 Jun 2002 11:56:01 -0000 Resent-Message-ID: <20020603115601.30774.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, omakarenko@cyberplat.ru Received:(qmail 24602 invoked by uid 61); 3 Jun 2002 11:46:51 -0000 Message-Id:<20020603114651.24601.qmail@sources.redhat.com> Date: Mon, 03 Jun 2002 04:56:00 -0000 From: omakarenko@cyberplat.ru Reply-To: omakarenko@cyberplat.ru To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/6916: Wrong assembler code for ARM/Thumb X-SW-Source: 2002-06/txt/msg00058.txt.bz2 List-Id: >Number: 6916 >Category: c >Synopsis: Wrong assembler code for ARM/Thumb >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Mon Jun 03 04:56:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: omakarenko@cyberplat.ru >Release: unknown-1.0 >Organization: >Environment: GNU C version 3.1 (arm-elf) compiled by GNU C version 2.96 20000731 (RedHat Linux 7.3 2.96-110) Configured with: /home/oleg/arm/tools/gcc/configure --target=arm-elf --enable-languages=c,c++ --disable-shared --disable-nls --with-gnu-as --with-gnu-ld --disable-checking - -with-multilibs --with-newlib --disable-newlib-io-float Thread model:single >Description: The following simple file when compiled with arm-elf-gcc -o test.Os.s -S -Os -mthumb test.c produces code like: ldr r3, [r3, sp] which is wrong for Thumb mode (sp can not be used in thumb mode) gas then complains with "Error: lo register required" -O2 and -O3 give the same result. >How-To-Repeat: arm-elf-gcc -o test.Os.s -S -Os test.c or arm-elf-gcc -o test.Os.o -c -Os test.c >Fix: >Release-Note: >Audit-Trail: >Unformatted: