[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 08/15] s390x/tcg: Handle SET FPC AND LOAD FPC
Re: [Qemu-devel] [PATCH v1 08/15] s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes
Tue, 12 Feb 2019 20:32:47 +0100
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
On 12.02.19 20:07, Richard Henderson wrote:
> 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
>> 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.
>> 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
>> We won't be modeling abscence of the "floating-point extension facility"
>> for now, not necessary as most take the facility for granted without
>> 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 <address@hidden>
>> + /*
>> + * FIXME: we actually want something like round_to_odd, but that does
>> + * support all data types yet.
>> + */
>> + float_round_to_zero,
> Yes, you want round_to_odd. I suppose that's not valid for float128 right
as well as
It's not implemented for round_canonical(), round_to_int(),
roundAndPackInt32(), roundAndPackInt64(), roundAndPackUint64(),
roundAndPackFloat32() (and roundAndPackFloatx80()).
I assume at least 32bit is missing. I can't judge if the other functions
are relevant (x80 clearly not).
David / dhildenb
[Qemu-devel] [PATCH v1 07/15] s390x/tcg: Fix simulated-IEEE exceptions, David Hildenbrand, 2019/02/12
[Qemu-devel] [PATCH v1 10/15] s390x/tcg: Refactor saving/restoring the bfp rounding mode, David Hildenbrand, 2019/02/12
[Qemu-devel] [PATCH v1 12/15] s390x/tcg: Implement XxC and checks for most FP instructions, David Hildenbrand, 2019/02/12
- Re: [Qemu-devel] [PATCH v1 09/15] s390x/tcg: Check for exceptions in SET BFP ROUNDING MODE, (continued)