This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Deprecating basic asm in a function - What now?
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, Andrew Haley <aph at redhat dot com>, Jeff Law <law at redhat dot com>, Michael Matz <matz at suse dot de>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 22 Jun 2016 11:05:48 -0700
- Subject: Re: Deprecating basic asm in a function - What now?
- Authentication-results: sourceware.org; auth=none
- References: <dc3ca16c-3521-757f-fcf0-50061f510f75 at LimeGreenSocks dot com> <alpine dot LSU dot 2 dot 20 dot 1606201931460 dot 13156 at wotan dot suse dot de> <57682A85 dot 4060803 at redhat dot com> <alpine dot LSU dot 2 dot 20 dot 1606201941340 dot 13156 at wotan dot suse dot de> <57690227 dot 2050501 at redhat dot com> <alpine dot LSU dot 2 dot 20 dot 1606211401150 dot 13156 at wotan dot suse dot de> <57696C45 dot 5000309 at redhat dot com> <c23d921a-5546-ea81-0367-cfc1a18de876 at redhat dot com> <576970ED dot 30507 at redhat dot com> <f666086e-8c64-c6c8-b1a2-eaa18572a685 at redhat dot com> <576AD20F dot 90208 at gmail dot com>
On Wed, Jun 22, 2016 at 10:59 AM, Manuel LÃpez-IbÃÃez
<lopezibanez@gmail.com> wrote:
> On 22/06/16 10:02, Florian Weimer wrote:
>>
>> On 06/21/2016 06:53 PM, Andrew Haley wrote:
>>>
>>> Me too. I wonder if there's anything else we can do to make basic asm
>>> in a function a bit less of a time bomb.
>>
>>
>> GCC could parse the assembly instructions and figure out the clobbers.
>
>
> Which is also needed for various things, such as providing better
> diagnostics:
>
> http://permalink.gmane.org/gmane.comp.compilers.llvm.cvs/70335
Actually GCC outputs markers that modern gas understands and you get
much better diagnostic already compared to what was reported above.
Note each target in gas has its own way of parsing assembly code which
is one of the reason why it is so hard todo the above and also each
target has its own wording which can confuse people. I think if you
want better diagnostic from assembly code, then working on binutils to
unify things including error messages (and subtarget support) would be
a much better use of time than integrating binutils into gcc.
Thanks,
Andrew
> http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html
> https://www.reddit.com/r/programming/comments/bnhxb/clang_now_with_inline_assembly_diagnostics/
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57950
>
> Of course, that would require a closer integration with binutils. There has
> been some work in that direction in the past:
> https://sourceware.org/ml/binutils/2015-06/msg00010.html
>
> but like the GCC-GDB integration, it seems to have stalled or be happening
> behind closed doors.
>
> Cheers,
>
> Manuel.