aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/apx.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2023-11-17 10:06:37 +0900
committerMITSUNARI Shigeo <[email protected]>2023-11-17 10:06:37 +0900
commitdba2c174f3d8606cdb0bcad7b473baa420915247 (patch)
tree4fe1dcc15068c9949263ff00c5ebf81cf24ff6b6 /test/apx.cpp
parent95ad5927fdf988bbc32c7d1a09b91d8d648f6629 (diff)
downloadxbyak-dba2c174f3d8606cdb0bcad7b473baa420915247.tar.gz
xbyak-dba2c174f3d8606cdb0bcad7b473baa420915247.zip
add 2op neg/not_
Diffstat (limited to 'test/apx.cpp')
-rw-r--r--test/apx.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/apx.cpp b/test/apx.cpp
index 19c6694..87a354b 100644
--- a/test/apx.cpp
+++ b/test/apx.cpp
@@ -804,6 +804,21 @@ CYBOZU_TEST_AUTO(div)
not_(word [r20+r30*1]);
not_(dword [r20+r30*1]);
not_(qword [r20+r30*1]);
+
+ // 2op
+ neg(r30b, al);
+ neg(r30w, ax);
+ neg(r30d, eax);
+ neg(r30, rax);
+ neg(r30|T_nf, rax);
+ neg(rcx|T_nf, rax);
+ neg(rcx, ptr [r30]);
+
+ not_(r30b, al);
+ not_(r30w, ax);
+ not_(r30d, eax);
+ not_(r30, rax);
+ not_(rcx, ptr [r30]);
}
} c;
const uint8_t tbl[] = {
@@ -839,6 +854,16 @@ CYBOZU_TEST_AUTO(div)
0xf7, 0xd4, 0x62, 0xfc, 0xfc, 0x08, 0xf7, 0xd4, 0x62, 0xbc, 0x78, 0x08, 0xf6, 0x14, 0x34, 0x62,
0xbc, 0x79, 0x08, 0xf7, 0x14, 0x34, 0x62, 0xbc, 0x78, 0x08, 0xf7, 0x14, 0x34, 0x62, 0xbc, 0xf8,
0x08, 0xf7, 0x14, 0x34,
+
+ // 2op
+ // neg
+ 0x62, 0xf4, 0x0c, 0x10, 0xf6, 0xd8, 0x62, 0xf4, 0x0d, 0x10, 0xf7, 0xd8, 0x62, 0xf4, 0x0c, 0x10,
+ 0xf7, 0xd8, 0x62, 0xf4, 0x8c, 0x10, 0xf7, 0xd8, 0x62, 0xf4, 0x8c, 0x14, 0xf7, 0xd8, 0x62, 0xf4,
+ 0xf4, 0x1c, 0xf7, 0xd8, 0x62, 0xdc, 0xf4, 0x18, 0xf7, 0x1e,
+
+ // not
+ 0x62, 0xf4, 0x0c, 0x10, 0xf6, 0xd0, 0x62, 0xf4, 0x0d, 0x10, 0xf7, 0xd0, 0x62, 0xf4, 0x0c, 0x10,
+ 0xf7, 0xd0, 0x62, 0xf4, 0x8c, 0x10, 0xf7, 0xd0, 0x62, 0xdc, 0xf4, 0x18, 0xf7, 0x16,
};
const size_t n = sizeof(tbl);
CYBOZU_TEST_EQUAL(c.getSize(), n);