diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-12-28 20:18:15 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-12-28 20:18:15 +0900 |
commit | b3e27734bee60ec0563a45ec8902c0ff95ffbc27 (patch) | |
tree | a2bc1596b41d49a7dc3d9b7d877748238f9eb2d5 /test | |
parent | 2e7b62d78472f38a9b6c30493255d011728fa46e (diff) | |
download | xbyak-b3e27734bee60ec0563a45ec8902c0ff95ffbc27.tar.gz xbyak-b3e27734bee60ec0563a45ec8902c0ff95ffbc27.zip |
apx supports 0x0f opecode with rex2
Diffstat (limited to 'test')
-rw-r--r-- | test/apx.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/apx.cpp b/test/apx.cpp index 42d315b..70b7d02 100644 --- a/test/apx.cpp +++ b/test/apx.cpp @@ -1911,3 +1911,28 @@ CYBOZU_TEST_AUTO(sha) CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n); } +CYBOZU_TEST_AUTO(0x0f_rex2) +{ + struct Code : Xbyak::CodeGenerator { + Code() + { + addps(xmm3, ptr [r30+r20*4+0x4]); + movups(xmm5, ptr [r16]); + movq(r31, xmm5); + cvtsd2si(r20, ptr [r30]); + bsr(r20, r30); + } + } c; + const uint8_t tbl[] = { + 0xd5, 0xb1, 0x58, 0x5c, 0xa6, 0x04, + 0xd5, 0x90, 0x10, 0x28, 0x66, + 0xd5, 0x99, 0x7e, 0xef, 0xf2, + 0xd5, 0xd9, 0x2d, 0x26, + 0xd5, 0xd9, 0xbd, 0xe6, + + }; + const size_t n = sizeof(tbl); + CYBOZU_TEST_EQUAL(c.getSize(), n); + CYBOZU_TEST_EQUAL_ARRAY(c.getCode(), tbl, n); +} + |