|
From: | Richard Henderson |
Subject: | Re: [PATCH 03/70] target/arm: Improve arm_rmode_to_sf |
Date: | Mon, 6 Mar 2023 11:20:05 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 |
On 3/6/23 06:00, Philippe Mathieu-Daudé wrote:
On 27/2/23 06:41, Richard Henderson wrote:Use proper enumeration types for input and output. Use a const array to perform the mapping, with an assert that the input is valid. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/arm/internals.h | 12 +++++++++--- target/arm/translate-mve.c | 2 +- target/arm/vfp_helper.c | 33 ++++++++------------------------- 3 files changed, 18 insertions(+), 29 deletions(-)
...
+static inline FloatRoundMode arm_rmode_to_sf(ARMFPRounding rmode) +{ + assert((unsigned)rmode < ARRAY_SIZE(arm_rmode_to_sf_map)); + return arm_rmode_to_sf_map[rmode]; +}Is the inlining justified?
It's in a header file, so required. r~
[Prev in Thread] | Current Thread | [Next in Thread] |