Re: [PATCH] common implementation of iterative div/mod

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Wednesday, May 14, 2008 - 3:50 am

Jeremy Fitzhardinge wrote:

Hmm works here. What compiler do you use? Normally gcc should 
recognize the memcpy is just two constant stores and always inline even with -Os.

nm --dynamic arch/x86/vdso/vdso.so
0000000000000000 A LINUX_2.6
ffffffffff7007e0 T __vdso_clock_gettime
ffffffffff700820 T __vdso_getcpu
ffffffffff700750 T __vdso_gettimeofday
ffffffffff7007e0 W clock_gettime
ffffffffff700820 W getcpu
ffffffffff700750 W gettimeofday

Anyways if your compiler or config cannot get that right it would need
to switch to __inline_memcpy(), but that would be slower or explicit
copying field by field.

If it's a common problem we could also implement a build time check,
but normally such problems should be already caught in code review.

-Andi

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: undefined reference to __udivdi3 (gcc-4.3), Robert Hancock, (Sun May 4, 10:35 am)
Re: undefined reference to __udivdi3 (gcc-4.3), Segher Boessenkool, (Sun May 4, 3:19 pm)
Re: undefined reference to __udivdi3 (gcc-4.3), Jeremy Fitzhardinge, (Wed May 7, 2:29 am)
[PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Thu May 8, 8:16 am)
Re: [PATCH] common implementation of iterative div/mod, Andrew Morton, (Thu May 8, 1:26 pm)
Re: [PATCH] common implementation of iterative div/mod, Segher Boessenkool, (Thu May 8, 1:52 pm)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Thu May 8, 2:57 pm)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Thu May 8, 3:00 pm)
Re: [PATCH] common implementation of iterative div/mod, Christian Kujau, (Fri May 9, 4:45 am)
Re: [PATCH] common implementation of iterative div/mod, Andrew Morton, (Tue May 13, 11:46 pm)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 12:33 am)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 2:55 am)
Re: [PATCH] common implementation of iterative div/mod, Andi Kleen, (Wed May 14, 3:50 am)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 3:52 am)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 5:58 am)