qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <5b3ad79a-0b9c-40e9-b78c-00bb67c96113@twiddle.net> (raw)
In-Reply-To: <20161111142018.22567-3-kbastian@mail.uni-paderborn.de>

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 <rth@twiddle.net>


r~

  reply	other threads:[~2016-11-11 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 14:20 [Qemu-devel] [PATCH v3 0/5] Added 7 instructions to the tricore target Bastian Koppelmann
2016-11-11 14:20 ` [Qemu-devel] [PATCH v3 1/5] target-tricore: Added FTOUZ instruction Bastian Koppelmann
2016-11-11 14:32   ` Richard Henderson
2016-11-11 14:20 ` [Qemu-devel] [PATCH v3 2/5] target-tricore: Added MADD.F and MSUB.F instructions Bastian Koppelmann
2016-11-11 14:39   ` Richard Henderson [this message]
2016-11-11 14:57   ` Richard Henderson
2016-11-11 14:20 ` [Qemu-devel] [PATCH v3 3/5] target-tricore: Added new MOV instruction variant Bastian Koppelmann
2016-11-11 14:20 ` [Qemu-devel] [PATCH v3 4/5] target-tricore: Added new JNE " Bastian Koppelmann
2016-11-11 14:20 ` [Qemu-devel] [PATCH v3 5/5] target-tricore: Add updfl instruction Bastian Koppelmann
2016-11-11 14:39   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b3ad79a-0b9c-40e9-b78c-00bb67c96113@twiddle.net \
    --to=rth@twiddle.net \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).