This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
A question about memcpy
- From: Eric Fisher <joefoxreal at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 2 Nov 2005 14:38:23 +0800
- Subject: A question about memcpy
Hi,
When I compile such c codes as following,
int a=0xffffffff,i;
int sra[32]={0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
0xfffffffa,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff};
the compiler will come out the error messange like undefined reference
to `memcpy'.
The dumped rtl shows,
(call_insn 21 20 22 (parallel [
(set (reg:SI 2 $2)
(call (mem:SI (symbol_ref:SI ("memcpy") [flags 0x41]
<function_decl 0x101cea00 memcpy>) [0 S4 A32])
(const_int 16 [0x10])))
(clobber (reg:SI 30 $30))
]) -1 (nil)
(expr_list:REG_EH_REGION (const_int 0 [0x0])
(nil))
(expr_list (use (reg:SI 6 $6))
(expr_list (use (reg:SI 5 $5))
(expr_list (use (reg:SI 4 $4))
(nil)))))
Can you where is the memcpy? And how the compiler call this funcion
implicitly?
Need I implement it?
Thanks.
Eric.