qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, Thomas Huth <thuth@redhat.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	David Hildenbrand <david@redhat.com>
Subject: [Qemu-devel] [PATCH v3 15/15] s390x: Add floating-point extension facility to "qemu" cpu model
Date: Mon, 18 Feb 2019 13:27:10 +0100	[thread overview]
Message-ID: <20190218122710.23639-16-david@redhat.com> (raw)
In-Reply-To: <20190218122710.23639-1-david@redhat.com>

The floating-point extension facility implemented certain changes to
BFP, HFP and DFP instructions.

As we don't implement HFP/DFP, we can ignore those completely. Related
to BFP, the changes include
- SET BFP ROUNDING MODE (SRNMB) instruction
- BFP-rounding-mode field in the FPC register is changed to 3 bits
- CONVERT FROM LOGICAL instructions
- CONVERT TO LOGICAL instructions
- Changes (rounding mode + XxC) added to
-- CONVERT TO FIXED
-- CONVERT FROM FIXED
-- LOAD FP INTEGER
-- LOAD ROUNDED
-- DIVIDE TO INTEGER

For TCG, we don't implement DIVIDE TO INTEGER, and it is harder to
implement, so skip that. Also, as we don't implement PFPO, we can skip
changes to that as well. The other parts are now implemented, we can
indicate the facility.

z14 PoP mentiones that "The floating-point extension facility is installed
in the z/Architecture architectural mode. When bit 37 is one, bit 42 is
also one.", meaning that the DFP (decimal-floating-point) facility also
has to be inidicated. We can ignore that for now.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 target/s390x/gen-features.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index 44eca45474..e4739a6b9f 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -601,6 +601,11 @@ static uint16_t qemu_V3_1[] = {
 };
 
 static uint16_t qemu_LATEST[] = {
+    /*
+     * Only BFP bits are implemented (HFP, DFP, PFPO and DIVIDE TO INTEGER not
+     * implemented yet).
+     */
+    S390_FEAT_FLOATING_POINT_EXT,
     S390_FEAT_ZPCI,
 };
 
-- 
2.17.2

  parent reply	other threads:[~2019-02-18 12:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 12:26 [Qemu-devel] [PATCH v3 00/15] s390x/tcg: Implement floating-point extension facility David Hildenbrand
2019-02-18 12:26 ` [Qemu-devel] [PATCH v3 01/15] s390x/tcg: Fix TEST DATA CLASS instructions David Hildenbrand
2019-02-26 14:52   ` David Hildenbrand
2019-02-18 12:26 ` [Qemu-devel] [PATCH v3 02/15] s390x/tcg: Fix rounding from float128 to uint64_t/uin32_t David Hildenbrand
2019-02-18 12:26 ` [Qemu-devel] [PATCH v3 03/15] s390x/tcg: Factor out conversion of softfloat exceptions David Hildenbrand
2019-02-18 12:26 ` [Qemu-devel] [PATCH v3 04/15] s390x/tcg: Fix parts of IEEE exception handling David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 05/15] s390x/tcg: Hide IEEE underflows in some scenarios David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 06/15] s390x/tcg: Refactor SET FPC AND SIGNAL handling David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 07/15] s390x/tcg: Fix simulated-IEEE exceptions David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 08/15] s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes David Hildenbrand
2019-02-26 14:54   ` David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 09/15] s390x/tcg: Check for exceptions in SET BFP ROUNDING MODE David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 10/15] s390x/tcg: Refactor saving/restoring the bfp rounding mode David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 11/15] s390x/tcg: Prepare for IEEE-inexact-exception control (XxC) David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 12/15] s390x/tcg: Implement XxC and checks for most FP instructions David Hildenbrand
2019-02-26 14:55   ` David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 13/15] s390x/tcg: Implement rounding mode and XxC for LOAD ROUNDED David Hildenbrand
2019-02-18 12:27 ` [Qemu-devel] [PATCH v3 14/15] s390x/tcg: Handle all rounding modes overwritten by BFP instructions David Hildenbrand
2019-02-18 12:27 ` David Hildenbrand [this message]
2019-02-26 15:10   ` [Qemu-devel] [qemu-s390x] [PATCH v3 15/15] s390x: Add floating-point extension facility to "qemu" cpu model Thomas Huth
2019-02-26 14:44 ` [Qemu-devel] [PATCH v3 00/15] s390x/tcg: Implement floating-point extension facility Cornelia Huck
2019-02-26 14:56   ` David Hildenbrand
2019-02-26 15:09     ` Cornelia Huck
2019-02-28 14:28 ` Cornelia Huck

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=20190218122710.23639-16-david@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.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).