public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ramana Radhakrishnan <ramana.gcc@googlemail.com>
To: Renato Golin <renato.golin@linaro.org>
Cc: Andrew Pinski <pinskia@gmail.com>,
	Saleem Abdulrasool <compnerd@compnerd.org>,
		GCC Mailing List <gcc@gcc.gnu.org>,
	Richard Sandiford <rsandifo@linux.vnet.ibm.com>
Subject: Re: ARM inline assembly usage in Linux kernel
Date: Thu, 20 Feb 2014 12:59:00 -0000	[thread overview]
Message-ID: <CAJA7tRZUFqP2CWj-nocqNvpyOnU6uJFAvqPXd2HCZnY=Le_7EA@mail.gmail.com> (raw)
In-Reply-To: <CAMSE1kcN9m_Wp-cCA_UfPJBeSkJwkHPqVv0CjjKCa4hwuF_GTQ@mail.gmail.com>

On Wed, Feb 19, 2014 at 11:26 PM, Renato Golin <renato.golin@linaro.org> wrote:
> On 19 February 2014 23:19, Andrew Pinski <pinskia@gmail.com> 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

  reply	other threads:[~2014-02-20 12:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19  2:56 Saleem Abdulrasool
2014-02-19  3:02 ` Andrew Pinski
2014-02-19 11:58   ` Richard Sandiford
2014-02-19 23:17     ` Renato Golin
2014-02-19 23:20       ` Andrew Pinski
2014-02-19 23:26         ` Renato Golin
2014-02-20 12:59           ` Ramana Radhakrishnan [this message]
2014-02-20 13:17             ` Renato Golin
2014-02-20 10:11         ` Ramana Radhakrishnan
2014-02-20 10:21           ` Renato Golin
2014-02-20 12:09         ` Richard Earnshaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJA7tRZUFqP2CWj-nocqNvpyOnU6uJFAvqPXd2HCZnY=Le_7EA@mail.gmail.com' \
    --to=ramana.gcc@googlemail.com \
    --cc=compnerd@compnerd.org \
    --cc=gcc@gcc.gnu.org \
    --cc=pinskia@gmail.com \
    --cc=ramrad01@arm.com \
    --cc=renato.golin@linaro.org \
    --cc=rsandifo@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).