This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM inline assembly usage in Linux kernel


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]