[Bug target/31782] Invalid assembly code on initial dollar signs

2014-06-22 Thread raphael.jakse at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782

Raphaël JAKSE  changed:

   What|Removed |Added

 CC||raphael.jakse at gmail dot com

--- Comment #6 from Raphaël JAKSE  ---
New information on this bug:

With gcc version 4.8.3-3 on Debian x86-64 targeting x86_64-linux-gnu, trying to
get the assembly version of the following code with gcc -S:

void $() {}
void a() { $(); }

I get:

[...]
call$
[...]

With clang, I get:


[...]
callq($)
[...]

Making the corresponding object file of this code with gcc -c
 - succeed with the assembly code generated by clang
 - fails with the assembly code generated by gcc with the following message:
 t.c: Assembler messages:
 t.c:30: Error: missing or invalid immediate expression `'

Adding parentheses in the assembly code generated by gcc:
 call$ → call($)

make the object file generation succeed.

Clang seems to add parentheses whenever the function name starts with a dollar
sign ($).

[Bug target/31782] Invalid assembly code on initial dollar signs

2014-06-23 Thread raphael.jakse at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782

--- Comment #8 from Raphaël JAKSE  ---
I tried
call"$"

instead of
call($)

With gcc -S, I got :

t.s: Assembler messages:
t.s:30: Error: invalid character `"' before operand 1

I don't know if there is a way to use quoting (" ") instead of parenthesizing).

[Bug target/31782] Invalid assembly code on initial dollar signs

2014-06-24 Thread raphael.jakse at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782

--- Comment #10 from Raphaël JAKSE  ---
So, a long term solution would be to allow quoted function names with the call
instruction in gas?