This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: memcpy vs memmove and structure returns
- To: rittle at latour dot rsch dot comm dot mot dot com
- Subject: Re: memcpy vs memmove and structure returns
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Mon, 16 Apr 2001 22:53:53 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org
> From: Loren James Rittle <rittle@latour.rsch.comm.mot.com>
>
> In article <200104141306.JAA25897@caip.rutgers.edu>,
> Kaveh R. Ghazi <ghazi@caip.rutgers.edu> wrote:
>
> > > I've checked in Loren's patch from March to the mainline and branch
> > > trees to fix a codegen regression on several platforms
> > > (execute/20010124-1.c).
>
> >Are we considering svr3 platforms that are missing memmove?
>
> Do they define TARGET_MEM_FUNCTIONS?
Yes, grep TARGET_MEM_FUNCTIONS gcc/config/* yields among others:
gcc/config/svr3.h:#define TARGET_MEM_FUNCTIONS
> If yes, then no we aren't. But we could ask: Why does a target
> missing a mem* function defining TARGET_MEM_FUNCTIONS?
memmove was added in ANSI C, svr3 predates that but has all of the
other mem* functions and none of the BSD ones. Therefore it was
entirely correct/necessary to define TARGET_MEM_FUNCTIONS for svr3
before gcc started emitting memmove. Now that we are emitting
memmove, some pre-ANSI systems derived from svr3 won't work, but as
noted before we probably don't care.
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions