On Thu, Aug 19, 2004 at 12:46:48PM +0200, Thierry Godefroy wrote:
> 
> On Thu, 19 Aug 2004 01:28:34 +0200, Richard Zidlicky wrote:
> 
> > 
> > On Thu, Aug 19, 2004 at 12:16:04AM +0200, Thierry Godefroy wrote:
> > > 
> > > Hello...
> > > 
> > > I tried to compile the v2.4.27 kernel for the Q60 today, but I came
> > > across a strange assembler error.
> > > 
> > > I get:
> > > 
> > > gcc -D__KERNEL__ -I/usr/src/linux-2.4.27/include -Wall -Wstrict-prototypes
> > > -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
> > > -pipe -fno-strength-reduce -ffixed-a2 -m68060   -nostdinc -iwithprefix
> > > include -DKBUILD_BASENAME=setup  -DEXPORT_SYMTAB -c setup.c
> > > {standard input}: Assembler messages:
> > > {standard input}:291: Error: invalid instruction for this architecture;
> > > needs fpu (68040, 68060 or 68881/68882) -- statement `frestore -4(%a6)'
> > > ignored
> > > make[1]: *** [setup.o] Error 1
> > > 
> > > The weird thing is that the -m68060 option is passed and 'as' complains
> > > about no 68060 fpu...
> > 
> > looks like a ".chip" directive from some earlier asm statement
> > did something strange, can you look at the assembler output?
> 
> Yep, that's it apparently... The assembler produced (line 273 onwards):
> -----------
> #APP
>       .chip 68060; movec %pcr,%d2; .chip 68k
> #NO_APP

indeed, that is a recent change.


> I changed it for:
> asm __volatile__ (".chip 68060; frestore %0" : : "m" (zero));
> 
> and everything seems to compile fine (resulting kernel still to be tested
> though)... Of course, there should be a different .chip directive for each
> processor type, I think (though frestore is perhaps assembled into the same
> opcode for all variations of CPU/FPU... I didn't check it either). It would
> be interesting to see what was in setup.c for Linux v2.4.23 (or 2.4.26),
> but I cruelly lack time and I no more got the sources handy.
> 
> Nevertheless, it still sounds strange to me that "as" seems to ignore the
> -m68060 option passed to gcc (or is gcc not passing that option to "as" ?),
> as the '.chip 68060' should be implicit with -m68060 on...

pretty strange, ".chip m68k" should reset to the value defined by "-m"
or the default which would be 68020+fpu.
Strange thing is that it did never trigger before.. there are thousands
more .chip m68k directives in the sources and they always used to work
fine.

This is not Q40 specific, so has anyone else seen that?

BTW seems like you are the last hero compiling kernels on a m68k :)

Richard

Reply via email to