All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1] s390x: Add floating-point extension facility to "qemu" cpu model
@ 2019-02-12 11:02 David Hildenbrand
  2019-02-12 11:02 ` [Qemu-devel] [PATCH v1 00/15] s390x/tcg: Implement floating-point extension facility David Hildenbrand
                   ` (16 more replies)
  0 siblings, 17 replies; 38+ messages in thread
From: David Hildenbrand @ 2019-02-12 11:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-s390x, Thomas Huth, Halil Pasic, Christian Borntraeger,
	Janosch Frank, Cornelia Huck, Richard Henderson,
	David Hildenbrand

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 19bb8ac7f8..02f6e9f475 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -593,6 +593,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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2019-02-13 19:12 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12 11:02 [Qemu-devel] [PATCH v1] s390x: Add floating-point extension facility to "qemu" cpu model David Hildenbrand
2019-02-12 11:02 ` [Qemu-devel] [PATCH v1 00/15] s390x/tcg: Implement floating-point extension facility David Hildenbrand
2019-02-12 11:02 ` [Qemu-devel] [PATCH v1 01/15] s390x/tcg: Fix TEST DATA CLASS instructions David Hildenbrand
2019-02-12 18:01   ` Richard Henderson
2019-02-12 18:17     ` David Hildenbrand
2019-02-12 11:02 ` [Qemu-devel] [PATCH v1 02/15] s390x/tcg: Fix rounding from float128 to uint64_t/uin32_t David Hildenbrand
2019-02-12 18:03   ` Richard Henderson
2019-02-12 11:02 ` [Qemu-devel] [PATCH v1 03/15] s390x/tcg: Factor out conversion of softfloat exceptions David Hildenbrand
2019-02-12 18:05   ` Richard Henderson
2019-02-12 11:02 ` [Qemu-devel] [PATCH v1 04/15] s390x/tcg: Fix parts of IEEE exception handling David Hildenbrand
2019-02-12 18:13   ` Richard Henderson
2019-02-12 11:02 ` [Qemu-devel] [PATCH v1 05/15] s390x/tcg: Hide IEEE underflows in some scenarios David Hildenbrand
2019-02-12 18:14   ` Richard Henderson
2019-02-12 11:02 ` [Qemu-devel] [PATCH v1 06/15] s390x/tcg: Refactor SET FPC AND SIGNAL handling David Hildenbrand
2019-02-12 18:55   ` Richard Henderson
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 07/15] s390x/tcg: Fix simulated-IEEE exceptions David Hildenbrand
2019-02-12 18:56   ` Richard Henderson
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 08/15] s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes David Hildenbrand
2019-02-12 19:07   ` Richard Henderson
2019-02-12 19:32     ` David Hildenbrand
2019-02-12 19:56       ` Richard Henderson
2019-02-13 12:49         ` David Hildenbrand
2019-02-13 19:11           ` Richard Henderson
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 09/15] s390x/tcg: Check for exceptions in SET BFP ROUNDING MODE David Hildenbrand
2019-02-12 19:58   ` Richard Henderson
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 10/15] s390x/tcg: Refactor saving/restoring the bfp rounding mode David Hildenbrand
2019-02-12 20:03   ` Richard Henderson
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 11/15] s390x/tcg: Prepare for IEEE-inexact-exception control (XxC) David Hildenbrand
2019-02-12 20:07   ` Richard Henderson
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 12/15] s390x/tcg: Implement XxC and checks for most FP instructions David Hildenbrand
2019-02-12 20:23   ` Richard Henderson
2019-02-13 12:52     ` David Hildenbrand
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 13/15] s390x/tcg: Implement rounding mode and XxC for LOAD ROUNDED David Hildenbrand
2019-02-12 20:25   ` Richard Henderson
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 14/15] s390x/tcg: Handle all rounding modes overwritten by BFP instructions David Hildenbrand
2019-02-12 20:29   ` Richard Henderson
2019-02-12 11:03 ` [Qemu-devel] [PATCH v1 15/15] s390x: Add floating-point extension facility to "qemu" cpu model David Hildenbrand
2019-02-12 11:04 ` [Qemu-devel] [PATCH v1] " David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.