Subject: Re: mac68k and gcc 4
To: None <current-users@NetBSD.org, port-mac68k@NetBSD.org>
From: Izumi Tsutsui <email@example.com>
Date: 09/09/2006 13:57:55
> > I tried changing it to
> > use "a6" unconditionally, but that doesn't work either:
> > /usr/src.local/sys/arch/mac68k/mac68k/macrom.c: In function 'mrg_aline_super':
> > /usr/src.local/sys/arch/mac68k/mac68k/macrom.c:763: error: %a6 cannot be used in asm here
> > The comments say "save a6" and "restore a6", but I don't see where
> > that happens. They also say that it'll possibly change A6, but I don't
> > see when that would happen either. Are there some ROM toolbox calls
> > that will modify A6? That seems like it'd be a bad thing for a
> > subroutine to not restore the frame pointer...
> > Anyways, I don't know if it's the right thing to do, but I just
> > removed fp/a6 from the list of clobbered registers.
> I guess it's okay, because as mentioned in the warning,
> there is nothing to do by compiler if the frame pointer
> is actually modified in the asm block.
> If the called routine actually breaks the frame pointer,
> we should save it before calling the function in the asm
> manually, as the comment said.
I've committed a fix which just removes fp/a6 from clobbered list,
and now GENERIC compiles with gcc4.
Could anyone test a gcc4 GENERIC kernel on real mac68k machines?
BTW, did a GENERIC compiled with gcc3 even work?
For PR port-mac68k/32583, does the latest patch in the PR just work
but not committed yet?
How about port-mac68k/33636?