This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ARM inline assembly usage in Linux kernel
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: Renato Golin <renato dot golin at linaro dot org>
- Cc: Andrew Pinski <pinskia at gmail dot com>, Saleem Abdulrasool <compnerd at compnerd dot org>, GCC Mailing List <gcc at gcc dot gnu dot org>, Richard Sandiford <rsandifo at linux dot vnet dot ibm dot com>
- Date: Thu, 20 Feb 2014 12:59:44 +0000
- Subject: Re: ARM inline assembly usage in Linux kernel
- Authentication-results: sourceware.org; auth=none
- References: <20140219025428 dot GA5417 at lithium dot compnerd dot org> <CA+=Sn1kr+Vjf8bRRvg7nTzdPw3YCgHPYff4vFBEyN3jJFcZRQw at mail dot gmail dot com> <87sirfjovh dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <CAMSE1kc3e=o1PxZj06ZUmxT+qbYrTz6oqELgDOGW8roOvWEZMQ at mail dot gmail dot com> <CA+=Sn1=hk63Fna77h1aWypaZt=p+u-4XzuO303=aWOZri=5Tsw at mail dot gmail dot com> <CAMSE1kcN9m_Wp-cCA_UfPJBeSkJwkHPqVv0CjjKCa4hwuF_GTQ at mail dot gmail dot com>
- Reply-to: ramrad01 at arm dot 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