diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-11-22 11:12:04 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-11-22 11:12:04 +0900 |
commit | 1aefdb649960a4bfdc69602967968462165d6d8c (patch) | |
tree | 18b4d04304c2510d4439a64e1d2e26a19399c465 | |
parent | 77eca6d0dcd75e7a0d24b3a86506ebaba6879d8f (diff) | |
download | xbyak-1aefdb649960a4bfdc69602967968462165d6d8c.tar.gz xbyak-1aefdb649960a4bfdc69602967968462165d6d8c.zip |
support jmpabs
-rw-r--r-- | gen/gen_code.cpp | 1 | ||||
-rw-r--r-- | test/apx.cpp | 4 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp index 4f4eb68..312b217 100644 --- a/gen/gen_code.cpp +++ b/gen/gen_code.cpp @@ -1940,6 +1940,7 @@ void put64() puts("void vmovq(const Xmm& x, const Reg64& r) { opAVX_X_X_XM(x, xm0, Xmm(r.getIdx()), T_66 | T_0F | T_W1 | T_EVEX | T_EW1, 0x6E); }"); puts("void vmovq(const Reg64& r, const Xmm& x) { opAVX_X_X_XM(x, xm0, Xmm(r.getIdx()), T_66 | T_0F | T_W1 | T_EVEX | T_EW1, 0x7E); }"); + puts("void jmpabs(uint64_t addr) { db(0xD5); db(0x00); db(0xA1); dq(addr); }"); // CMPccXADD { const struct Tbl { diff --git a/test/apx.cpp b/test/apx.cpp index a5d2ebf..ba767e2 100644 --- a/test/apx.cpp +++ b/test/apx.cpp @@ -1055,6 +1055,8 @@ CYBOZU_TEST_AUTO(mov_misc) crc32(r30d, r8d); crc32(r30, r8b); crc32(r30, r8); + + jmpabs(0x12345678aabbccdd); } } c; const uint8_t tbl[] = { @@ -1069,6 +1071,8 @@ CYBOZU_TEST_AUTO(mov_misc) // crc32 0x62, 0x44, 0x7c, 0x08, 0xf0, 0xf0, 0x62, 0x44, 0x7d, 0x08, 0xf1, 0xf0, 0x62, 0x44, 0x7c, 0x08, 0xf1, 0xf0, 0x62, 0x44, 0xfc, 0x08, 0xf0, 0xf0, 0x62, 0x44, 0xfc, 0x08, 0xf1, 0xf0, + // jmpabs + 0xd5, 0x00, 0xa1, 0xdd, 0xcc, 0xbb, 0xaa, 0x78, 0x56, 0x34, 0x12, }; const size_t n = sizeof(tbl); CYBOZU_TEST_EQUAL(c.getSize(), n); diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index 847688c..54623d5 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -1731,6 +1731,7 @@ void vcvtsd2si(const Reg64& r, const Operand& op) { opAVX_X_X_XM(Xmm(r.getIdx()) void vcvttsd2si(const Reg64& r, const Operand& op) { opAVX_X_X_XM(Xmm(r.getIdx()), xm0, op, T_0F | T_F2 | T_W1 | T_EVEX | T_EW1 | T_N4 | T_SAE_X, 0x2C); } void vmovq(const Xmm& x, const Reg64& r) { opAVX_X_X_XM(x, xm0, Xmm(r.getIdx()), T_66 | T_0F | T_W1 | T_EVEX | T_EW1, 0x6E); } void vmovq(const Reg64& r, const Xmm& x) { opAVX_X_X_XM(x, xm0, Xmm(r.getIdx()), T_66 | T_0F | T_W1 | T_EVEX | T_EW1, 0x7E); } +void jmpabs(uint64_t addr) { db(0xD5); db(0x00); db(0xA1); dq(addr); } void cmpbexadd(const Address& addr, const Reg32e& r1, const Reg32e& r2) { opRRO(r1, r2, addr, T_66 | T_0F38, 0xE6); } void cmpbxadd(const Address& addr, const Reg32e& r1, const Reg32e& r2) { opRRO(r1, r2, addr, T_66 | T_0F38, 0xE2); } void cmplexadd(const Address& addr, const Reg32e& r1, const Reg32e& r2) { opRRO(r1, r2, addr, T_66 | T_0F38, 0xEE); } |