qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 2/5] target-tricore: Added MADD.F and MSUB.F


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3 2/5] target-tricore: Added MADD.F and MSUB.F instructions
Date: Fri, 11 Nov 2016 15:39:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 11/11/2016 03:20 PM, Bastian Koppelmann wrote:
+        if (muladd_negate_c) {
+            cSign ^= 1;
+        }
+        if (((aExp == 0xff) || (bExp == 0xff)) && (cExp == 0xff)) {
+            if (aSign ^ bSign ^ cSign) {

If you're going to make muladd_negate_c a bool, you might as well just fold that in here:

  if (aSign ^ bSign ^ cSign ^ muladd_negate_c)

And, come to think of it,

+            arg1 = float32_squash_input_denormal(arg1, &env->fp_status);
+            arg2 = float32_squash_input_denormal(arg2, &env->fp_status);
+            arg3 = float32_squash_input_denormal(arg3, &env->fp_status);

can be folded into f_maddsub_nan_result as

    } else if (float32_is_infinity(arg1)
               && float32_is_zero(float32_squash_input_denormal
                  (arg2, &env->fp_status))) {
        return MUL_NAN;
    } else if (float32_is_infinity(arg2)
               && float32_is_zero(float32_squash_input_denormal
                  (arg1, &env->fp_status))) {
        return MUL_NAN;

which makes it less likely that the squash will actually be called.

Otherwise,

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

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