This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386 GCC-3.4 & Mandrake-9.2 GCC-3.3.1 non-inline memset/memcpy
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 3 Nov 2003 17:07:10 +0100
- Subject: Re: i386 GCC-3.4 & Mandrake-9.2 GCC-3.3.1 non-inline memset/memcpy
- References: <20031103144512.29091.qmail@web11804.mail.yahoo.com>
> Hello,
>
> For a project of mine (gujin at sourceforge) I cannot have non inline
> memset and memcpy because I am generating i80386 real mode code in two
> different code segments and have only one link (so name of functions
> in each segments have to be different).
> Most version of GCC up to GCC-3.4 do not insert implicit memset/memcpy
> in my code and I am not often using explicitely these functions. I am
> more coding things like:
>
> struct my_big_struct_type my_struct = (struct my_big_struct_type){};
>
> and so on ia32 usually a "rep stosl" is generated (the size of the
> structure is constant!).
>
> But for GCC-3.4 and Mandrake-9.2 GCC-3.3.1 it is no more the case,
> real call to those functions is done. I could generate non inline
> memset and memcpy for each code segment I am using by renamimg and
> prefixing memset and memcpy by the name of the segment - but it will
> not be very efficient and I wonder if there were an option to go back
> to the standard "rep stosl" and "rep cmpsl" inline.
Perhaps -minline-all-stringops will help you?
GCC preferes a call for very large blocks as it expects library
implementation to be smarter than pure rep movsl.
Honza
>
> Note that this is maybe related to the thread "HORRIBLE inliner
> defaillance" in:
> http://gcc.gnu.org/ml/gcc/2003-10/msg01305.html
>
> Thanks for any pointer,
> Etienne.
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com