[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v2 1/7] target-tricore: Add FPU infrastructure

From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 1/7] target-tricore: Add FPU infrastructure
Date: Tue, 8 Mar 2016 13:26:10 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 03/08/2016 12:42 PM, Bastian Koppelmann wrote:
+/* we don't care about input_denormal */
+static inline uint8_t f_get_excp_flags(CPUTriCoreState *env)
+    return env->fp_status.float_exception_flags & 0xbf;

No magic numbers please. It's a long list, but please or all of the named flags together.

+    if (flags & float_flag_invalid) {
+        env->FPU_FI = (flags & float_flag_invalid) << 31;
+    }

You know that float_flag_invalid is set; you just tested it. Otherwise you're relying on float_flag_invalid being 1.

You know, you don't have to keep setting these to (1 << 31) either; -1 works just as well.


reply via email to

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