From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVms7-0008EZ-3b for qemu-devel@nongnu.org; Tue, 16 Feb 2016 16:09:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVms6-0003iw-7k for qemu-devel@nongnu.org; Tue, 16 Feb 2016 16:09:23 -0500 References: <1455287642-28166-1-git-send-email-edgar.iglesias@gmail.com> <1455287642-28166-6-git-send-email-edgar.iglesias@gmail.com> From: Sergey Fedorov Message-ID: <56C38FF9.1090301@gmail.com> Date: Wed, 17 Feb 2016 00:09:13 +0300 MIME-Version: 1.0 In-Reply-To: <1455287642-28166-6-git-send-email-edgar.iglesias@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 5/9] target-arm/translate-a64.c: Use extract32 in disas_ldst_reg_imm9 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" , qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: edgar.iglesias@xilinx.com, qemu-arm@nongnu.org, alex.bennee@linaro.org, rth@twiddle.net On 12.02.2016 17:33, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Use extract32 instead of open coding the bit masking when decoding > is_signed and is_extended. This streamlines the decoding with some > of the other ldst variants. > > No functional change. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Sergey Fedorov > --- > target-arm/translate-a64.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c > index 7f65aea..bf31f8a 100644 > --- a/target-arm/translate-a64.c > +++ b/target-arm/translate-a64.c > @@ -2117,8 +2117,8 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint32_t insn) > return; > } > is_store = (opc == 0); > - is_signed = opc & (1<<1); > - is_extended = (size < 3) && (opc & 1); > + is_signed = extract32(opc, 1, 1); > + is_extended = (size < 3) && extract32(opc, 0, 1); > } > > switch (idx) {