This is the mail archive of the gcc-patches@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: RFA: Remove alias usage from libgcc/sync.c


Jakub Jelinek <jakub@redhat.com> writes:
> On Fri, Oct 11, 2013 at 10:17:41AM +0200, Richard Biener wrote:
>> asm(".alias __sync_synchronize sync_synchronize");
>
> It is .set, but not everywhere.
> /* The MIPS assembler has different syntax for .set. We set it to
>    .dummy to trap any errors.  */
> #undef SET_ASM_OP
> #define SET_ASM_OP "\t.dummy\t"
> But perhaps it would require fewer variants than providing inline asm
> of the __sync_* builtin by hand for all the targets that need it.

Yeah, that's why I prefer the sed approach.  GCC knows how to do exactly
what we want, and what syntax to use.  We just need to take its output and
change the function name.

And like Richard says, parsing top-level asms would be fair game,
especially if GCC and binutils ever were integrated (for libgccjit.so).
So using top-level asms seems like putting off the inevitable
(albeit putting it off further than __asm renaming).

Do either of you object to the sed thing?

Thanks,
Richard


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