diff options
author | MITSUNARI Shigeo <[email protected]> | 2019-09-01 17:29:27 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2019-09-01 17:29:27 +0900 |
commit | 4672d2cb79abb0662a68c4a7cd185abac89852a3 (patch) | |
tree | 3608b4d228a91d0abefd39878c3ca6031aec7f26 | |
parent | 431977cb819bbbbac6975b7f6c0312cc48e8f8d4 (diff) | |
download | xbyak-4672d2cb79abb0662a68c4a7cd185abac89852a3.tar.gz xbyak-4672d2cb79abb0662a68c4a7cd185abac89852a3.zip |
add int3, int_, into
-rw-r--r-- | gen/gen_code.cpp | 3 | ||||
-rw-r--r-- | test/make_nm.cpp | 3 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp index 3af1a06..dcb6f56 100644 --- a/gen/gen_code.cpp +++ b/gen/gen_code.cpp @@ -633,6 +633,7 @@ void put() { "cmpsb", 0xA6 }, { "cmpsw", 0x66, 0xA7 }, { "cmpsd", 0xA7 }, + { "int3", 0xCC }, { "scasb", 0xAE }, { "scasw", 0x66, 0xAF }, { "scasd", 0xAF }, @@ -728,6 +729,7 @@ void put() { "fyl2xp1", 0xD9, 0xF9 }, }; putGeneric(tbl, NUM_OF_ARRAY(tbl)); + puts("void int_(uint8 x) { db(0xCD); db(x); }"); } { const struct Tbl { @@ -1676,6 +1678,7 @@ void put32() { "aas", 0x3F }, { "daa", 0x27 }, { "das", 0x2F }, + { "into", 0xCE }, { "popad", 0x61 }, { "popfd", 0x9D }, { "pusha", 0x60 }, diff --git a/test/make_nm.cpp b/test/make_nm.cpp index 8df5092..956c20b 100644 --- a/test/make_nm.cpp +++ b/test/make_nm.cpp @@ -473,6 +473,7 @@ class Test { "aas", "daa", "das", + "into", "popad", "popfd", "pusha", @@ -497,6 +498,7 @@ class Test { "cmpsb", "cmpsw", "cmpsd", + "int3", "movsb", "movsw", "movsd", @@ -598,6 +600,7 @@ class Test { put("fldenv", MEM); put("fstcw", MEM); put("fnstcw", MEM); + put(isXbyak_ ? "int_" : "int", IMM8); } void putJmp() const { diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index 5d70295..a3ffb78 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -311,6 +311,8 @@ void idiv(const Operand& op) { opR_ModM(op, 0, 7, 0xF6); } void imul(const Operand& op) { opR_ModM(op, 0, 5, 0xF6); } void inc(const Operand& op) { opIncDec(op, 0x40, 0); } void insertps(const Xmm& xmm, const Operand& op, uint8 imm) { opGen(xmm, op, 0x21, 0x66, isXMM_XMMorMEM, imm, 0x3A); } +void int3() { db(0xCC); } +void int_(uint8 x) { db(0xCD); db(x); } void ja(const Label& label, LabelType type = T_AUTO) { opJmp(label, type, 0x77, 0x87, 0x0F); }//-V524 void ja(const char *label, LabelType type = T_AUTO) { ja(std::string(label), type); }//-V524 void ja(const void *addr) { opJmpAbs(addr, T_NEAR, 0x77, 0x87, 0x0F); }//-V524 @@ -1589,6 +1591,7 @@ void aam() { db(0xD4); db(0x0A); } void aas() { db(0x3F); } void daa() { db(0x27); } void das() { db(0x2F); } +void into() { db(0xCE); } void popad() { db(0x61); } void popfd() { db(0x9D); } void pusha() { db(0x60); } |