From 5463fd221e7a1071f351ea12b617c90c4fe98d64 Mon Sep 17 00:00:00 2001 From: Oxore Date: Mon, 8 May 2023 20:59:04 +0300 Subject: Impl AND --- test.bash | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'test.bash') diff --git a/test.bash b/test.bash index a6f25d7..5ee822d 100644 --- a/test.bash +++ b/test.bash @@ -93,6 +93,19 @@ run_test_iterative() { done } +# cxxx and +# +run_test_simple "andb Dn, Dn" "\xc4\x01" +run_test_expect_short "andb An, Dn" "\xc4\x09" +run_test_expect_short "andw An, Dn" "\xc4\x49" +run_test_simple "andb (An), Dn" "\xc4\x11" +run_test_simple "andb (An)+, Dn" "\xc4\x19" +run_test_simple "andw -(An), Dn" "\xc4\x61" +run_test_simple "andl (d8,PC,An), Dn" "\xc0\xbb\xc8\x07" +# GNU AS would emit ANDI for "and #imm,Xn", so we diassemble it as short +run_test_expect_short "andl #imm, D6" "\xc6\xbc\x44\xd1\xe6\xe9" +run_test_expect_short "andl D2, D0 swapped direction" "\xc1\x42" + # cxxx abcd # run_test_simple "abcd Dn, Dn" "\xc1\x01" @@ -112,7 +125,7 @@ run_test_simple "orb (An), Dn" "\x84\x11" run_test_simple "orb (An)+, Dn" "\x84\x19" run_test_simple "orw -(An), Dn" "\x84\x61" run_test_simple "orl (d8,PC,An), Dn" "\x80\xbb\x88\x07" -# GNU AS would emit ADDI for "or #imm,Xn", so we diassemble it as short +# GNU AS would emit ORI for "or #imm,Xn", so we diassemble it as short run_test_expect_short "orl #imm, D6" "\x86\xbc\x44\xd1\xe6\xe9" run_test_expect_short "orl D2, D0 swapped direction" "\x81\x42" -- cgit v1.2.3