Q powerpc new exception processing.

Sergei Organov osv at javad.ru
Tue Oct 24 09:15:45 UTC 2000


Joel Sherrill <joel.sherrill at oarcorp.com> writes:

> Charles-Antoine Gauthier wrote:
[...]
> > stfs CONVERTS the content of a double precision FPR to single precision
> > before storing to memory, while lfs CONVERT from single to double
> > precision on a load. Clearly, using stfs/lfs is wrong.
> >
> > Maybe the original author can explain what we don't understand.
>
> This code may indeed be unneccessary then.  THe original PowerPC port
> was
> to a 403 and the FP code was based on "the architecture book" with no
> use on real HW until later.  This code may never have been used or
> necessary.
>
> My understanding is that (on paper) the PowerPC architecture does
> not require implementations to have 64-bit floating point HW and allows
> for 32-bit FPUs.  This allowance may never have bene taken in practice.

In the old exception processing (OEP) code there are two versions of FP state
save/restore routines: 'single' and 'double'. 'single' was active only for
PowerPC 602, as far as I can see. All other FP capable processors were using
'double' version. However, in new exception processing (NEP) only 'single'
version exists. This is very strange because both processors that are using
NEP (750 and 640) apparently have double FPU. All this leads me to conclusion
that NEP code is broken at least for FP management.

There is another thing about NEP that I'd like to mention in context of
proposed transition of all PPC BSPs to NEP. Unlike OEP where exception could
be dispatched to different handlers by means of registering handler in the
table managed by common OEP code, in NEP single routine
(C_dispatch_irq_handler) is called. The default implementation of this routine
(found in 'libbsp/powerpc/shared/irq/irq.c'), however, seems to be very tied
to one particular architecture, so many BSPs will be forced to have their own
exception dispatch implementation. I believe some dispatch policy common to
all BSPs should be established to make transition of other BSPs to NEP easier.


BR,
Sergei Organov.




More information about the users mailing list