diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-11-20 17:54:11 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-11-20 17:54:11 +0900 |
commit | 92153b6f884ffdecab4643e74a444bf332c9b174 (patch) | |
tree | 17fa0fec6a14f180fc31d0ad81f5838bac16a35e /gen/gen_code.cpp | |
parent | d7ca6a2dd5e4429458da2ec8d50da2da60b5d5a4 (diff) | |
download | xbyak-92153b6f884ffdecab4643e74a444bf332c9b174.tar.gz xbyak-92153b6f884ffdecab4643e74a444bf332c9b174.zip |
crc32 supports apx
Diffstat (limited to 'gen/gen_code.cpp')
-rw-r--r-- | gen/gen_code.cpp | 2 |
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); }"); |