From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vohi9-0001qZ-0J for qemu-devel@nongnu.org; Thu, 05 Dec 2013 17:48:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vohi4-00089W-IK for qemu-devel@nongnu.org; Thu, 05 Dec 2013 17:47:56 -0500 Received: from mail-yh0-x236.google.com ([2607:f8b0:4002:c01::236]:57752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vohi4-00089R-Co for qemu-devel@nongnu.org; Thu, 05 Dec 2013 17:47:52 -0500 Received: by mail-yh0-f54.google.com with SMTP id z12so13297228yhz.27 for ; Thu, 05 Dec 2013 14:47:51 -0800 (PST) Sender: Richard Henderson Message-ID: <52A1028F.5030209@twiddle.net> Date: Fri, 06 Dec 2013 11:47:43 +1300 From: Richard Henderson MIME-Version: 1.0 References: <1386280289-27636-1-git-send-email-peter.maydell@linaro.org> <1386280289-27636-5-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1386280289-27636-5-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/13] target-arm: A64: add support for EXTR 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/06/2013 10:51 AM, Peter Maydell wrote: > From: Alexander Graf > > This patch adds emulation support for the EXTR instruction. > > Signed-off-by: Alexander Graf > > [claudio: adapted for new decoder, removed a few temporaries, > fixed the 32bit bug, added checks for more > unallocated cases] > > Signed-off-by: Claudio Fontana > Signed-off-by: Peter Maydell > --- > target-arm/translate-a64.c | 48 ++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 46 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson > + tcg_rm = read_cpu_reg(s, rm, sf); > + tcg_rn = read_cpu_reg(s, rn, sf); > + tcg_gen_shri_i64(tcg_rm, tcg_rm, imm); > + tcg_gen_shli_i64(tcg_rn, tcg_rn, bitsize - imm); > + tcg_gen_or_i64(tcg_rd, tcg_rm, tcg_rn); > + if (!sf) { > + tcg_gen_ext32u_i64(tcg_rd, tcg_rd); > + } OPTME: If Rm==Rn, this is a rotate. r~