[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-ppc] PowerPC Decimal Floating Point
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [Qemu-ppc] PowerPC Decimal Floating Point |
Date: |
Wed, 12 Feb 2014 08:38:04 +0100 |
On 11.02.2014, at 18:14, Tom Musta <address@hidden> wrote:
> QEMU is currently lacking support for the Decimal Floating Point category of
> instructions
> (see Power ISA V2.07 Chapter 6). I intend to add this support.
>
> Has this topic been investigated before and if so can anyone point me to that
> discussion?
> A Google search came up empty for me.
>
> My proposal is to incorporate the libdecnumber component of libdfp
> (http://www.eglibc.org/cgi-bin/viewvc.cgi/libdfp/trunk/) in a manner
> analogous to how
> softfloat is used for binary floating point. So, for example, the helper for
> the dadd
> instruction would look something like the following:
>
> - map FPSCR state to a decContext.
> - convert the contents of the source FPRs to decNumbers (decimal64ToNumber).
> - call decNumberAdd
> - convert the resultant decNumber to DPD (decimal64FromNumber)
> - update FPSCR per the decContext.status and result.
>
> Comments?
I think that approach makes a lot of sense, but let's ask Richard and Peter as
well.
Alex