qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/76] target/arm: Use uint32_t in vfp_exceptbits_from_host()


From: Richard Henderson
Subject: Re: [PATCH 05/76] target/arm: Use uint32_t in vfp_exceptbits_from_host()
Date: Sat, 25 Jan 2025 07:08:30 -0800
User-agent: Mozilla Thunderbird

On 1/24/25 08:27, Peter Maydell wrote:
In vfp_exceptbits_from_host(), we accumulate the FPSR flags in
an "int", and our return type is also "int". However, the only
callsite returns the same information as a uint32_t, and
more generally we handle FPSR values in the code as uint32_t,
not int. Bring this function in to line with that convention.

There is no behaviour change because none of the FPSR bits
we set in this function are bit 31. The input argument to
the function remains 'int' because that is the return type
of the softfloat get_float_exception_flags().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  target/arm/vfp_helper.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
index fcc9e5d382e..afc41420eb1 100644
--- a/target/arm/vfp_helper.c
+++ b/target/arm/vfp_helper.c
@@ -34,9 +34,9 @@
  #ifdef CONFIG_TCG
/* Convert host exception flags to vfp form. */
-static inline int vfp_exceptbits_from_host(int host_bits)
+static inline uint32_t vfp_exceptbits_from_host(int host_bits)
  {
-    int target_bits = 0;
+    uint32_t target_bits = 0;
if (host_bits & float_flag_invalid) {
          target_bits |= FPSR_IOC;

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]