Subject: Re: gcc 2.95.2 sanity check, please
To: Eric Schnoebelen <eric@cirr.com>
From: Greg A. Woods <woods@weird.com>
List: port-alpha
Date: 01/23/2004 16:29:09
[ On Thursday, January 22, 2004 at 16:54:06 (-0600), Eric Schnoebelen wrote: ]
> Subject: gcc 2.95.2 sanity check, please
>
> I'm digging through the vnlock's for Stephen Jones, and in
> looking at the crash dumps, I'm seeing an interesting code path
> being taken..
> 
> Notably, the following statement,
> 
> 	if (flags & LK_TYPE_MASK) {	/* sys/kern/vfs_subr.c:1155 */
> 
> is evaluating true, when the surrounding function is called as
> 
> 	vget (vp=0xfffffc0022eeeeb8, flags=0);
> 
> Now, I noticed that SMJ had ``makeoptions COPTS="-O2 -mbwx"''
> set in the kernel configuration file..  This triggered a memory
> that gcc optimization levels greater than -O1 don't work
> reliabily on the alpha.
> 
> Is my memory (that optimization levels greater than -O1 don't
> work) correct?

"-O2" works well enough on the netbsd-1-6 branch for general code, well
enough that I can re-build my system using binaries that it compiled
itself -- in fact it's doing it again right now.

	$ gcc -v 
	Using builtin specs.
	gcc version 2.95.3 20010315 (release) (NetBSD nb3)

Expressions as simple as that above also occur in a bazillion other
places in the whole code-base -- it's just an integer mask and test.

(There is some very bizzare problem causing a core dump in bonnie right
when it goes to print the results -- I think I've mentioned it before.
The stack backtrace is useless and I've not had time yet to try walking
through the machine code instruction by instruction to see if I can see
what's going wrong.)

-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>