From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoyW8-0007HZ-0P for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:44:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoyW0-0005h7-Us for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:44:39 -0500 Received: from mail-yh0-x234.google.com ([2607:f8b0:4002:c01::234]:64715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoyW0-0005h2-PY for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:44:32 -0500 Received: by mail-yh0-f52.google.com with SMTP id i72so636595yha.25 for ; Fri, 06 Dec 2013 08:44:32 -0800 (PST) Sender: Richard Henderson Message-ID: <52A1FEE6.9070000@twiddle.net> Date: Sat, 07 Dec 2013 05:44:22 +1300 From: Richard Henderson MIME-Version: 1.0 References: <1386280289-27636-1-git-send-email-peter.maydell@linaro.org> <1386280289-27636-2-git-send-email-peter.maydell@linaro.org> <52A0FD9D.4000104@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/13] target-arm: A64: add support for conditional select List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Patch Tracking , Michael Matz , QEMU Developers , Claudio Fontana , Dirk Mueller , Will Newton , Laurent Desnogues , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "kvmarm@lists.cs.columbia.edu" , Christoffer Dall On 12/07/2013 01:45 AM, Peter Maydell wrote: > On 5 December 2013 22:26, Richard Henderson wrote: >> On 12/06/2013 10:51 AM, Peter Maydell wrote: >>> + if (cond >= 0x0e) { /* condition "always" */ >>> + tcg_src = read_cpu_reg(s, rn, sf); >>> + tcg_gen_mov_i64(tcg_rd, tcg_src); >> >> I wonder if it's worth adding that 0x0[ef] case to the generic condition >> processing rather than keep replicating it everywhere. > > I think "always true" is a special case anyway because you don't > want to emit any kind of branching/label logic at all. Sure, but unlike unconditional branches, which are useful to special-case, one sort of expects never to see an unconditional conditional move. Given TCG_COND_ALWAYS, we can re-use generic logic and have things fall out relatively easily. > I had a think about this and I couldn't really come up with a particularly > nice looking API for it, given the way that movcondi/setcondi/brcondi work. > The best I could come up with was something like: The s390 target has an example with DisasCompare and disas_jcc. The i386 target has another example with CCPrepare and gen_prepare_cc. The i386 port uses similar flags to ARM, but represents them differently. I suppose good ideas could be taken from either port. > So I definitely think I'd rather postpone this for now, unless you have > a neat idea that I've missed for making it look nice. Let's just postpone for now. r~