aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2022-05-12 10:51:23 +0900
committerMITSUNARI Shigeo <[email protected]>2022-05-12 10:51:23 +0900
commit72d1ac1183f7673d9a07dc6099623cff3f2179dd (patch)
tree023fac0044bc426fe68bf11c3a6e1c6ce2a2abda
parenta6665996b93d3375eec12aedfe04cead69e118a9 (diff)
downloadxbyak-72d1ac1183f7673d9a07dc6099623cff3f2179dd.tar.gz
xbyak-72d1ac1183f7673d9a07dc6099623cff3f2179dd.zip
add movdir64b
-rw-r--r--gen/gen_code.cpp1
-rw-r--r--test/misc.cpp9
-rw-r--r--xbyak/xbyak_mnemonic.h1
3 files changed, 11 insertions, 0 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp
index f72eda9..4cfcc1e 100644
--- a/gen/gen_code.cpp
+++ b/gen/gen_code.cpp
@@ -1052,6 +1052,7 @@ void put()
puts("void movbe(const Reg& reg, const Address& addr) { opModM(addr, reg, 0x0F, 0x38, 0xF0); }");
puts("void movbe(const Address& addr, const Reg& reg) { opModM(addr, reg, 0x0F, 0x38, 0xF1); }");
puts("void movdiri(const Address& addr, const Reg32e& reg) { opModM(addr, reg, 0x0F, 0x38, 0xF9); }");
+ puts("void movdir64b(const Reg& reg, const Address& addr) { db(0x66); opModM(addr, reg.cvt32(), 0x0F, 0x38, 0xF8); }");
puts("void adcx(const Reg32e& reg, const Operand& op) { opGen(reg, op, 0xF6, 0x66, isREG32_REG32orMEM, NONE, 0x38); }");
puts("void adox(const Reg32e& reg, const Operand& op) { opGen(reg, op, 0xF6, 0xF3, isREG32_REG32orMEM, NONE, 0x38); }");
puts("void cmpxchg8b(const Address& addr) { opModM(addr, Reg32(1), 0x0F, 0xC7); }");
diff --git a/test/misc.cpp b/test/misc.cpp
index 7dbb104..ec08e49 100644
--- a/test/misc.cpp
+++ b/test/misc.cpp
@@ -1932,10 +1932,12 @@ CYBOZU_TEST_AUTO(misc)
{
cldemote(ptr[eax+esi*4+0x12]);
movdiri(ptr[edx+esi*2+4], eax);
+ movdir64b(eax, ptr[edx]);
#ifdef XBYAK64
cldemote(ptr[rax+rdi*8+0x123]);
movdiri(ptr[rax+r12], r9);
movdiri(ptr[rax+r12*2+4], r9d);
+ movdir64b(r10, ptr[r8]);
#endif
}
} c;
@@ -1948,10 +1950,17 @@ CYBOZU_TEST_AUTO(misc)
0x67,
#endif
0x0f, 0x38, 0xf9, 0x44, 0x72, 0x04, // movdiri
+
+ 0x66,
+#ifdef XBYAK64
+ 0x67,
+#endif
+ 0x0f, 0x38, 0xf8, 0x02, // movdir64b
#ifdef XBYAK64
0x0f, 0x1c, 0x84, 0xf8, 0x23, 0x01, 0x00, 0x00, // cldemote
0x4e, 0x0f, 0x38, 0xf9, 0x0c, 0x20, // movdiri
0x46, 0x0f, 0x38, 0xf9, 0x4c, 0x60, 0x04, // movdiri
+ 0x66, 0x45, 0x0f, 0x38, 0xf8, 0x10, // movdir64b
#endif
};
const size_t n = sizeof(tbl) / sizeof(tbl[0]);
diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h
index c6cdb77..ccdf6846 100644
--- a/xbyak/xbyak_mnemonic.h
+++ b/xbyak/xbyak_mnemonic.h
@@ -503,6 +503,7 @@ void movd(const Mmx& mmx, const Address& addr) { if (mmx.isXMM()) db(0x66); opMo
void movd(const Mmx& mmx, const Reg32& reg) { if (mmx.isXMM()) db(0x66); opModR(mmx, reg, 0x0F, 0x6E); }
void movd(const Reg32& reg, const Mmx& mmx) { if (mmx.isXMM()) db(0x66); opModR(mmx, reg, 0x0F, 0x7E); }
void movddup(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x12, 0xF2, isXMM_XMMorMEM, NONE, NONE); }
+void movdir64b(const Reg& reg, const Address& addr) { db(0x66); opModM(addr, reg.cvt32(), 0x0F, 0x38, 0xF8); }
void movdiri(const Address& addr, const Reg32e& reg) { opModM(addr, reg, 0x0F, 0x38, 0xF9); }
void movdq2q(const Mmx& mmx, const Xmm& xmm) { db(0xF2); opModR(mmx, xmm, 0x0F, 0xD6); }
void movdqa(const Address& addr, const Xmm& xmm) { db(0x66); opModM(addr, xmm, 0x0F, 0x7F); }