From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21709 invoked by alias); 22 Oct 2014 21:15:14 -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 21674 invoked by uid 48); 22 Oct 2014 21:15:10 -0000 From: "andre.rosa at lge dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/45729] -flto conflicts with -mthumb Date: Wed, 22 Oct 2014 21:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andre.rosa at lge dot com X-Bugzilla-Status: RESOLVED 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: cc Message-ID: In-Reply-To: References: 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-10/txt/msg01711.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45729 Andre Goddard Rosa changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andre.rosa at lge dot com --- Comment #3 from Andre Goddard Rosa --- Is LTO playing well with thumb as far as 4.8.3 is concerned or still not supported? Got the following when mixing "-mthumb" with "-flto=8 -fuse-linker-plugin": | /tmp/ccQ4Z3ej.s: Assembler messages: | /tmp/ccQ4Z3ej.s:21: Error: lo register required -- `str lr,[sp,#4]' | /tmp/ccQ4Z3ej.s:31: Error: lo register required -- `str lr,[sp,#4]' ... | /tmp/ccQ4Z3ej.s:1134: Error: lo register required -- `ldr lr,[sp,#0x38]' | /tmp/ccQ4Z3ej.s:1158: Error: instruction not supported in Thumb16 mode -- `adds r3,#5' | /tmp/ccQ4Z3ej.s:1173: Error: lo register required -- `ldr r10,[r1,#60]' | /tmp/ccQ4Z3ej.s:1174: Error: lo register required -- `ldr r3,[r10,#0]' | /tmp/ccQ4Z3ej.s:1186: Error: instruction not supported in Thumb16 mode -- `adds r3,#5' | /tmp/ccQ4Z3ej.s:1201: Error: lo register required -- `ldr r10,[r1,#60]' | /tmp/ccQ4Z3ej.s:1202: Error: lo register required -- `ldr r3,[r10,#0]' | /tmp/ccQ4Z3ej.s:1216: Error: instruction not supported in Thumb16 mode -- `adds r3,#5' | /tmp/ccQ4Z3ej.s:1234: Error: lo register required -- `ldr r10,[r1,#60]' | /tmp/ccQ4Z3ej.s:1241: Error: dest must overlap one source register -- `mul r2,r3,r0' | /tmp/ccQ4Z3ej.s:1242: Error: instruction not supported in Thumb16 mode -- `lsls r0,r0,#3' | /tmp/ccQ4Z3ej.s:1245: Error: unshifted register required -- `add r3,r5,r0,lsl#0' | /tmp/ccQ4Z3ej.s:1247: Error: instruction not supported in Thumb16 mode -- `subs r4,r4,#32' | /tmp/ccQ4Z3ej.s:1249: Error: unshifted register required -- `add r3,r5,r0,lsl#0' | /tmp/ccQ4Z3ej.s:1252: Error: unshifted register required -- `mvn r3,#7' | /tmp/ccQ4Z3ej.s:1253: Error: instruction not supported in Thumb16 mode -- `adds r0,r3' | /tmp/ccQ4Z3ej.s:1261: Error: instruction not supported in Thumb16 mode -- `lsls r0,r0,#3' | /tmp/ccQ4Z3ej.s:1262: Error: instruction not supported in Thumb16 mode -- `subs r0,r5,r0' Removing LTO or -mthumb makes the problem go away. $ ld --version GNU ld (crosstool-NG 1.19.0 - 4.8-2014.10-x86_64) 2.24.0.20140311 Linaro 2014.03 Copyright 2013 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. $ gcc --version gcc-original (crosstool-NG 1.19.0 - 4.8-2014.10-x86_64) 4.8.3 20140401 (prerelease) Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.