This is the mail archive of the
mailing list for the GCC project.
Re: help in deciphering a call RTL instruction
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: "Sunzir Deepur" <sunzird at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 23 Oct 2007 21:52:57 +0200
- Subject: Re: help in deciphering a call RTL instruction
- References: <firstname.lastname@example.org>
> 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
> (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.