]> git.proxmox.com Git - mirror_qemu.git/commit
s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes
authorDavid Hildenbrand <david@redhat.com>
Mon, 18 Feb 2019 12:27:03 +0000 (13:27 +0100)
committerCornelia Huck <cohuck@redhat.com>
Mon, 4 Mar 2019 10:49:31 +0000 (11:49 +0100)
commit2aea83c6728f5006e07e4f148c2798441683fe86
tree5f21f40f1b7aba5d505712f175478d548bfaae94
parent8772bbe4e7cc7d67792440b0e7ea819e3cc930db
s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes

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.

Note: 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.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190218122710.23639-9-david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/fpu_helper.c
target/s390x/helper.h