All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2 4/5] target-tricore: Add instructions of BIT opcode format
Date: Wed, 01 Oct 2014 08:51:39 -0700	[thread overview]
Message-ID: <542C230B.8090601@twiddle.net> (raw)
In-Reply-To: <1412156136-28899-5-git-send-email-kbastian@mail.uni-paderborn.de>

On 10/01/2014 02:35 AM, Bastian Koppelmann wrote:
> +    case OPC2_32_BIT_AND_NOR_T:
> +#if defined TCG_TARGET_HAS_nor_i32
> +        gen_bit_2op(cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2],
> +                    pos1, pos2, &tcg_gen_nor_tl, &tcg_gen_and_tl);
> +#else

These are *always* defined.  You want a normal C if test.

That said, I would actually write it the other way:

   if (TCG_TARGET_HAS_andc_i32) {
       gen_bit_2op(cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2],
                   pos1, pos2, &tcg_gen_or_tl, &tcg_gen_andc_tl);
   } else {
       gen_bit_2op(cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2],
                   pos1, pos2, &tcg_gen_nor_tl, &tcg_gen_and_tl);
   }

so that the "normal" case is the one that matches the opcode name.


r~

  reply	other threads:[~2014-10-01 15:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01  9:35 [Qemu-devel] [PATCH v2 0/5] Add TriCore ABS, ABSB, B, BIT, BO instructions Bastian Koppelmann
2014-10-01  9:35 ` [Qemu-devel] [PATCH v2 1/5] target-tricore: Cleanup and Bugfixes Bastian Koppelmann
2014-10-01  9:35 ` [Qemu-devel] [PATCH v2 2/5] target-tricore: Add instructions of ABS, ABSB opcode format Bastian Koppelmann
2014-10-01 15:46   ` Richard Henderson
2014-10-01  9:35 ` [Qemu-devel] [PATCH v2 3/5] target-tricore: Add instructions of B " Bastian Koppelmann
2014-10-01  9:35 ` [Qemu-devel] [PATCH v2 4/5] target-tricore: Add instructions of BIT " Bastian Koppelmann
2014-10-01 15:51   ` Richard Henderson [this message]
2014-10-01  9:35 ` [Qemu-devel] [PATCH v2 5/5] target-tricore: Add instructions of BO " Bastian Koppelmann
2014-10-01 16:02   ` 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=542C230B.8090601@twiddle.net \
    --to=rth@twiddle.net \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.