aboutsummaryrefslogtreecommitdiff
path: root/test/aarch64
diff options
context:
space:
mode:
authorMartyn Capewell <martyn.capewell@arm.com>2017-01-18 13:49:45 +0000
committerMartyn Capewell <martyn.capewell@arm.com>2017-01-18 16:06:39 +0000
commit3cf34b2a85451554a913ec2534fdb8c4109323c3 (patch)
tree85155a253e5205701e4d9f199083c01b0d1d7225 /test/aarch64
parent4fea551fb8ef5884ebd7157a82b1635063ea651f (diff)
downloadvixl-3cf34b2a85451554a913ec2534fdb8c4109323c3.tar.gz
Test unallocated shift amounts for add/sub immediate
Ensure that the unallocated values of 'sh' in the add/sub immediate encoding are handled correctly by the decoder. Change-Id: I986277ab0f9e81568f4f13bb61af664ab559d5f2
Diffstat (limited to 'test/aarch64')
-rw-r--r--test/aarch64/test-disasm-aarch64.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/aarch64/test-disasm-aarch64.cc b/test/aarch64/test-disasm-aarch64.cc
index a5bfeb21..32ceb4c6 100644
--- a/test/aarch64/test-disasm-aarch64.cc
+++ b/test/aarch64/test-disasm-aarch64.cc
@@ -321,6 +321,11 @@ TEST(add_immediate) {
COMPARE(cmn(sp, Operand(24)), "cmn sp, #0x18 (24)");
COMPARE(adds(wzr, wsp, Operand(9)), "cmn wsp, #0x9 (9)");
+ // Instructions in the add/sub immediate space, but unallocated due to shift
+ // value out of range.
+ COMPARE(dci(0x11800400), "unallocated (Unallocated)");
+ COMPARE(dci(0x11c00400), "unallocated (Unallocated)");
+
CLEANUP();
}