This is the mail archive of the gcc@gcc.gnu.org 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: expanding builtins


> You can:
> #include <string.h>
> ...
> extern __typeof(memcpy) my_memcpy __asm ("memcpy");
> 
> and use my_memcpy instead of memcpy in the place where you want to force
> library call.
Thanks Jakub!  That worked very well.

Jim.

> Or you can use memcpy builtin, just tell GCC it should forget everything
> it knows about alignment of whatever you know is not aligned.
> void *psrc = (void *) src;
> __asm ("" : "+r" (psrc));
> memcpy (dest, psrc, len);


-- 
James Lemke   jim@TheLemkes.ca   Orillia, Ontario
1992 ST1100, STOC #3750;   FWD# M:245401 H:246889
Life is what happens while you're busy making other plans. --John Lennon


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