[PATCH] Add support for FP emulation for the e300c2 core

Kim Phillips kim.phillips at freescale.com
Thu Nov 23 09:09:57 EST 2006


On Thu, 23 Nov 2006 08:34:34 +1100
Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:

> 
> > +BEGIN_FTR_SECTION
> > +/*
> > + * certain freescale cores treat 'normal' floating point instructions
> > + * as FP Unavail exception.  Redirect to normal illegal/emulation handling.
> > + */
> > +	b 	ProgramCheck
> > +END_FTR_SECTION_IFSET(CPU_FTR_FP_TAKES_FPUNAVAIL)
> >  	EXCEPTION_PROLOG
> >  	bne	load_up_fpu		/* if from user, just load it up */
> >  	addi	r3,r1,STACK_FRAME_OVERHEAD
> 
> Do you absolutely need that ? Is there any way those cores will actually

The feature section provides a means of distinguishing among other processors (i.e. those with FPUs) at runtime.

> send a "normal" FPUnavail exception ? If not, don't bother. There aren't

no, it never takes the Illegal instruction/ProgramCheck exception by itself when a FP insn is in the pipe.

> that many CPU feature bits left so let's not use one for something that
> never happens.
> 
this happens when executing a binary with FP instructions compiled in.  This feature will be reused when support for other FPUless core variants coming from freescale are added.

Kim



More information about the Linuxppc-dev mailing list