Re: undefined reference to __udivdi3 (gcc-4.3)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Robert Hancock
Date: Sunday, May 4, 2008 - 10:35 am

Christian Kujau wrote:

I assume it's one or both of these loops in arch/x86/xen/time.c 
do_stolen_accounting() that are being optimized into a divide which 
generates a libgcc call:

	while (stolen >= NS_PER_TICK) {
		ticks++;
		stolen -= NS_PER_TICK;
	}

or

	while (blocked >= NS_PER_TICK) {
		ticks++;
		blocked -= NS_PER_TICK;
	}

I seem to recall in one previous case we added some dummy assembly code 
to stop gcc from doing this. Not sure if that is a sustainable fix, though..
--
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, Jeremy Fitzhardinge, (Wed May 14, 3:52 am)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 5:58 am)