From patchwork Mon Apr 18 18:07:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 91825 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BB7FCB6FB9 for ; Tue, 19 Apr 2011 04:17:10 +1000 (EST) Received: from localhost ([::1]:58449 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBt0U-0004Ig-EZ for incoming@patchwork.ozlabs.org; Mon, 18 Apr 2011 14:17:06 -0400 Received: from eggs.gnu.org ([140.186.70.92]:41223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBt0N-0004IN-IX for qemu-devel@nongnu.org; Mon, 18 Apr 2011 14:17:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QBt0M-0003Qd-MX for qemu-devel@nongnu.org; Mon, 18 Apr 2011 14:16:59 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:60978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBt0M-0003QX-B8 for qemu-devel@nongnu.org; Mon, 18 Apr 2011 14:16:58 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QBsqu-0007gG-L2; Mon, 18 Apr 2011 19:07:12 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 18 Apr 2011 19:07:12 +0100 Message-Id: <1303150032-29497-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1303150032-29497-1-git-send-email-peter.maydell@linaro.org> References: <1303150032-29497-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH 2/2] target-arm: Handle UNDEF cases for Neon VLD/VST multiple-structures X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Correctly UNDEF for Neon VLD/VST "multiple structures" forms where the align field is not valid. Signed-off-by: Peter Maydell --- target-arm/translate.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 5820add..30ca7df 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -3830,6 +3830,21 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn) size = (insn >> 6) & 3; if (op > 10) return 1; + /* Catch UNDEF cases for bad values of align field */ + switch (op & 0xc) { + case 4: + if (((insn >> 5) & 1) == 1) { + return 1; + } + break; + case 8: + if (((insn >> 4) & 3) == 3) { + return 1; + } + break; + default: + break; + } nregs = neon_ls_element_type[op].nregs; interleave = neon_ls_element_type[op].interleave; spacing = neon_ls_element_type[op].spacing;