Skip to content

Commit

Permalink
simplify condR
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Nov 8, 2023
1 parent b220be9 commit 2d1f229
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 40 deletions.
16 changes: 8 additions & 8 deletions gen/gen_code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,8 @@ void put()
};
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
const Tbl *p = &tbl[i];
printf("void %s(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|32|64) && op.getBit() == reg.getBit(), T_0F, 0x%02X); }\n", p->name, p->code);
printf("void %s(const Operand& op, uint8_t imm) { opRext(op, 16|32|64, %d, T_0F, 0xba, false, 1); db(imm); }\n", p->name, p->ext);
printf("void %s(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|i32e) && op.getBit() == reg.getBit(), T_0F, 0x%02X); }\n", p->name, p->code);
printf("void %s(const Operand& op, uint8_t imm) { opRext(op, 16|i32e, %d, T_0F, 0xba, false, 1); db(imm); }\n", p->name, p->ext);
}
}
{
Expand Down Expand Up @@ -924,7 +924,7 @@ void put()
};
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
const Tbl *p = &tbl[i];
printf("void %s(const Reg&reg, const Operand& op) { opRO(reg, op, op.isREG(16 | i32e), T_0F, 0x%02X); }\n", p->name, p->code);
printf("void %s(const Reg&reg, const Operand& op) { opRO(reg, op, op.isREG(16|i32e), T_0F, 0x%02X); }\n", p->name, p->code);
}
}
{
Expand Down Expand Up @@ -1084,8 +1084,8 @@ void put()
puts("void ret(int imm = 0) { if (imm) { db(0xC2); dw(imm); } else { db(0xC3); } }");
puts("void retf(int imm = 0) { if (imm) { db(0xCA); dw(imm); } else { db(0xCB); } }");

puts("void xadd(const Operand& op, const Reg& reg) { opRO(reg, op, (op.isREG() && reg.isREG() && op.getBit() == reg.getBit()), T_0F, 0xC0 | (reg.isBit(8) ? 0 : 1)); }");
puts("void cmpxchg(const Operand& op, const Reg& reg) { opRO(reg, op, (op.isREG() && reg.isREG() && op.getBit() == reg.getBit()), T_0F, 0xB0 | (reg.isBit(8) ? 0 : 1)); }");
puts("void xadd(const Operand& op, const Reg& reg) { opRO(reg, op, op.getBit() == reg.getBit(), T_0F, 0xC0 | (reg.isBit(8) ? 0 : 1)); }");
puts("void cmpxchg(const Operand& op, const Reg& reg) { opRO(reg, op, op.getBit() == reg.getBit(), T_0F, 0xB0 | (reg.isBit(8) ? 0 : 1)); }");
puts("void movbe(const Reg& reg, const Address& addr) { opMR(addr, reg, T_0F38, 0xF0); }");
puts("void movbe(const Address& addr, const Reg& reg) { opMR(addr, reg, T_0F38, 0xF1); }");
puts("void movdiri(const Address& addr, const Reg32e& reg) { opMR(addr, reg, T_0F38, 0xF9); }");
Expand Down Expand Up @@ -1117,11 +1117,11 @@ void put()
puts("void movd(const Mmx& mmx, const Reg32& reg) { if (mmx.isXMM()) db(0x66); opRR(mmx, reg, T_0F, 0x6E); }");
puts("void movq2dq(const Xmm& xmm, const Mmx& mmx) { opRR(xmm, mmx, T_F3 | T_0F, 0xD6); }");
puts("void movdq2q(const Mmx& mmx, const Xmm& xmm) { opRR(mmx, xmm, T_F2 | T_0F, 0xD6); }");
puts("void movq(const Mmx& mmx, const Operand& op) { if (mmx.isXMM()) db(0xF3); opRO(mmx, op, (mmx.getKind() == op.getKind()), T_0F, mmx.isXMM() ? 0x7E : 0x6F); }");
puts("void movq(const Mmx& mmx, const Operand& op) { if (mmx.isXMM()) db(0xF3); opRO(mmx, op, mmx.getKind() == op.getKind(), T_0F, mmx.isXMM() ? 0x7E : 0x6F); }");
puts("void movq(const Address& addr, const Mmx& mmx) { if (mmx.isXMM()) db(0x66); opMR(addr, mmx, T_0F, mmx.isXMM() ? 0xD6 : 0x7F); }");
puts("void rdrand(const Reg& r) { if (r.isBit(8)) XBYAK_THROW(ERR_BAD_SIZE_OF_REGISTER) opRR(Reg(6, Operand::REG, r.getBit()), r, T_0F, 0xC7); }");
puts("void rdseed(const Reg& r) { if (r.isBit(8)) XBYAK_THROW(ERR_BAD_SIZE_OF_REGISTER) opRR(Reg(7, Operand::REG, r.getBit()), r, T_0F, 0xC7); }");
puts("void crc32(const Reg32e& reg, const Operand& op) { if (reg.isBit(32) && op.isBit(16)) db(0x66); opRO(reg, op, op.isREG(), T_F2 | T_0F38, 0xF0 | (op.isBit(8) ? 0 : 1)); }");
puts("void crc32(const Reg32e& reg, const Operand& op) { if (reg.isBit(32) && op.isBit(16)) db(0x66); opRO(reg, op, true, T_F2 | T_0F38, 0xF0 | (op.isBit(8) ? 0 : 1)); }");
puts("void tpause(const Reg32& r) { int idx = r.getIdx(); if (idx > 7) XBYAK_THROW(ERR_BAD_PARAMETER) db(0x66); db(0x0F); db(0xAE); setModRM(3, 6, idx); }");
puts("void umonitor(const Reg& r) { int idx = r.getIdx(); if (idx > 7) XBYAK_THROW(ERR_BAD_PARAMETER) int bit = r.getBit(); if (BIT != bit) { if ((BIT == 32 && bit == 16) || (BIT == 64 && bit == 32)) { db(0x67); } else { XBYAK_THROW(ERR_BAD_SIZE_OF_REGISTER) } } db(0xF3); db(0x0F); db(0xAE); setModRM(3, 6, idx); }");
puts("void umwait(const Reg32& r) { int idx = r.getIdx(); if (idx > 7) XBYAK_THROW(ERR_BAD_PARAMETER) db(0xF2); db(0x0F); db(0xAE); setModRM(3, 6, idx); }");
Expand Down Expand Up @@ -1902,7 +1902,7 @@ void put64()
putMemOp("fxrstor64", "T_0F", 1, 0xAE, 64);
puts("void movq(const Reg64& reg, const Mmx& mmx) { if (mmx.isXMM()) db(0x66); opRR(mmx, reg, T_0F, 0x7E); }");
puts("void movq(const Mmx& mmx, const Reg64& reg) { if (mmx.isXMM()) db(0x66); opRR(mmx, reg, T_0F, 0x6E); }");
puts("void movsxd(const Reg64& reg, const Operand& op) { if (!op.isBit(32)) XBYAK_THROW(ERR_BAD_COMBINATION) opRO(reg, op, op.isREG(), 0, 0x63); }");
puts("void movsxd(const Reg64& reg, const Operand& op) { if (!op.isBit(32)) XBYAK_THROW(ERR_BAD_COMBINATION) opRO(reg, op, true, 0, 0x63); }");
puts("void pextrq(const Operand& op, const Xmm& xmm, uint8_t imm) { if (!op.isREG(64) && !op.isMEM()) XBYAK_THROW(ERR_BAD_COMBINATION) opSSE(Reg64(xmm.getIdx()), op, T_66 | T_0F3A, 0x16, 0, imm); }");
puts("void pinsrq(const Xmm& xmm, const Operand& op, uint8_t imm) { if (!op.isREG(64) && !op.isMEM()) XBYAK_THROW(ERR_BAD_COMBINATION) opSSE(Reg64(xmm.getIdx()), op, T_66 | T_0F3A, 0x22, 0, imm); }");
puts("void senduipi(const Reg64& r) { opRR(Reg32(6), r.cvt32(), T_F3 | T_0F, 0xC7); }");
Expand Down
32 changes: 15 additions & 17 deletions xbyak/xbyak.h
Original file line number Diff line number Diff line change
Expand Up @@ -2110,11 +2110,7 @@ class CodeGenerator : public CodeArray {
{
if (isValid && !isValid(r, op)) XBYAK_THROW(ERR_BAD_COMBINATION)
if (!isValidSSE(r) || !isValidSSE(op)) XBYAK_THROW(ERR_NOT_SUPPORTED)
if (op.isMEM()) {
opMR(op.getAddress(), r, type, code, (imm8 != NONE) ? 1 : 0);
} else {
opRR(r, op.getReg(), type, code);
}
opRO(r, op, true, type, code, (imm8 != NONE) ? 1 : 0);
if (imm8 != NONE) db(imm8);
}
void opMMX_IMM(const Mmx& mmx, int imm8, int code, int ext)
Expand Down Expand Up @@ -2156,10 +2152,11 @@ class CodeGenerator : public CodeArray {
{
int opBit = op.getBit();
if (disableRex && opBit == 64) opBit = 32;
if (op.isREG(bit)) {
opRR(Reg(ext, Operand::REG, opBit), op.getReg().changeBit(opBit), type, code);
} else if (op.isMEM()) {
opMR(op.getAddress(), Reg(ext, Operand::REG, opBit), type, code, immSize);
const Reg r(ext, Operand::REG, opBit);
if (op.isMEM()) {
opMR(op.getAddress(), r, type, code, immSize);
} else if (op.isREG(bit)) {
opRR(r, op.getReg().changeBit(opBit), type, code);
} else {
XBYAK_THROW(ERR_BAD_COMBINATION)
}
Expand All @@ -2175,6 +2172,7 @@ class CodeGenerator : public CodeArray {
if (_cl.getIdx() != Operand::CL) XBYAK_THROW(ERR_BAD_COMBINATION)
opRext(op, 0, ext, 0, 0xD2);
}
// condR assumes that op.isREG() is true
void opRO(const Reg& r, const Operand& op, bool condR, int type, int code, int immSize = 0)
{
if (op.isMEM()) {
Expand All @@ -2189,7 +2187,7 @@ class CodeGenerator : public CodeArray {
{
if (_cl && _cl->getIdx() != Operand::CL) XBYAK_THROW(ERR_BAD_COMBINATION)
if (!reg.isREG(16 | i32e)) XBYAK_THROW(ERR_BAD_SIZE_OF_REGISTER)
opRO(reg, op, op.isREG(), T_0F, code | (_cl ? 1 : 0), _cl ? 0 : 1);
opRO(reg, op, true, T_0F, code | (_cl ? 1 : 0), _cl ? 0 : 1);
if (!_cl) db(imm);
}
// (REG, REG|MEM), (MEM, REG)
Expand All @@ -2199,7 +2197,7 @@ class CodeGenerator : public CodeArray {
if (!op1.isREG()) XBYAK_THROW(ERR_BAD_COMBINATION)
opMR(op2.getAddress(), op1.getReg(), 0, code | 2);
} else {
opRO(static_cast<const Reg&>(op2), op1, op1.isREG() && op1.getKind() == op2.getKind(), 0, code);
opRO(static_cast<const Reg&>(op2), op1, op1.getKind() == op2.getKind(), 0, code);
}
}
uint32_t getImmBit(const Operand& op, uint32_t imm)
Expand Down Expand Up @@ -2317,7 +2315,7 @@ class CodeGenerator : public CodeArray {
if (op.isBit(32)) XBYAK_THROW(ERR_BAD_COMBINATION)
int w = op.isBit(16);
if (!(reg.isREG() && (reg.getBit() > op.getBit()))) XBYAK_THROW(ERR_BAD_COMBINATION)
opRO(reg, op, op.isREG(), T_0F, code | w);
opRO(reg, op, true, T_0F, code | w);
}
void opFpuMem(const Address& addr, uint8_t m16, uint8_t m32, uint8_t m64, uint8_t ext, uint8_t m64ext)
{
Expand Down Expand Up @@ -2461,7 +2459,7 @@ class CodeGenerator : public CodeArray {
bool is16bit = reg.isREG(16) && (op.isREG(16) || op.isMEM());
if (!is16bit && !(reg.isREG(i32e) && (op.isREG(reg.getBit()) || op.isMEM()))) XBYAK_THROW(ERR_BAD_COMBINATION)
if (is16bit) db(0x66);
opRO(reg.changeBit(i32e == 32 ? 32 : reg.getBit()), op, op.isREG(), T_F3 | T_0F, code);
opRO(reg.changeBit(i32e == 32 ? 32 : reg.getBit()), op, true, T_F3 | T_0F, code);
}
void opGather(const Xmm& x1, const Address& addr, const Xmm& x2, int type, uint8_t code, int mode)
{
Expand Down Expand Up @@ -2684,7 +2682,7 @@ class CodeGenerator : public CodeArray {

void test(const Operand& op, const Reg& reg)
{
opRO(reg, op, op.isREG() && (op.getKind() == reg.getKind()), 0, 0x84);
opRO(reg, op, op.getKind() == reg.getKind(), 0, 0x84);
}
void test(const Operand& op, uint32_t imm)
{
Expand All @@ -2700,13 +2698,13 @@ class CodeGenerator : public CodeArray {
}
void imul(const Reg& reg, const Operand& op)
{
opRO(reg, op, op.isREG() && (reg.getKind() == op.getKind()), T_0F, 0xAF);
opRO(reg, op, reg.getKind() == op.getKind(), T_0F, 0xAF);
}
void imul(const Reg& reg, const Operand& op, int imm)
{
int s = inner::IsInDisp8(imm) ? 1 : 0;
int immSize = s ? 1 : reg.isREG(16) ? 2 : 4;
opRO(reg, op, op.isREG() && (reg.getKind() == op.getKind()), 0, 0x69 | (s << 1), immSize);
opRO(reg, op, reg.getKind() == op.getKind(), 0, 0x69 | (s << 1), immSize);
db(imm, immSize);
}
void push(const Operand& op) { opPushPop(op, 0xFF, 6, 0x50); }
Expand Down Expand Up @@ -2813,7 +2811,7 @@ class CodeGenerator : public CodeArray {
rex(*p2, *p1); db(0x90 | (p2->getIdx() & 7));
return;
}
opRO(static_cast<const Reg&>(*p1), *p2, (p1->isREG() && p2->isREG() && (p1->getBit() == p2->getBit())), 0, 0x86 | (p1->isBit(8) ? 0 : 1));
opRO(static_cast<const Reg&>(*p1), *p2, (p1->isREG() && (p1->getBit() == p2->getBit())), 0, 0x86 | (p1->isBit(8) ? 0 : 1));
}

#ifndef XBYAK_DISABLE_SEGMENT
Expand Down
30 changes: 15 additions & 15 deletions xbyak/xbyak_mnemonic.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ void bndmk(const BoundsReg& bnd, const Address& addr) { opMR(addr, bnd, T_F3 | T
void bndmov(const Address& addr, const BoundsReg& bnd) { opMR(addr, bnd, T_66 | T_0F, 0x1B); }
void bndmov(const BoundsReg& bnd, const Operand& op) { opRO(bnd, op, op.isBNDREG(), T_66 | T_0F, 0x1A); }
void bndstx(const Address& addr, const BoundsReg& bnd) { opMIB(addr, bnd, T_0F, 0x1B); }
void bsf(const Reg&reg, const Operand& op) { opRO(reg, op, op.isREG(16 | i32e), T_0F, 0xBC); }
void bsr(const Reg&reg, const Operand& op) { opRO(reg, op, op.isREG(16 | i32e), T_0F, 0xBD); }
void bsf(const Reg&reg, const Operand& op) { opRO(reg, op, op.isREG(16|i32e), T_0F, 0xBC); }
void bsr(const Reg&reg, const Operand& op) { opRO(reg, op, op.isREG(16|i32e), T_0F, 0xBD); }
void bswap(const Reg32e& reg) { opRR(Reg32(1), reg, 0, 0x0F); }
void bt(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|32|64) && op.getBit() == reg.getBit(), T_0F, 0xA3); }
void bt(const Operand& op, uint8_t imm) { opRext(op, 16|32|64, 4, T_0F, 0xba, false, 1); db(imm); }
void btc(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|32|64) && op.getBit() == reg.getBit(), T_0F, 0xBB); }
void btc(const Operand& op, uint8_t imm) { opRext(op, 16|32|64, 7, T_0F, 0xba, false, 1); db(imm); }
void btr(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|32|64) && op.getBit() == reg.getBit(), T_0F, 0xB3); }
void btr(const Operand& op, uint8_t imm) { opRext(op, 16|32|64, 6, T_0F, 0xba, false, 1); db(imm); }
void bts(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|32|64) && op.getBit() == reg.getBit(), T_0F, 0xAB); }
void bts(const Operand& op, uint8_t imm) { opRext(op, 16|32|64, 5, T_0F, 0xba, false, 1); db(imm); }
void bt(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|i32e) && op.getBit() == reg.getBit(), T_0F, 0xA3); }
void bt(const Operand& op, uint8_t imm) { opRext(op, 16|i32e, 4, T_0F, 0xba, false, 1); db(imm); }
void btc(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|i32e) && op.getBit() == reg.getBit(), T_0F, 0xBB); }
void btc(const Operand& op, uint8_t imm) { opRext(op, 16|i32e, 7, T_0F, 0xba, false, 1); db(imm); }
void btr(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|i32e) && op.getBit() == reg.getBit(), T_0F, 0xB3); }
void btr(const Operand& op, uint8_t imm) { opRext(op, 16|i32e, 6, T_0F, 0xba, false, 1); db(imm); }
void bts(const Operand& op, const Reg& reg) { opRO(reg, op, op.isREG(16|i32e) && op.getBit() == reg.getBit(), T_0F, 0xAB); }
void bts(const Operand& op, uint8_t imm) { opRext(op, 16|i32e, 5, T_0F, 0xba, false, 1); db(imm); }
void bzhi(const Reg32e& r1, const Operand& op, const Reg32e& r2) { opRRO(r1, r2, op, T_0F38, 0xf5); }
void cbw() { db(0x66); db(0x98); }
void cdq() { db(0x99); }
Expand Down Expand Up @@ -147,12 +147,12 @@ 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); }
void cmpunordss(const Xmm& x, const Operand& op) { cmpss(x, op, 3); }
void cmpxchg(const Operand& op, const Reg& reg) { opRO(reg, op, (op.isREG() && reg.isREG() && op.getBit() == reg.getBit()), T_0F, 0xB0 | (reg.isBit(8) ? 0 : 1)); }
void cmpxchg(const Operand& op, const Reg& reg) { opRO(reg, op, op.getBit() == reg.getBit(), T_0F, 0xB0 | (reg.isBit(8) ? 0 : 1)); }
void cmpxchg8b(const Address& addr) { opMR(addr, Reg32(1), T_0F, 0xC7); }
void comisd(const Xmm& xmm, const Operand& op) { opSSE(xmm, op, T_0F | T_66, 0x2F, isXMM_XMMorMEM); }
void comiss(const Xmm& xmm, const Operand& op) { opSSE(xmm, op, T_0F | 0, 0x2F, isXMM_XMMorMEM); }
void cpuid() { db(0x0F); db(0xA2); }
void crc32(const Reg32e& reg, const Operand& op) { if (reg.isBit(32) && op.isBit(16)) db(0x66); opRO(reg, op, op.isREG(), T_F2 | T_0F38, 0xF0 | (op.isBit(8) ? 0 : 1)); }
void crc32(const Reg32e& reg, const Operand& op) { if (reg.isBit(32) && op.isBit(16)) db(0x66); opRO(reg, op, true, T_F2 | T_0F38, 0xF0 | (op.isBit(8) ? 0 : 1)); }
void cvtdq2pd(const Xmm& xmm, const Operand& op) { opSSE(xmm, op, T_0F | T_F3, 0xE6, isXMM_XMMorMEM); }
void cvtdq2ps(const Xmm& xmm, const Operand& op) { opSSE(xmm, op, T_0F | 0, 0x5B, isXMM_XMMorMEM); }
void cvtpd2dq(const Xmm& xmm, const Operand& op) { opSSE(xmm, op, T_0F | T_F2, 0xE6, isXMM_XMMorMEM); }
Expand Down Expand Up @@ -537,7 +537,7 @@ void movntpd(const Address& addr, const Xmm& reg) { opMR(addr, Reg16(reg.getIdx(
void movntps(const Address& addr, const Xmm& xmm) { opMR(addr, Mmx(xmm.getIdx()), T_0F, 0x2B); }
void movntq(const Address& addr, const Mmx& mmx) { if (!mmx.isMMX()) XBYAK_THROW(ERR_BAD_COMBINATION) opMR(addr, mmx, T_0F, 0xE7); }
void movq(const Address& addr, const Mmx& mmx) { if (mmx.isXMM()) db(0x66); opMR(addr, mmx, T_0F, mmx.isXMM() ? 0xD6 : 0x7F); }
void movq(const Mmx& mmx, const Operand& op) { if (mmx.isXMM()) db(0xF3); opRO(mmx, op, (mmx.getKind() == op.getKind()), T_0F, mmx.isXMM() ? 0x7E : 0x6F); }
void movq(const Mmx& mmx, const Operand& op) { if (mmx.isXMM()) db(0xF3); opRO(mmx, op, mmx.getKind() == op.getKind(), T_0F, mmx.isXMM() ? 0x7E : 0x6F); }
void movq2dq(const Xmm& xmm, const Mmx& mmx) { opRR(xmm, mmx, T_F3 | T_0F, 0xD6); }
void movsb() { db(0xA4); }
void movsd() { db(0xA5); }
Expand Down Expand Up @@ -1403,7 +1403,7 @@ void wait() { db(0x9B); }
void wbinvd() { db(0x0F); db(0x09); }
void wrmsr() { db(0x0F); db(0x30); }
void xabort(uint8_t imm) { db(0xC6); db(0xF8); db(imm); }
void xadd(const Operand& op, const Reg& reg) { opRO(reg, op, (op.isREG() && reg.isREG() && op.getBit() == reg.getBit()), T_0F, 0xC0 | (reg.isBit(8) ? 0 : 1)); }
void xadd(const Operand& op, const Reg& reg) { opRO(reg, op, op.getBit() == reg.getBit(), T_0F, 0xC0 | (reg.isBit(8) ? 0 : 1)); }
void xbegin(uint32_t rel) { db(0xC7); db(0xF8); dd(rel); }
void xend() { db(0x0F); db(0x01); db(0xD5); }
void xgetbv() { db(0x0F); db(0x01); db(0xD0); }
Expand Down Expand Up @@ -1696,7 +1696,7 @@ void cmpxchg16b(const Address& addr) { opMR(addr, Reg64(1), T_0F, 0xC7); }
void fxrstor64(const Address& addr) { opMR(addr, Reg64(1), T_0F, 0xAE); }
void movq(const Reg64& reg, const Mmx& mmx) { if (mmx.isXMM()) db(0x66); opRR(mmx, reg, T_0F, 0x7E); }
void movq(const Mmx& mmx, const Reg64& reg) { if (mmx.isXMM()) db(0x66); opRR(mmx, reg, T_0F, 0x6E); }
void movsxd(const Reg64& reg, const Operand& op) { if (!op.isBit(32)) XBYAK_THROW(ERR_BAD_COMBINATION) opRO(reg, op, op.isREG(), 0, 0x63); }
void movsxd(const Reg64& reg, const Operand& op) { if (!op.isBit(32)) XBYAK_THROW(ERR_BAD_COMBINATION) opRO(reg, op, true, 0, 0x63); }
void pextrq(const Operand& op, const Xmm& xmm, uint8_t imm) { if (!op.isREG(64) && !op.isMEM()) XBYAK_THROW(ERR_BAD_COMBINATION) opSSE(Reg64(xmm.getIdx()), op, T_66 | T_0F3A, 0x16, 0, imm); }
void pinsrq(const Xmm& xmm, const Operand& op, uint8_t imm) { if (!op.isREG(64) && !op.isMEM()) XBYAK_THROW(ERR_BAD_COMBINATION) opSSE(Reg64(xmm.getIdx()), op, T_66 | T_0F3A, 0x22, 0, imm); }
void senduipi(const Reg64& r) { opRR(Reg32(6), r.cvt32(), T_F3 | T_0F, 0xC7); }
Expand Down

0 comments on commit 2d1f229

Please sign in to comment.