Subject: Re: mips kernel profiling?
To: Ethan Solomita <ethan@geocast.com>
From: Michael L. Hitch <mhitch@lightning.msu.montana.edu>
List: port-mips
Date: 04/19/2000 21:40:21
On Wed, 19 Apr 2000, Ethan Solomita wrote:

> 	To reply to myself, it seems that it's the cross compiler that is
> busted. When I compile using the native MIPS gcc the code is correct --
> the .s file created via -S option to gcc does the "addiu $sp,$sp,-8"
> *before* the jump to mcount, not in the branch delay slot. The cross
> compiler optimizes it into the branch delay slot.
> 
> 	However it looks like the .s files that come out of gcc are laid out
> without taking the branch delay slot into account, ie. that appears to
> come at a later stage. This leaves the cross-compiler's .s file as
> wrong.

  Ah - your cross compiler needs any local changes NetBSD has made to the
compiler;  the in-tree version contains the fix in
src/gnu/dist/egcs/config/mips/mips.h.

--
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA