qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v1 08/15] s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes
Date: Tue, 12 Feb 2019 11:07:44 -0800	[thread overview]
Message-ID: <43fda672-487e-fef9-17c8-ce0657f27dbe@linaro.org> (raw)
In-Reply-To: <20190212110308.13707-10-david@redhat.com>

On 2/12/19 3:03 AM, David Hildenbrand wrote:
> We already forward the 3 bits correctly in the translation functions. We
> also have to handle them properly and check for specification
> exceptions.
> 
> Setting an invalid rounding mode (BFP only, all DFP rounding modes)
> results in a specification exception. Setting unassigned bits in the
> fpc, results in a specification exception.
> 
> This fixes LOAD FPC (AND SIGNAL), SET FPC (AND SIGNAL). Also for,
> SET BFP ROUNDING MODE, 3-bit rounding mode is now explicitly checked.
> 
> Notes:
> 1. Use "float_round_to_zero" for now to handle "Round to prepare for
>    shorter precision". Looking at the PoP "Summary of Rounding and Range
>    Actions" for BFP. They differ when it comes to tiny values.
> 2. TCG_CALL_NO_WG is required for sfpc handler, as we now inject
>    exceptions.
> 
> We won't be modeling abscence of the "floating-point extension facility"
> for now, not necessary as most take the facility for granted without
> checking.
> 
> z14 PoP, 9-23, "LOAD FPC"
>     When the floating-point extension facility is
>     installed, bits 29-31 of the second operand must
>     specify a valid BFP rounding mode and bits 6-7,
>     14-15, 24, and 28 must be zero; otherwise, a
>     specification exception is recognized.


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

> +    /*
> +     * FIXME: we actually want something like round_to_odd, but that does not
> +     * support all data types yet.
> +     */
> +    float_round_to_zero,

Yes, you want round_to_odd.  I suppose that's not valid for float128 right now?


r~

  reply	other threads:[~2019-02-12 19:19 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=43fda672-487e-fef9-17c8-ce0657f27dbe@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@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).