From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoykJ-0004Mc-Tk for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:59:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoykB-00025n-GQ for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:59:19 -0500 Received: from mail-yh0-x22a.google.com ([2607:f8b0:4002:c01::22a]:52067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoykB-00025f-DI for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:59:11 -0500 Received: by mail-yh0-f42.google.com with SMTP id z6so662112yhz.15 for ; Fri, 06 Dec 2013 08:59:10 -0800 (PST) Sender: Richard Henderson Message-ID: <52A20256.3040706@twiddle.net> Date: Sat, 07 Dec 2013 05:59:02 +1300 From: Richard Henderson MIME-Version: 1.0 References: <1386335953-28876-1-git-send-email-peter.maydell@linaro.org> <1386335953-28876-2-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1386335953-28876-2-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 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 , qemu-devel@nongnu.org Cc: patches@linaro.org, Michael Matz , Claudio Fontana , Dirk Mueller , Will Newton , Laurent Desnogues , =?ISO-8859-1?Q?Alex_Benn=E9e?= , kvmarm@lists.cs.columbia.edu, Christoffer Dall On 12/07/2013 02:19 AM, Peter Maydell wrote: > + tcg_rd = cpu_reg(s, rd); > + > + if (cond >= 0x0e) { /* condition "always" */ > + tcg_src = read_cpu_reg(s, rn, sf); > + tcg_gen_mov_i64(tcg_rd, tcg_src); > + } else { > + /* OPTME: we could use movcond here, at the cost of duplicating > + * a lot of the arm_gen_test_cc() logic. > + */ > + int label_match = gen_new_label(); > + int label_continue = gen_new_label(); > + > + arm_gen_test_cc(cond, label_match); > + /* nomatch: */ > + tcg_src = cpu_reg(s, rm); Sorry for missing this in the first round: For the silly corner case of Rd == XZR, tcg_rd is dead after the branch. We could either move the tcg_rd assignment down into each basic block with the assignment to tcg_src, or simply add if (rd == 31) { /* silly no-op write; until we use movcond we must special-case this to avoid a dead temporary across basic blocks. */ return; } Either solution is ok by me. r~