aboutsummaryrefslogtreecommitdiffhomepage
path: root/gen
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2023-11-20 17:54:11 +0900
committerMITSUNARI Shigeo <[email protected]>2023-11-20 17:54:11 +0900
commit92153b6f884ffdecab4643e74a444bf332c9b174 (patch)
tree17fa0fec6a14f180fc31d0ad81f5838bac16a35e /gen
parentd7ca6a2dd5e4429458da2ec8d50da2da60b5d5a4 (diff)
downloadxbyak-92153b6f884ffdecab4643e74a444bf332c9b174.tar.gz
xbyak-92153b6f884ffdecab4643e74a444bf332c9b174.zip
crc32 supports apx
Diffstat (limited to 'gen')
-rw-r--r--gen/gen_code.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp
index 68cadcb..3d2a2c8 100644
--- a/gen/gen_code.cpp
+++ b/gen/gen_code.cpp
@@ -1145,7 +1145,7 @@ void put()
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, T_F2 | T_0F38, 0xF0 | (op.isBit(8) ? 0 : 1)); }");
+ puts("void crc32(const Reg32e& r, const Operand& op) { if (!((r.isBit(32) && op.isBit(8|16|32)) || (r.isBit(64) && op.isBit(8|64)))) XBYAK_THROW(ERR_BAD_SIZE_OF_REGISTER) int code = 0xF0 | !op.isBit(8); uint64_t type = op.isBit(16) ? T_66:0; if (opROO(Reg(), op, static_cast<const Reg&>(r), T_VEX|type, code)) return; opRO(r, op, T_F2|T_0F38|type, code); }");
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); }");