From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7NtL-0003UP-Q3 for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:42:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7NtI-00063k-NI for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:42:19 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:38668) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7NtI-00063T-Gp for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:42:16 -0500 References: <1479324335-2074-1-git-send-email-rth@twiddle.net> <1479324335-2074-11-git-send-email-rth@twiddle.net> From: Bastian Koppelmann Message-ID: Date: Thu, 17 Nov 2016 15:42:13 +0100 MIME-Version: 1.0 In-Reply-To: <1479324335-2074-11-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 10/25] target-tricore: Use clz opcode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org On 11/16/2016 08:25 PM, Richard Henderson wrote: > diff --git a/target-tricore/translate.c b/target-tricore/translate.c > index 36f734a..69cdfb9 100644 > --- a/target-tricore/translate.c > +++ b/target-tricore/translate.c > @@ -6367,7 +6367,8 @@ static void decode_rr_logical_shift(CPUTriCoreState *env, DisasContext *ctx) > tcg_gen_andc_tl(cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2]); > break; > case OPC2_32_RR_CLO: > - gen_helper_clo(cpu_gpr_d[r3], cpu_gpr_d[r1]); > + tcg_gen_not_tl(cpu_gpr_d[r3], cpu_gpr_d[r1]); > + tcg_gen_clzi_tl(cpu_gpr_d[r3], cpu_gpr_d[r3], TARGET_LONG_BITS); This doesn't work for r1 = 0. It returns 0x1f, but should return 0. I guess the error is not here, but I couldn't figure out where exactly it is. Cheers, Bastian