target/arm: Implement FPST_STD_F16 fpstatus
commitaaae563bc73de0598bbc09a102e68f27fafe704a
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 6 Aug 2020 10:44:52 +0000 (6 11:44 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Aug 2020 09:15:11 +0000 (24 10:15 +0100)
treec2362da0fd9d29b9f9469947f60edae8ac4364a6
parenta84d1d1316726704edd2617b2c30c921d98a8137
target/arm: Implement FPST_STD_F16 fpstatus

Architecturally, Neon FP16 operations use the "standard FPSCR" like
all other Neon operations.  However, this is defined in the Arm ARM
pseudocode as "a fixed value, except that FZ16 (and AHP) follow the
FPSCR bits". In QEMU, the softfloat float_status doesn't include
separate flush-to-zero for FP16 operations, so we must keep separate
fp_status for "Neon non-FP16" and "Neon fp16" operations, in the
same way we do already for the non-Neon "fp_status" vs "fp_status_f16".

Add the extra float_status field to the CPU state structure,
ensure it is correctly initialized and updated on FPSCR writes,
and make fpstatus_ptr(FPST_STD_F16) return a pointer to it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20200806104453.30393-4-peter.maydell@linaro.org
target/arm/cpu.c
target/arm/cpu.h
target/arm/translate.h
target/arm/vfp_helper.c