[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: building kernel



Alexander Kotelnikov <sacha@debian.org> writes:

> Can anyone tell me, why linux kernel is built with -mno-fp-regs and
> -Wa,-mev6, (see linux/arch/alpha/Makefile).

The kernel must not use floating point registers, because they are not
saved on context switch from user space to kernel space. Not using
floating point math isn't enough, because gcc uses FP registers as
register spilling space (which seems to me of doubtful usefulness,
because it isn't faster than memory...)

-Wa,-mev6 is needed so the assembler will accept EV6 opcodes. It won't
affect the generated code, it just avoid the assembler barfing.

> It is also interesting, when -mno-soft-float and -mfp-reg are essential
> and not dangerous. Kernel built with -mno-soft-float -mfp-regs -Wa,mev6
> oops'es at boot time,

Well, that's not surprising...

> without -Wa,mev6 system boots but many programs do not work.

but this is weird... it really shouldn't affect the generated code.

> BTW, what for kernel is built with -ffixed-8?

Register 8 is hardwired to "current" (the running process context),
and should therefore not be used by the compiler.

-- 
	Falk



Reply to: