diff options
-rw-r--r-- | gen/gen_code.cpp | 12 | ||||
-rw-r--r-- | test/make_nm.cpp | 16 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 12 |
3 files changed, 40 insertions, 0 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp index d34ad75..500d3e3 100644 --- a/gen/gen_code.cpp +++ b/gen/gen_code.cpp @@ -630,9 +630,18 @@ void put() { "cpuid", 0x0F, 0xA2 }, { "cwd", 0x66, 0x99 }, { "cwde", 0x98 }, + { "cmpsb", 0xA6 }, + { "cmpsw", 0x66, 0xA7 }, + { "cmpsd", 0xA7 }, + { "scasb", 0xAE }, + { "scasw", 0x66, 0xAF }, + { "scasd", 0xAF }, { "movsb", 0xA4 }, { "movsw", 0x66, 0xA5 }, { "movsd", 0xA5 }, + { "stosb", 0xAA }, + { "stosw", 0x66, 0xAB }, + { "stosd", 0xAB }, { "rep", 0xF3 }, { "lahf", 0x9F }, @@ -1678,7 +1687,10 @@ void put64() const GenericTbl tbl[] = { { "cdqe", 0x48, 0x98 }, { "cqo", 0x48, 0x99 }, + { "cmpsq", 0x48, 0xA7 }, { "movsq", 0x48, 0xA5 }, + { "scasq", 0x48, 0xAF }, + { "stosq", 0x48, 0xAB }, }; putGeneric(tbl, NUM_OF_ARRAY(tbl)); diff --git a/test/make_nm.cpp b/test/make_nm.cpp index cd9db1b..f109f1e 100644 --- a/test/make_nm.cpp +++ b/test/make_nm.cpp @@ -458,6 +458,10 @@ class Test { #ifdef XBYAK64 "cdqe", "cqo", + "cmpsq", + "movsq", + "scasq", + "stosq", #else "aaa", "aad", @@ -486,6 +490,18 @@ class Test { "lahf", // "lock", + "cmpsb", + "cmpsw", + "cmpsd", + "movsb", + "movsw", + "movsd", + "scasb", + "scasw", + "scasd", + "stosb", + "stosw", + "stosd", "nop", "sahf", diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index 9be9e65..d71683e 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -122,8 +122,11 @@ void cmpordsd(const Xmm& x, const Operand& op) { cmpsd(x, op, 7); } void cmpordss(const Xmm& x, const Operand& op) { cmpss(x, op, 7); } void cmppd(const Xmm& xmm, const Operand& op, uint8 imm8) { opGen(xmm, op, 0xC2, 0x66, isXMM_XMMorMEM, imm8); } void cmpps(const Xmm& xmm, const Operand& op, uint8 imm8) { opGen(xmm, op, 0xC2, 0x100, isXMM_XMMorMEM, imm8); } +void cmpsb() { db(0xA6); } +void cmpsd() { db(0xA7); } void cmpsd(const Xmm& xmm, const Operand& op, uint8 imm8) { opGen(xmm, op, 0xC2, 0xF2, isXMM_XMMorMEM, imm8); } void cmpss(const Xmm& xmm, const Operand& op, uint8 imm8) { opGen(xmm, op, 0xC2, 0xF3, isXMM_XMMorMEM, imm8); } +void cmpsw() { db(0x66); db(0xA7); } void cmpunordpd(const Xmm& x, const Operand& op) { cmppd(x, op, 3); } void cmpunordps(const Xmm& x, const Operand& op) { cmpps(x, op, 3); } void cmpunordsd(const Xmm& x, const Operand& op) { cmpsd(x, op, 3); } @@ -683,6 +686,9 @@ void sar(const Operand& op, int imm) { opShift(op, imm, 7); } void sarx(const Reg32e& r1, const Operand& op, const Reg32e& r2) { opGpr(r1, op, r2, T_F3 | T_0F38, 0xf7, false); } void sbb(const Operand& op, uint32 imm) { opRM_I(op, imm, 0x18, 3); } void sbb(const Operand& op1, const Operand& op2) { opRM_RM(op1, op2, 0x18); } +void scasb() { db(0xAE); } +void scasd() { db(0xAF); } +void scasw() { db(0x66); db(0xAF); } void seta(const Operand& op) { opR_ModM(op, 8, 0, 0x0F, 0x90 | 7); }//-V524 void setae(const Operand& op) { opR_ModM(op, 8, 0, 0x0F, 0x90 | 3); }//-V524 void setb(const Operand& op) { opR_ModM(op, 8, 0, 0x0F, 0x90 | 2); }//-V524 @@ -742,6 +748,9 @@ void stc() { db(0xF9); } void std() { db(0xFD); } void sti() { db(0xFB); } void stmxcsr(const Address& addr) { opModM(addr, Reg32(3), 0x0F, 0xAE); } +void stosb() { db(0xAA); } +void stosd() { db(0xAB); } +void stosw() { db(0x66); db(0xAB); } void sub(const Operand& op, uint32 imm) { opRM_I(op, imm, 0x28, 5); } void sub(const Operand& op1, const Operand& op2) { opRM_RM(op1, op2, 0x28); } void subpd(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x5C, 0x66, isXMM_XMMorMEM); } @@ -1544,7 +1553,10 @@ void jrcxz(std::string label) { opJmp(label, T_SHORT, 0xe3, 0, 0); } void jrcxz(const Label& label) { opJmp(label, T_SHORT, 0xe3, 0, 0); } void cdqe() { db(0x48); db(0x98); } void cqo() { db(0x48); db(0x99); } +void cmpsq() { db(0x48); db(0xA7); } void movsq() { db(0x48); db(0xA5); } +void scasq() { db(0x48); db(0xAF); } +void stosq() { db(0x48); db(0xAB); } void cmpxchg16b(const Address& addr) { opModM(addr, Reg64(1), 0x0F, 0xC7); } void movq(const Reg64& reg, const Mmx& mmx) { if (mmx.isXMM()) db(0x66); opModR(mmx, reg, 0x0F, 0x7E); } void movq(const Mmx& mmx, const Reg64& reg) { if (mmx.isXMM()) db(0x66); opModR(mmx, reg, 0x0F, 0x6E); } |