[U-Boot-Users] [PATCH 2/2][MIPS] Add lib_mips/string.c and stop using inline asm functions.
Wolfgang Denk
wd at denx.de
Mon Aug 27 14:52:21 CEST 2007
In message <46D296A8.3000407 at necel.com> you wrote:
> [MIPS] Add lib_mips/string.c and stop using inline asm functions.
>
> From: Shinya Kuribayashi <shinya.kuribayashi at necel.com>
>
> We MIPS stop using inline string functions as other ARCHs do so, since
> the optimized inline asm versions are not small.
I agree with this change in general, but the implementation looks
broken to me.
> +++ b/include/asm-mips/string.h
> @@ -10,6 +10,12 @@
> #ifndef _ASM_STRING_H
> #define _ASM_STRING_H
>
> +/*
> + * We don't do inline string functions, since the
> + * optimised inline asm versions are not small.
> + *
> + * All the following inline asm functions are moved to lib_mips/string.c.
> + */
Moving *inline* functions to lib_mips/string.c makes no sense to me.
> #define __HAVE_ARCH_STRCPY
> +extern char *strcpy(char *__dest, __const__ char *__src);
> +#if 0
> static __inline__ char *strcpy(char *__dest, __const__ char *__src)
> {
> char *__xdest = __dest;
> @@ -40,8 +48,11 @@ static __inline__ char *strcpy(char *__dest, __const__ char *__src)
>
> return __xdest;
> }
> +#endif
Please don't do this. Instead of "#if 0", please remove the code.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A failure will not appear until a unit has passed final inspection.
More information about the U-Boot
mailing list