aboutsummaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-04-18 19:07:12 +0100
committerAurelien Jarno <aurelien@aurel32.net>2011-04-25 22:10:12 +0200
commitf2dd89d0c7e5d39237f43392ccaed79bda47a71e (patch)
tree619fb5df50431d1e2a502ecbe6712a3f1aa15776 /target-arm
parent93262b1625ecb9c6ff22d5a51f38e312b5b7725a (diff)
downloadqemu-f2dd89d0c7e5d39237f43392ccaed79bda47a71e.zip
qemu-f2dd89d0c7e5d39237f43392ccaed79bda47a71e.tar.gz
qemu-f2dd89d0c7e5d39237f43392ccaed79bda47a71e.tar.bz2
target-arm: Handle UNDEF cases for Neon VLD/VST multiple-structures
Correctly UNDEF for Neon VLD/VST "multiple structures" forms where the align field is not valid. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/translate.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 80b25ac..8b309d4 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;