From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21695 invoked by alias); 20 Feb 2014 12:59:48 -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 21668 invoked by uid 89); 20 Feb 2014 12:59:47 -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,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f45.google.com Received: from mail-qg0-f45.google.com (HELO mail-qg0-f45.google.com) (209.85.192.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 20 Feb 2014 12:59:46 +0000 Received: by mail-qg0-f45.google.com with SMTP id j5so3970516qga.4 for ; Thu, 20 Feb 2014 04:59:44 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.140.89.71 with SMTP id u65mr1140461qgd.93.1392901184486; Thu, 20 Feb 2014 04:59:44 -0800 (PST) Received: by 10.224.188.205 with HTTP; Thu, 20 Feb 2014 04:59:44 -0800 (PST) Reply-To: ramrad01@arm.com In-Reply-To: References: <20140219025428.GA5417@lithium.compnerd.org> <87sirfjovh.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> Date: Thu, 20 Feb 2014 12:59:00 -0000 Message-ID: Subject: Re: ARM inline assembly usage in Linux kernel From: Ramana Radhakrishnan To: Renato Golin Cc: Andrew Pinski , Saleem Abdulrasool , GCC Mailing List , Richard Sandiford Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00380.txt.bz2 On Wed, Feb 19, 2014 at 11:26 PM, Renato Golin wrote: > On 19 February 2014 23:19, Andrew Pinski wrote: >> With the unified assembly format, you should not need those >> .arm/.thumb and in fact emitting them can make things even worse. > > If only we could get rid or all pre-UAL inline assembly on the planet... :) > The has been the only reason why we added support for those in our > assembler, because GAS supports them and people still use (or have > legacy code they won't change). It's not really because GAS supports it, but there exists a large body of code out there which uses inline assembler with pre-UAL syntax. I'm not sure people will appreciate a blanket break in one version of the toolchain and especially when people could quite easily mix and match between compiler versions and binutils versions. Granted the benefits of moving to UAL. Before anything else the compiler needs to be fixed and there are some corner cases to deal with build attributes especially for Thumb1 in the assembler before we can starting thinking about deprecating pre-UAL syntax. Currently we only put out UAL syntax for Thumb2 integer instructions and Neon/ Advanced SIMD instructions. Switching ARM state to UAL is trivial, VFP a little bit more work and Thumb1 a bit harder as you may need a more up to date GAS with some fixes. We also need a command line switch (and maybe a pragma) in GCC to put out a .syntax divided at the entry to and exit from an inline assembler block to allow folks to transition their inline assembler code, all of which as you can imagine is not rocket science but needs diligent rework. It may be of interest for 4.9 + 1 = (4.10 /5.0) in GCC and the next binutils revision. Ripping out pre-UAL support from GAS is a different story and will take quite a few more years, empirical evidence shows that it took us quite a few years to get rid of FPA support in the compiler and I don't think it's fully gone from the assembler. We'll remain stuck with pre-UAL syntax in the GNU Tools world for quite a while IMNSHO. Adding the warning by default to GAS is just part of the solution. regards Ramana > > cheers, > --renato