Messages in this thread | | | Date | Thu, 23 Apr 2009 08:09:17 +0200 | From | Andi Kleen <> | Subject | Re: [PATCH] X86-32: Let gcc decide whether to inline memcpy was Re: New x86 warning |
| |
> > It's a very attractive patch because it removes a lot of code: > > I think this patch is great. Perhaps this would be a good time to also > clean out memset for x86_32? (If needed, I can start a new email
Yes looks reasonable. You can add
Reviewed-by: Andi Kleen <ak@linux.intel.com>
if you fix the comment below.
In fact it should be synced to do the same as on 64bit which already does all that and was originally written for gcc 3.1/3.2 ...
-Andi > +void *__memset(void *s, char c, size_t count) > +{ > + int d0, d1; > + asm volatile("rep\n\t" > + "stosb" > + : "=&c" (d0), "=&D" (d1) > + : "a" (c), "1" (s), "0" (count) > + : "memory"); > + return s; > +} > +EXPORT_SYMBOL(__memset);
I suspect _memset is not needed anymore, just memset() alone should be enough. So remove the wrapper below.
> + > void *memset(void *s, int c, size_t count) > { > return __memset(s, c, count); > -- > 1.6.2 >
-- ak@linux.intel.com -- Speaking for myself only.
| |