From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZMC2-0000WV-0J for qemu-devel@nongnu.org; Wed, 01 Oct 2014 11:52:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZMBs-0001Q6-N8 for qemu-devel@nongnu.org; Wed, 01 Oct 2014 11:51:53 -0400 Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]:62457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZMBs-0001Pt-FM for qemu-devel@nongnu.org; Wed, 01 Oct 2014 11:51:44 -0400 Received: by mail-pd0-f176.google.com with SMTP id fp1so438909pdb.21 for ; Wed, 01 Oct 2014 08:51:43 -0700 (PDT) Sender: Richard Henderson Message-ID: <542C230B.8090601@twiddle.net> Date: Wed, 01 Oct 2014 08:51:39 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1412156136-28899-1-git-send-email-kbastian@mail.uni-paderborn.de> <1412156136-28899-5-git-send-email-kbastian@mail.uni-paderborn.de> In-Reply-To: <1412156136-28899-5-git-send-email-kbastian@mail.uni-paderborn.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 4/5] target-tricore: Add instructions of BIT opcode format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bastian Koppelmann , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org 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~