[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 14/15] s390x/tcg: Handle all rou
From: |
Richard Henderson |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH v1 14/15] s390x/tcg: Handle all rounding modes overwritten by BFP instructions |
Date: |
Tue, 12 Feb 2019 12:29:13 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2/12/19 3:03 AM, David Hildenbrand wrote:
> PoP describes "Round to nearest with ties away from 0" as
> "The candidate nearest to the input value is selected. In case of a tie,
> the candidate selected is the one that is larger in magnitude."
>
> While float_round_ties_away is according to the introducing commit
> f9288a76f181 ("softfloat: Add support for ties-away rounding")
> "roundTiesToAway: the floating-point number nearest to the infinitely
> precise result shall be delivered; if the two nearest floating-point
> numbers bracketing an unrepresentable infinitely precise result are
> equally near, the one with larger magnitude shall be delivered."
>
> So this could be it if we're lucky ;)
Yep, that's right.
>
> Handle "round to prepare for shorter precision" just as when setting it
> via SET FLOATING POINT and friends.
>
> As all instructions properly check for valid rounding modes in translate.c
> we can add an assert. Fix one missing empty line.
>
> Cc: Peter Maydell <address@hidden>
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
Reviewed-by: Richard Henderson <address@hidden>
r~
- [qemu-s390x] [PATCH v1 10/15] s390x/tcg: Refactor saving/restoring the bfp rounding mode, (continued)
- [qemu-s390x] [PATCH v1 10/15] s390x/tcg: Refactor saving/restoring the bfp rounding mode, David Hildenbrand, 2019/02/12
- [qemu-s390x] [PATCH v1 11/15] s390x/tcg: Prepare for IEEE-inexact-exception control (XxC), David Hildenbrand, 2019/02/12
- [qemu-s390x] [PATCH v1 12/15] s390x/tcg: Implement XxC and checks for most FP instructions, David Hildenbrand, 2019/02/12
- [qemu-s390x] [PATCH v1 13/15] s390x/tcg: Implement rounding mode and XxC for LOAD ROUNDED, David Hildenbrand, 2019/02/12
- [qemu-s390x] [PATCH v1 14/15] s390x/tcg: Handle all rounding modes overwritten by BFP instructions, David Hildenbrand, 2019/02/12
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 14/15] s390x/tcg: Handle all rounding modes overwritten by BFP instructions,
Richard Henderson <=
- Re: [qemu-s390x] [PATCH v1] s390x: Add floating-point extension facility to "qemu" cpu model, David Hildenbrand, 2019/02/12
- [qemu-s390x] [PATCH v1 15/15] s390x: Add floating-point extension facility to "qemu" cpu model, David Hildenbrand, 2019/02/12