[PATCH] Apply the regparm and stdcall attributes to internal regex functions
Jakub Jelinek
jakub@redhat.com
Wed Dec 17 13:46:00 GMT 2003
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
More information about the Libc-alpha
mailing list