From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtzz5-0006BF-3J for qemu-devel@nongnu.org; Fri, 20 Dec 2013 08:19:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vtzz0-0004Wf-3f for qemu-devel@nongnu.org; Fri, 20 Dec 2013 08:19:19 -0500 Received: from mail-pd0-f171.google.com ([209.85.192.171]:38225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtzyz-0004Wa-UO for qemu-devel@nongnu.org; Fri, 20 Dec 2013 08:19:14 -0500 Received: by mail-pd0-f171.google.com with SMTP id z10so2522511pdj.30 for ; Fri, 20 Dec 2013 05:19:13 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <52B34907.1040109@twiddle.net> References: <1387293144-11554-1-git-send-email-peter.maydell@linaro.org> <1387293144-11554-8-git-send-email-peter.maydell@linaro.org> <52B34907.1040109@twiddle.net> From: Peter Maydell Date: Fri, 20 Dec 2013 13:18:52 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 07/21] target-arm: A64: add support for 3 src data proc insns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson 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 19 December 2013 19:29, Richard Henderson wrote: > On 12/17/2013 07:12 AM, Peter Maydell wrote: >> + tcg_gen_mul_i64(tcg_tmp, tcg_op1, tcg_op2); >> + if (is_sub) { >> + tcg_gen_sub_i64(cpu_reg(s, rd), cpu_reg(s, ra), tcg_tmp); >> + } else { >> + tcg_gen_add_i64(cpu_reg(s, rd), cpu_reg(s, ra), tcg_tmp); >> + } > > Perhaps worth noticing the RA=XZR special case for the MUL alias? Yeah, makes sense: have adjusted to: + if (ra == 31) { + /* We special-case rA == XZR as it is the standard MUL alias */ + tcg_gen_mul_i64(cpu_reg(s, rd), tcg_op1, tcg_op2); + } else { + tcg_gen_mul_i64(tcg_tmp, tcg_op1, tcg_op2); + if (is_sub) { + tcg_gen_sub_i64(cpu_reg(s, rd), cpu_reg(s, ra), tcg_tmp); + } else { + tcg_gen_add_i64(cpu_reg(s, rd), cpu_reg(s, ra), tcg_tmp); + } + } thanks -- PMM