Thread (5 messages) 5 messages, 4 authors, 2006-12-04

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

From: Kim Phillips <hidden>
Date: 2006-11-22 22:10:02

On Thu, 23 Nov 2006 08:34:34 +1100
Benjamin Herrenschmidt [off-list ref] wrote:
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help