Subject: Using current gcc & binutils and NetBSD -current speeds
To: None <port-pc532@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: port-pc532
Date: 11/24/2002 17:21:22
Hi folks (and inparticular Ian(!)),

I have managed to build a kernel with current gcc and binutils.  Most
files built with -O2, but I needed a build a couple with -O1 to avoid

	internal compiler error: in general_operand, at recog.c:1023

type errors.


I also needed to change <machine/cpufunc.h> in the movs macro:

-               : "r0", "memory" \
+               : /* XXX "r0", XXX */ "memory" \

to stop some

	error: asm-specifier for variable `r0' conflicts with asm clobber list

errors.

Next, I needed to use -n with ld to link an nmagic kernel, I have
something that boots ok to single user, but fails soon after trying to
go to multi user.

	...
	/dev/rsd0d: file system is clean; not checking
	fatal abort trap in supervisor mode
	trap type=2, pc=0xe010dd0b, tear=0xe23c7000, msr=0xa2
	panic: trap
	syncing disks... fatal abort trap in supervisor mode
	trap type=2, pc=0xe00c01cc, tear=0x10c, msr=0xa2
	panic: trap

Jason Thorpe mentioned that he thought there was still one codegen problem
outstanding ("Hard registers in RTL templates, -fomit-frame-pointer" on
the gcc lists?).


On a different note, something is slowing down NetBSD -current.  Here's
the times to compile pc532/machdep.c (after a sequence of "boot to
single user", "mount -a", "swapon -a"):

	NetBSD 1.5X: 55.189u  20.468s  2:06.78 59.6% 0+0k 71+63io  5364pf+0w
	NetBSD 1.6C: 56.360u 482.015s  9:38.15 93.1% 0+0k 75+61io 62491pf+1w
	NetBSD 1.6D: 56.027u 488.959s  9:44.56 93.2% 0+0k 75+59io 63718pf+1w
	NetBSD 1.6J: 56.829u 643.266s 12:26.71 93.7% 0+0k 71+63io 90841pf+1w
	NetBSD 1.6K: 56.683u 219.568s 11:55.53 38.6% 0+0k 71+57io 82888pf+1w

That's a pretty remarkable slowdown in the last twelve months.  I'm building
a profiling kernel (does that work?!) to look into this further...

Simon.
--
Simon Burge                                   <simonb@wasabisystems.com>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/