This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: [PATCH] Apply the regparm and stdcall attributes to internal regex functions


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


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