From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31838 invoked by alias); 19 Feb 2014 23:20:02 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31774 invoked by uid 89); 19 Feb 2014 23:20:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f179.google.com Received: from mail-vc0-f179.google.com (HELO mail-vc0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 19 Feb 2014 23:20:00 +0000 Received: by mail-vc0-f179.google.com with SMTP id lh14so1171834vcb.10 for ; Wed, 19 Feb 2014 15:19:58 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.220.0.131 with SMTP id 3mr2124844vcb.79.1392851998424; Wed, 19 Feb 2014 15:19:58 -0800 (PST) Received: by 10.58.195.199 with HTTP; Wed, 19 Feb 2014 15:19:58 -0800 (PST) In-Reply-To: References: <20140219025428.GA5417@lithium.compnerd.org> <87sirfjovh.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> Date: Wed, 19 Feb 2014 23:20:00 -0000 Message-ID: Subject: Re: ARM inline assembly usage in Linux kernel From: Andrew Pinski To: Renato Golin Cc: Saleem Abdulrasool , GCC Mailing List , Richard Sandiford Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00363.txt.bz2 On Wed, Feb 19, 2014 at 3:17 PM, Renato Golin wrote: > On 19 February 2014 11:58, Richard Sandiford > wrote: >> I agree that having an unrecognised asm shouldn't be a hard error until >> assembly time though. Saleem, is the problem that this is being rejected >> earlier? > > Hi Andrew, Richard, > > Thanks for your reviews! We agree that we should actually just ignore > the contents until object emission. > > Just for context, one of the reasons why we enabled inline assembly > checks is for some obscure cases when the snippet changes the > instructions set (arm -> thumb) and the rest of the function becomes > garbage. Our initial implementation was to always emit .arm/.thumb > after *any* inline assembly, which would become a nop in the worst > case. But since we had easy access to the assembler, we thought: "why > not?". With the unified assembly format, you should not need those .arm/.thumb and in fact emitting them can make things even worse. Thanks, Andrew Pinski > > The idea is now to try to parse the snippet for cases like .arm/.thumb > but only emit a warning IFF -Wbad-inline-asm (or whatever) is set (and > not to make it on by default), otherwise, ignore. We're hoping our > assembler will be able to cope with the multiple levels of indirection > automagically. ;) > > Thanks again! > --renato