diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-11-01 12:34:48 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-11-01 12:34:48 +0900 |
commit | 6b19515ebda92fa06e46e2851eedf1491a1d3b87 (patch) | |
tree | aa5118ff7854a689195a3f546a149611346f6402 /test | |
parent | 77d6acea6d1c63a8ac87e7c80b7499c9c9a9740f (diff) | |
download | xbyak-6b19515ebda92fa06e46e2851eedf1491a1d3b87.tar.gz xbyak-6b19515ebda92fa06e46e2851eedf1491a1d3b87.zip |
add adcx, adox with APX
Diffstat (limited to 'test')
-rw-r--r-- | test/apx.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/apx.cpp b/test/apx.cpp index b085d75..45172e7 100644 --- a/test/apx.cpp +++ b/test/apx.cpp @@ -341,3 +341,27 @@ CYBOZU_TEST_AUTO(rm3_2) CYBOZU_TEST_EQUAL(c.getSize(), n); CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n); } + +CYBOZU_TEST_AUTO(adcx) +{ + struct Code : Xbyak::CodeGenerator { + Code() + { + adcx(rax, r30); + adcx(ecx, r20d); + adcx(ecx, ptr [r31+r29*4]); + adcx(r20d, ptr [rax]); + adcx(r16, ptr [r31+r29*4]); + adcx(r17, ptr [rax]); + adcx(rax, rcx, rdx); + } + } c; + const uint8_t tbl[] = { + 0x62, 0xdc, 0xfd, 0x08, 0x66, 0xc6, 0x62, 0xfc, 0x7d, 0x08, 0x66, 0xcc, 0x62, 0x9c, 0x79, 0x08, + 0x66, 0x0c, 0xaf, 0x62, 0xe4, 0x7d, 0x08, 0x66, 0x20, 0x62, 0x8c, 0xf9, 0x08, 0x66, 0x04, 0xaf, + 0x62, 0xe4, 0xfd, 0x08, 0x66, 0x08, 0x62, 0xf4, 0xfd, 0x18, 0x66, 0xca, + }; + const size_t n = sizeof(tbl); + CYBOZU_TEST_EQUAL(c.getSize(), n); + CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n); +} |