Support AMD Zen New Instructions.

This commit is contained in:
Masaki Ota @MagurosanTeam 2019-09-23 03:57:46 +09:00 committed by MITSUNARI Shigeo
parent 2501ba9a1f
commit 08b8b1baf0
2 changed files with 8 additions and 0 deletions

View File

@ -767,6 +767,11 @@ void put()
{ "fxtract", 0xD9, 0xF4 },
{ "fyl2x", 0xD9, 0xF1 },
{ "fyl2xp1", 0xD9, 0xF9 },
// AMD Zen
{ "monitorx", 0x0F, 0x01, 0xFA },
{ "mwaitx", 0x0F, 0x01, 0xFB },
{ "clzero", 0x0F, 0x01, 0xFC },
};
putGeneric(tbl, NUM_OF_ARRAY(tbl));
puts("void enter(uint16 x, uint8 y) { db(0xC8); dw(x); db(y); }");

View File

@ -60,6 +60,7 @@ void cld() { db(0xFC); }
void clflush(const Address& addr) { opModM(addr, Reg32(7), 0x0F, 0xAE); }
void clflushopt(const Address& addr) { db(0x66); opModM(addr, Reg32(7), 0x0F, 0xAE); }
void cli() { db(0xFA); }
void clzero() { db(0x0F); db(0x01); db(0xFC); }
void cmc() { db(0xF5); }
void cmova(const Reg& reg, const Operand& op) { opModRM(reg, op, op.isREG(16 | i32e), op.isMEM(), 0x0F, 0x40 | 7); }//-V524
void cmovae(const Reg& reg, const Operand& op) { opModRM(reg, op, op.isREG(16 | i32e), op.isMEM(), 0x0F, 0x40 | 3); }//-V524
@ -485,6 +486,7 @@ void minps(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x5D, 0x100, isXM
void minsd(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x5D, 0xF2, isXMM_XMMorMEM); }
void minss(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x5D, 0xF3, isXMM_XMMorMEM); }
void monitor() { db(0x0F); db(0x01); db(0xC8); }
void monitorx() { db(0x0F); db(0x01); db(0xFA); }
void movapd(const Address& addr, const Xmm& xmm) { db(0x66); opModM(addr, xmm, 0x0F, 0x29); }
void movapd(const Xmm& xmm, const Operand& op) { opMMX(xmm, op, 0x28, 0x66); }
void movaps(const Address& addr, const Xmm& xmm) { opModM(addr, xmm, 0x0F, 0x29); }
@ -541,6 +543,7 @@ void mulsd(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x59, 0xF2, isXMM
void mulss(const Xmm& xmm, const Operand& op) { opGen(xmm, op, 0x59, 0xF3, isXMM_XMMorMEM); }
void mulx(const Reg32e& r1, const Reg32e& r2, const Operand& op) { opGpr(r1, r2, op, T_F2 | T_0F38, 0xf6, true); }
void mwait() { db(0x0F); db(0x01); db(0xC9); }
void mwaitx() { db(0x0F); db(0x01); db(0xFB); }
void neg(const Operand& op) { opR_ModM(op, 0, 3, 0xF6); }
void not_(const Operand& op) { opR_ModM(op, 0, 2, 0xF6); }
void or_(const Operand& op, uint32 imm) { opRM_I(op, imm, 0x08, 1); }