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: 1080 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:48:55 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.148 with SMTP id r20cs43118qai; Mon, 18 Apr 2011 11:07:16 -0700 (PDT) Received: by 10.216.142.34 with SMTP id h34mr10986490wej.28.1303150036036; Mon, 18 Apr 2011 11:07:16 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id b47si10698893wer.179.2011.04.18.11.07.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Apr 2011 11:07:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk 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 Cc: patches@linaro.org Subject: [PATCH 2/2] target-arm: Handle UNDEF cases for Neon VLD/VST multiple-structures 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> 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;