From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1FpC-0008Nv-Jp for qemu-devel@nongnu.org; Wed, 17 Dec 2014 09:43:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1Fp6-0000yh-EB for qemu-devel@nongnu.org; Wed, 17 Dec 2014 09:43:38 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:45897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1Fp6-0000xg-8q for qemu-devel@nongnu.org; Wed, 17 Dec 2014 09:43:32 -0500 Message-ID: <5491A4A9.804@mail.uni-paderborn.de> Date: Wed, 17 Dec 2014 15:43:37 +0000 From: Bastian Koppelmann MIME-Version: 1.0 References: <1418405504-11175-1-git-send-email-kbastian@mail.uni-paderborn.de> <1418405504-11175-6-git-send-email-kbastian@mail.uni-paderborn.de> <548B53FD.6020000@twiddle.net> In-Reply-To: <548B53FD.6020000@twiddle.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/8] target-tricore: Add instructions of RR opcode format, that have 0x4b as the first opcode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org On 12/12/2014 08:45 PM, Richard Henderson wrote: > > Probably doesn't matter much, but > > ret = (ctpop8(r1) & 1) > | ((ctpop8(r1 >> 8) & 1) << 8) > | ((ctpop8(r1 >> 16) & 1) << 16) > | ((ctpop8(r1 >> 24) & 1) << 24); This looks much more compact to me. Thanks! > One could also make a case for adding new helpers that > use __builtin_parity rather than __builtin_popcount. > > I usually like to look at things like this and see how > the general infrastructure can be improved... This is a good idea. I'll send another patch, that adds the infrastructure. Cheers, Bastian