diff options
author | MITSUNARI Shigeo <[email protected]> | 2019-09-05 21:17:34 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2019-09-05 21:17:34 +0900 |
commit | 7fc0c2bb74e80f0aa1b5b25040131bf991a346c7 (patch) | |
tree | 815c63d6661455bde61f7ce8d6917b8c92ce4ac1 | |
parent | 9fa2ef3c304e51f703c28d3765289fe15af6e54f (diff) | |
download | xbyak-7fc0c2bb74e80f0aa1b5b25040131bf991a346c7.tar.gz xbyak-7fc0c2bb74e80f0aa1b5b25040131bf991a346c7.zip |
add enter/leave
-rw-r--r-- | gen/gen_code.cpp | 2 | ||||
-rw-r--r-- | test/make_nm.cpp | 2 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp index 7feb178..5ca982e 100644 --- a/gen/gen_code.cpp +++ b/gen/gen_code.cpp @@ -638,6 +638,7 @@ void put() { "scasw", 0x66, 0xAF }, { "scasd", 0xAF }, { "movsb", 0xA4 }, + { "leave", 0xC9 }, { "lodsb", 0xAC }, { "lodsw", 0x66, 0xAD }, { "lodsd", 0xAD }, @@ -735,6 +736,7 @@ void put() { "fyl2xp1", 0xD9, 0xF9 }, }; putGeneric(tbl, NUM_OF_ARRAY(tbl)); + puts("void enter(uint16 x, uint8 y) { db(0xC8); dw(x); db(y); }"); puts("void int_(uint8 x) { db(0xCD); db(x); }"); } { diff --git a/test/make_nm.cpp b/test/make_nm.cpp index 2279988..70897fc 100644 --- a/test/make_nm.cpp +++ b/test/make_nm.cpp @@ -501,6 +501,7 @@ class Test { "cmpsw", "cmpsd", "int3", + "leave", "lodsb", "lodsw", "lodsd", @@ -604,6 +605,7 @@ class Test { put("lea", REG32e|REG16, MEM); put("clflush", MEM); put("clflushopt", MEM); + put("enter", IMM, IMM); put("fldcw", MEM); put("fldenv", MEM); put("fstcw", MEM); diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index 55de124..2f2d768 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -171,6 +171,7 @@ void divss(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x5E, 0xF3, isXMM void dppd(const Xmm& xmm, const Operand& op, int imm) { opGen(xmm, op, 0x41, 0x66, isXMM_XMMorMEM, static_cast<uint8>(imm), 0x3A); } void dpps(const Xmm& xmm, const Operand& op, int imm) { opGen(xmm, op, 0x40, 0x66, isXMM_XMMorMEM, static_cast<uint8>(imm), 0x3A); } void emms() { db(0x0F); db(0x77); } +void enter(uint16 x, uint8 y) { db(0xC8); dw(x); db(y); } void extractps(const Operand& op, const Xmm& xmm, uint8 imm) { opExt(op, xmm, 0x17, imm); } void f2xm1() { db(0xD9); db(0xF0); } void fabs() { db(0xD9); db(0xE1); } @@ -439,6 +440,7 @@ void lahf() { db(0x9F); } void lddqu(const Xmm& xmm, const Address& addr) { db(0xF2); opModM(addr, xmm, 0x0F, 0xF0); } void ldmxcsr(const Address& addr) { opModM(addr, Reg32(2), 0x0F, 0xAE); } void lea(const Reg& reg, const Address& addr) { if (!reg.isBit(16 | i32e)) throw Error(ERR_BAD_SIZE_OF_REGISTER); opModM(addr, reg, 0x8D); } +void leave() { db(0xC9); } void lfence() { db(0x0F); db(0xAE); db(0xE8); } void lock() { db(0xF0); } void lodsb() { db(0xAC); } |