target/arm: Improve arm_rmode_to_sf

Use proper enumeration types for input and output.
Use a const array to perform the mapping, with an
assert that the input is valid.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-02-25 10:48:08 -10:00
parent ab9ced73fa
commit 6ce21abd40
3 changed files with 18 additions and 29 deletions

View file

@ -588,7 +588,7 @@ DO_VCVT(VCVT_FS, vcvt_hs, vcvt_fs)
DO_VCVT(VCVT_FU, vcvt_hu, vcvt_fu)
static bool do_vcvt_rmode(DisasContext *s, arg_1op *a,
enum arm_fprounding rmode, bool u)
ARMFPRounding rmode, bool u)
{
/*
* Handle VCVT fp to int with specified rounding mode.