public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC 4.6.1 likes to rename my functions
@ 2011-07-06 15:03 Paulo J. Matos
  2011-07-06 15:08 ` Richard Guenther
  2011-07-06 15:11 ` Jakub Jelinek
  0 siblings, 2 replies; 4+ messages in thread
From: Paulo J. Matos @ 2011-07-06 15:03 UTC (permalink / raw)
  To: gcc

Hi all,

I have finally ported my backend to the latest 4.6.1 after years of 
trying to play catch with the latest release version.

I am now fixing some details.

A source file has a function called: lm_change_to_active which, when 
compiled with -Os is inlined.
When I compile it with -fno-inline-functions 
-fno-inline-small-functions, I get a label for the function in the final 
assembler which looks like: lm_change_to_active.isra?0?.constprop?1?

Seems to be that GCC is adding .isra?0? and later .constprop?1? to the 
name of the function as it goes. However, my assembler doesn't like the 
two dots and the '?' in the middle of the label name very much.

Have I forgotten to define a hook or how I can tell GCC how to create 
this name?

Cheers,

-- 
PMatos

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GCC 4.6.1 likes to rename my functions
  2011-07-06 15:03 GCC 4.6.1 likes to rename my functions Paulo J. Matos
@ 2011-07-06 15:08 ` Richard Guenther
  2011-07-06 15:42   ` Paulo J. Matos
  2011-07-06 15:11 ` Jakub Jelinek
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Guenther @ 2011-07-06 15:08 UTC (permalink / raw)
  To: Paulo J. Matos; +Cc: gcc

On Wed, Jul 6, 2011 at 5:02 PM, Paulo J. Matos <pocmatos@gmail.com> wrote:
> Hi all,
>
> I have finally ported my backend to the latest 4.6.1 after years of trying
> to play catch with the latest release version.
>
> I am now fixing some details.
>
> A source file has a function called: lm_change_to_active which, when
> compiled with -Os is inlined.
> When I compile it with -fno-inline-functions -fno-inline-small-functions, I
> get a label for the function in the final assembler which looks like:
> lm_change_to_active.isra?0?.constprop?1?
>
> Seems to be that GCC is adding .isra?0? and later .constprop?1? to the name
> of the function as it goes. However, my assembler doesn't like the two dots
> and the '?' in the middle of the label name very much.
>
> Have I forgotten to define a hook or how I can tell GCC how to create this
> name?

See cgraph.c:clone_function_name, it uses the NO_DOT_IN_LABEL
and NO_DOLLAR_IN_LABEL target macros and ASM_FORMAT_PRIVATE_NAME.  I
don't see where a '?' should
enter this picture anywhere.

Richard.

> Cheers,
>
> --
> PMatos
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GCC 4.6.1 likes to rename my functions
  2011-07-06 15:03 GCC 4.6.1 likes to rename my functions Paulo J. Matos
  2011-07-06 15:08 ` Richard Guenther
@ 2011-07-06 15:11 ` Jakub Jelinek
  1 sibling, 0 replies; 4+ messages in thread
From: Jakub Jelinek @ 2011-07-06 15:11 UTC (permalink / raw)
  To: Paulo J. Matos; +Cc: gcc

On Wed, Jul 06, 2011 at 04:02:57PM +0100, Paulo J. Matos wrote:
> I have finally ported my backend to the latest 4.6.1 after years of
> trying to play catch with the latest release version.
> 
> I am now fixing some details.
> 
> A source file has a function called: lm_change_to_active which, when
> compiled with -Os is inlined.
> When I compile it with -fno-inline-functions
> -fno-inline-small-functions, I get a label for the function in the
> final assembler which looks like:
> lm_change_to_active.isra?0?.constprop?1?
> 
> Seems to be that GCC is adding .isra?0? and later .constprop?1? to
> the name of the function as it goes. However, my assembler doesn't
> like the two dots and the '?' in the middle of the label name very
> much.
> 
> Have I forgotten to define a hook or how I can tell GCC how to
> create this name?

Look at clone_function_name in cgraph.c.  If you assembler doesn't like
the dots in the function names, you want to define NO_DOT_IN_LABEL,
if it doesn't like dollars in names, you want to also define
NO_DOLLAR_IN_LABEL.  And, double check your ASM_FORMAT_PRIVATE_NAME
definition and ASM_PN_FORMAT.

	Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GCC 4.6.1 likes to rename my functions
  2011-07-06 15:08 ` Richard Guenther
@ 2011-07-06 15:42   ` Paulo J. Matos
  0 siblings, 0 replies; 4+ messages in thread
From: Paulo J. Matos @ 2011-07-06 15:42 UTC (permalink / raw)
  To: gcc

On 06/07/11 16:08, Richard Guenther wrote:

>
> See cgraph.c:clone_function_name, it uses the NO_DOT_IN_LABEL
> and NO_DOLLAR_IN_LABEL target macros and ASM_FORMAT_PRIVATE_NAME.  I
> don't see where a '?' should
> enter this picture anywhere.
>

Thanks, exactly what I needed!

Thanks also to Jakub who replied 'in-sync' with you immediatelly after.

Why are NO_DOLLAR_IN LABEL and NO_DOT_IN_LABEL not listed in the "Output 
and Generation of Labels" instead of "Misc". The former sounds like it's 
a better fit to describe these macros.

-- 
PMatos

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-06 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-06 15:03 GCC 4.6.1 likes to rename my functions Paulo J. Matos
2011-07-06 15:08 ` Richard Guenther
2011-07-06 15:42   ` Paulo J. Matos
2011-07-06 15:11 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).