This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] Apply the regparm and stdcall attributes to internal regex functions
- From: Jakub Jelinek <jakub at redhat dot com>
- To: bonzini at gnu dot org
- Cc: libc-alpha at sources dot redhat dot com
- Date: Wed, 17 Dec 2003 12:40:38 +0100
- Subject: Re: [PATCH] Apply the regparm and stdcall attributes to internal regex functions
- References: <3FE05C17.8040700@polimi.it>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Dec 17, 2003 at 02:37:27PM +0100, Paolo Bonzini wrote:
> This achieves a small but consistent 1% improvement in the sed testsuite
> (gcc 3.4 has unit-at-a-time mode which does this at -O2).
Please s/INTERNAL_ATTR/internal_function/g and
only #define it #ifndef _LIBC.
#ifndef _LIBC
# ifdef __i386__
# define internal_function __attribute ((regparm (3), stdcall))
# else
# define internal_function /* empty */
# endif
#endif
IMHO we don't need several different macros doing the same thing.
> diff -rU3 sed-4.0.9/lib/regex_internal.h sed-4.0b/lib/regex_internal.h
> --- sed-4.0.9/lib/regex_internal.h 2003-12-15 12:15:56.000000000 +0100
> +++ sed-4.0b/lib/regex_internal.h 2003-12-17 13:52:48.000000000 +0100
> @@ -349,32 +349,39 @@
>
> struct re_dfa_t;
> typedef struct re_dfa_t re_dfa_t;
> +
> +#if defined __i386__
> +#define INTERNAL_ATTR __attribute ((regparm (3), stdcall))
> +#else
> +#define INTERNAL_ATTR
> +#endif
> +
Jakub