]> xenbits.xensource.com Git - qemu-xen.git/commit
target/arm: Replace A64 get_fpstatus_ptr() with generic fpstatus_ptr()
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 6 Aug 2020 10:44:50 +0000 (11:44 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Aug 2020 09:15:11 +0000 (10:15 +0100)
commitcdfb22bb7326fee607d9553358856cca341dbc9a
tree926c56f6dea60727e3a88a2f715a2a39426e0f26
parentcf6303d262e31f4812dfeb654c6c6803e52000af
target/arm: Replace A64 get_fpstatus_ptr() with generic fpstatus_ptr()

We currently have two versions of get_fpstatus_ptr(), which both take
an effectively boolean argument:
 * the one for A64 takes "bool is_f16" to distinguish fp16 from other ops
 * the one for A32/T32 takes "int neon" to distinguish Neon from other ops

This is confusing, and to implement ARMv8.2-FP16 the A32/T32 one will
need to make a four-way distinction between "non-Neon, FP16",
"non-Neon, single/double", "Neon, FP16" and "Neon, single/double".
The A64 version will then be a strict subset of the A32/T32 version.

To clean this all up, we want to go to a single implementation which
takes an enum argument with values FPST_FPCR, FPST_STD,
FPST_FPCR_F16, and FPST_STD_F16.  We rename the function to
fpstatus_ptr() so that unconverted code gets a compilation error
rather than silently passing the wrong thing to the new function.

This commit implements that new API, and converts A64 to use it:
 get_fpstatus_ptr(false) -> fpstatus_ptr(FPST_FPCR)
 get_fpstatus_ptr(true) -> fpstatus_ptr(FPST_FPCR_F16)

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-2-peter.maydell@linaro.org
target/arm/translate-a64.c
target/arm/translate-a64.h
target/arm/translate-sve.c
target/arm/translate.h