[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 for-next 2/2] x86/string: Use compiler __builtin_str*() where possible



>>> On 12.05.17 at 16:34, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/include/asm-x86/string.h
> +++ b/xen/include/asm-x86/string.h
> @@ -10,4 +10,12 @@
>  #define __HAVE_ARCH_MEMSET
>  #define memset(s, c, n)       __builtin_memset(s, c, n)
>  
> +#define strcmp(s1, s2)        __builtin_strcmp(s1, s2)
> +#define strncmp(s1, s2, n)    __builtin_strncmp(s1, s2, n)
> +#define strcasecmp(s1, s2)    __builtin_strcasecmp(s1, s2)
> +#define strchr(s1, c)         __builtin_strchr(s1, c)
> +#define strrchr(s1, c)        __builtin_strrchr(s1, c)
> +#define strstr(s1, s2)        __builtin_strstr(s1, s2)
> +#define strlen(s1)            __builtin_strlen(s1)

If the lack of __HAVE_ARCH_* additions is intentional here, why
do you keep them for mem*()? In any event does their absence
result in __builtin_str*() being (re-)declared in xen/string.h, which
is at least pointless.

Of course the same reservations regarding function pointer use
apply here.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.