This is the mail archive of the libc-alpha@sourceware.org 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: Provide 32-bit inline string functions for >= i486


> @@ -21,28 +20,36 @@
>  # error "Never use <bits/string.h> directly; include <string.h> instead."
>  #endif
>  
> -/* The ix86 processors can access unaligned multi-byte variables.  */
> +/* Currently the only purpose of this file is to tell the generic inline
> +   macros that unaligned memory access is possible for x86-64.  */
>  #define _STRING_ARCH_unaligned	1

I think the old comment is more usefully informative.  Leave it.

> +#if !defined __x86_64__ && (defined __i486__ || defined __pentium__	      \
> +			    || defined __pentiumpro__ || defined __pentium4__ \
> +			    || defined __nocona__ || defined __atom__ 	      \
> +			    || defined __core2__ || defined __corei7__	      \
> +			    || defined __k6__ || defined __geode__	      \
> +			    || defined __k8__ || defined __athlon__	      \
> +			    || defined __amdfam10__)

Where did you get this selection of macros?  How do we verify that this
covers all compilers (and -march= settings) that we'd call ">= i486"?
There should be a comment saying that what we mean to test for is 
"i486 or better" and that this long list is the best proxy available.

I think the change is fine with any even slightly better comments.
We can continue to improve the comments after the unification/move.

Thanks,
Roland


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