Position independent m68k code + __builtin_memcpy

Joel Sherrill joel.sherrill at OARcorp.com
Wed May 19 17:28:30 UTC 2004


geneSmith wrote:

> Tell me to go away since this is probably really a gcc question.
> 
> When I use an old version of m68k-rtems-gcc (2.95.3) and I have a memcpy 
> call in my code it inlines it automatically (per objdump). When I run 
> the same code through the new m68k-rtems-gcc (3.2.3) I never get an 
> inline but a call to the library function (even when I change it to 
> __builtin_memcpy() and use option -fbuiltin as mentioned in the gcc 
> 3.2.3 manual.

RTEMS sets TARGET_MEM_FUNCTIONS in gcc/config/rtems.h.  Most of the
targets did this already so it became common.  RTEMS has an optimized
m68k memcpy which we prefer to use.  I don't know when precisely it
changed but gcc's cvs on that file and gcc/config/m68k/rtems.h should
be a clue.

> All I can find is that it won't inline memcpy if the length is a 
> variable. In my case it is a constant.

I assume this is related.


> Anybody know what is going on here?
> 
> Tks,
> -gene
> 
> 
> 





More information about the users mailing list