This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Optimizations on long long multiply/divide on PowerPC32 don't work


On Fri, Dec 07, 2001 at 06:09:55PM -0600, Corey Minyard wrote:
> I can see four options to solve this problem:
> 
>   1) Add __divdi3 to the linux kernel.  I don't really think this is a 
> good idea, and it shouldn't be required.
>   2) Move the conversion of the division to the function call to the 
> very last stages of the compiler.  IMHO, this is probably the best 
> option, but it's a big job to implement, I think.
>   3) Make the optimizations understand the function calls.  I don't even 
> want to think about this one.
>   4) Modify the tree conversions to do the optimizations there.  I have 
> a patch that does this (and passes all regressions), because it was 
> easy, but I consider it less optimal than option 2.

Fix that code to use shifts instead.  As far as I can see that's general
linux kernel practice.

	Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.


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