From: Alexander Graf <agraf@suse.de>
To: Tom Musta <tommusta@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [RFC 00/12] target-ppc: Decimal Floating Point
Date: Fri, 11 Apr 2014 17:31:50 +0200 [thread overview]
Message-ID: <53480AE6.5010304@suse.de> (raw)
In-Reply-To: <1394723588-6072-1-git-send-email-tommusta@gmail.com>
On 13.03.14 16:12, Tom Musta wrote:
> This patch series provides a prototype of Decimal Floating Point (DFP) instruction
> support in QEMU. The topic was briefly discussed here:
> http://lists.nongnu.org/archive/html/qemu-ppc/2014-02/msg00129.html
>
>
> I. Overview
>
> The core of the DFP model is a library named libdecnumber, which is a sub-library
> of GCC's libdfp. Libdecnumber's model uses an expanded internal representation
> of a decimal floating point number as:
>
> - exponent (base 10)
> - the number of digits (aka declets)
> - flags (sign bit and "special" bits for NaNs and infinities)
> - an array of units. Each unit contains DECPUN declets.
>
> Libdecnumber provides routines for various arithmetic operations (e.g. decNumberAdd for
> addition) as well as converters for going to/from binary form.
>
> PowerPC's support of DFP uses Densely Packed Decimal (DPD) format. The standard floating
> point registers are re-used to hold DFP operands. There are typically PowerPC instructions
> for both the long (64 bit) and extended (128 bit, aka quad) formats. The extended format
> instructions use adjacent pairs of FPRs to hold the 128 bit operands.
>
>
> II. A Simple Example
>
> PowerPC DFP instructions are implemented using helpers, which in turn use libdecnumber
> routines to perform the detailed computations. This is similar to how softfloat is used
> to model binary floating point instructions.
>
> For example, the implementation of the helper for DFP Add Long (dadd) looks like this:
>
> 1) Establish a libdecnumber context for 64-bit computation (decContext)
> 2) Convert the two source FPRs from DPD to decNumbers (the expanded internal representation)
> 3) Invoke the add operation (decNumberAdd)
> 4) Inspect the context's flags for various exception situations (e.g. overflow), mapping
> them to the corresponding FPSCR status flags.
> 5) Convert the summand to DPD form and store into the target FPR.
>
> The helper for the DPD Add Extended (daddq) is nearly identical. It differs only in that
> it establishes a 128 bit context and the conversions are from and to 128 bit DPD format.
>
>
> III. Integration of libdecnumber in QEMU
>
> The appoach taken here is direct and simple:
>
> 1) A copy of libdecnumber code is imported into QEMU. The header files are placed under
I don't think this is possible. Libdecnumber is GPLv3+ code while QEMU
overall is licensed at GPLv2 only. Gotta love licenses...
Is there an older, GPLv2 licensed version available?
Alex
next prev parent reply other threads:[~2014-04-11 15:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 15:12 [Qemu-devel] [RFC 00/12] target-ppc: Decimal Floating Point Tom Musta
2014-03-13 15:12 ` [Qemu-devel] [RFC 01/12] target-ppc: Introduce libdecnumber Code Tom Musta
2014-03-13 15:12 ` [Qemu-devel] [RFC 02/12] target-ppc: Prepare libdecnumber for QEMU include structure Tom Musta
2014-03-13 15:12 ` [Qemu-devel] [RFC 03/12] target-ppc: Modify dconfig.h to Integrate with QEMU Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 04/12] target-ppc: Change gstdint.h to stdint.h Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 05/12] target-ppc: Eliminate redundant declarations Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 06/12] target-ppc: Eliminate Unused Variable in decSetSubnormal Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 07/12] target-ppc: Enable Building of libdecnumber Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 08/12] target-ppc: Define FPR Pointer Type for Helpers Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 09/12] target-ppc: Introduce Translation Macros for DFP Arithmetic Forms Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 10/12] target-ppc: Introduce DFP Helper Utilities Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 11/12] target-ppc: Introduce DFP Post Processor Utilities Tom Musta
2014-03-13 15:13 ` [Qemu-devel] [RFC 12/12] target-ppc: Introduce DFP Add Tom Musta
2014-04-11 15:31 ` Alexander Graf [this message]
2014-04-11 16:12 ` [Qemu-devel] [Qemu-ppc] [RFC 00/12] target-ppc: Decimal Floating Point Tom Musta
2014-04-11 16:16 ` Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53480AE6.5010304@suse.de \
--to=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=tommusta@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).