From 47bc99ad9f9a3a4992e384e60958b52f53ba66d0 Mon Sep 17 00:00:00 2001
From: MerryMage <MerryMage@users.noreply.github.com>
Date: Mon, 22 Jun 2020 18:46:06 +0100
Subject: [PATCH] asimd_load_store_structures: Fix 2-byte aligned vld1.16

Previously incorrectly undefined
---
 src/frontend/A32/translate/impl/asimd_load_store_structures.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/frontend/A32/translate/impl/asimd_load_store_structures.cpp b/src/frontend/A32/translate/impl/asimd_load_store_structures.cpp
index 4d0664c5..3c678162 100644
--- a/src/frontend/A32/translate/impl/asimd_load_store_structures.cpp
+++ b/src/frontend/A32/translate/impl/asimd_load_store_structures.cpp
@@ -314,7 +314,7 @@ bool ArmTranslatorVisitor::v8_VLD_single(bool D, Reg n, size_t Vd, size_t sz, si
     if (nelem == 1 && inc == 2) {
         return UndefinedInstruction();
     }
-    if (nelem == 1 && (a != 0b00 && a != 0b11)) {
+    if (nelem == 1 && sz == 2 && (a != 0b00 && a != 0b11)) {
         return UndefinedInstruction();
     }
     if (nelem == 2 && Common::Bit<1>(a)) {