From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24756 invoked by alias); 25 Dec 2014 14:36:07 -0000 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 Received: (qmail 24727 invoked by uid 48); 25 Dec 2014 14:36:01 -0000 From: "Sergey.Belyashov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64405] New: [arm] Invalid codegenaration for ARMv3 and ARMv2 Date: Thu, 25 Dec 2014 14:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Sergey.Belyashov at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg02733.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64405 Bug ID: 64405 Summary: [arm] Invalid codegenaration for ARMv3 and ARMv2 Product: gcc Version: 4.8.5 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: Sergey.Belyashov at gmail dot com I try to compile program for ARMv3 or ARMv2 CPU target using GCC (4.8.x). It produces assembler code with BX LR instructions (return from function) which GAS (2.23.2) cannot compile: Error: selected processor does not support ARM mode `bx lr' It is work for ARMv4 mode and greater (ARMv4 has no BX instruction support, but GAS compiles it as MOV PC,). As I know BX is strongly recommended to be used instead of MOV PC, by the ARM architecture manual (section A.4.1.1) but GAS developers says, that it is GCC bug. GAS mail archive: https://lists.gnu.org/archive/html/bug-binutils/2014-10/msg00017.html