summaryrefslogtreecommitdiff
path: root/test.bash
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-05-08 11:15:31 +0300
committerOxore <oxore@protonmail.com>2023-05-08 11:49:49 +0300
commit94e17de37b0475d927c9d546ece1e6f39f0ff195 (patch)
treead907337f8d1ec8c78b4c77bf94656cbce4fd494 /test.bash
parentedf839f2352095cbc375e1f679001f2b20404b9d (diff)
Impl ADD
Diffstat (limited to 'test.bash')
-rw-r--r--test.bash11
1 files changed, 11 insertions, 0 deletions
diff --git a/test.bash b/test.bash
index be8a5be..61f7572 100644
--- a/test.bash
+++ b/test.bash
@@ -93,6 +93,17 @@ run_test_iterative() {
done
}
+# 4xxx add
+#
+run_test_simple "addb Dn, Dn" "\xd4\x01"
+run_test_expect_short "addb An, Dn" "\xd4\x09"
+run_test_simple "addw An, Dn" "\xd4\x49"
+run_test_simple "addb (An), Dn" "\xd4\x11"
+run_test_simple "addb (An)+, Dn" "\xd4\x19"
+run_test_simple "addb -(An), Dn" "\xd4\x21"
+# GNU AS would emit ADDI for "add #imm,Xn", so we diassemble it as short
+run_test_expect_short "addl #imm, D6" "\xd6\xbc\x44\xd1\xe6\xe9"
+
# 4xxx chkw
#
run_test_simple "chkw Dn" "\x47\x82"