This is the mail archive of the 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: help in deciphering a call RTL instruction

> Here are two examples of the challenging RTL instructions:
> (call (mem:QI (symbol_ref:SI (\"stpcpy\") [flags 0x41] <function_decl
> 0x401f000 0 __builtin_stpcpy>) [0 S1 A8])
>         (const_int 8 [0x8]))
> Q: does this instruction call the function stpcpy or __builtin_stpcpy ?

The compiler will emit a call to stpcpy in the assembly file (modulo further 
symbol mangling).  You cannot really call __builtin_stpcpy anyway since it's 
a builtin.

>  (call (mem:QI (symbol_ref:SI (\"check_match.7758\") [flags 0x3]
> <function_decl 0x404a3e80 check_match>) [0 S1 A8])
>         (const_int 0 [0x0]))
> Q: does this instruction call the function check_match.7758 or check_match
> ?

Same as above, the pure RTL part gives the symbol name.

> In general, why do we have somtimes calls like that which (seemingly) have
> different callee targets ?

In the former case, because it's a builtin.  More generally, the RTL back-end 
is allowed to mangle symbol names at its pleasure.  You can display the RTL 
associated with a FUNCTION_DECL by invoking debug_tree on it from within GDB.

Eric Botcazou

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