Subject: Re: Optimizing the kernel
To: None <port-alpha@NetBSD.ORG>
From: John Birrell <cimaxp1!jb@cimlogic.com.au>
List: port-alpha
Date: 08/15/1995 12:10:48
> > I was able to boot a kernel compiled with -O, on a 3000/400.  I
> > couldn't get it to work using the native compiler, but it worked with
> > the cross compiler. I have no idea why.
> 
> interesting.  i'm hoping to upgrade the compiler tools, etc., soon.
> 

I experienced *some* grief using optimizing when re-compiling libc recently.
The problem was that strtol() didn't work, causing chmod fail... I tracked it
down to the place where the code does a divide followed by a remainder. Without
optimizing, the code worked fine. With optimizing, the compiler thinks that
the divide function doesn't touch temporary registers and it left out the 
instructions to fill the temporary registers again before doing the remainder
call.

Knowing that the upgrade of the compiler tools is 'on its way', I just avoid
using optimization for the time being.

-- 
John Birrell                                CIMlogic Pty Ltd
jb@cimlogic.com.au                          119 Cecil Street
Ph  +61  3 9690 9600                        South Melbourne Vic 3205
Fax +61  3 9690 6650                        Australia
Mob +61 18  353  137