diff options
-rw-r--r-- | sample/test_util.cpp | 1 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 1 | ||||
-rw-r--r-- | xbyak/xbyak_util.h | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/sample/test_util.cpp b/sample/test_util.cpp index 39ed906..27b1cf0 100644 --- a/sample/test_util.cpp +++ b/sample/test_util.cpp @@ -85,6 +85,7 @@ void putCPUinfo() { Cpu::tAVX512_FP16, "avx512_fp16" }, { Cpu::tWAITPKG, "waitpkg" }, { Cpu::tCLFLUSHOPT, "clflushopt" }, + { Cpu::tCLDEMOTE, "cldemote" }, }; for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) { if (cpu.has(tbl[i].type)) printf(" %s", tbl[i].str); diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index d4cdfe5..3ee4763 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -57,6 +57,7 @@ void cbw() { db(0x66); db(0x98); } void cdq() { db(0x99); } void clc() { db(0xF8); } void cld() { db(0xFC); } +void cldemote(const Address& addr) { opMIB(addr, eax, 0x0F, 0x1C); } 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); } diff --git a/xbyak/xbyak_util.h b/xbyak/xbyak_util.h index 86d8d15..68d40f0 100644 --- a/xbyak/xbyak_util.h +++ b/xbyak/xbyak_util.h @@ -429,6 +429,7 @@ public: static const Type tAMX_BF16; static const Type tAVX_VNNI; static const Type tCLFLUSHOPT; + static const Type tCLDEMOTE; CpuT() : type_(NONE) @@ -551,6 +552,7 @@ public: if (EBX & (1U << 29)) type_ |= tSHA; if (ECX & (1U << 0)) type_ |= tPREFETCHWT1; if (ECX & (1U << 5)) type_ |= tWAITPKG; + if (ECX & (1U << 25)) type_ |= tCLDEMOTE; if (EDX & (1U << 24)) type_ |= tAMX_TILE; if (EDX & (1U << 25)) type_ |= tAMX_INT8; if (EDX & (1U << 22)) type_ |= tAMX_BF16; @@ -650,6 +652,7 @@ template<int dummy> const Type CpuT<dummy>::tAMX_INT8 = uint64_t(1) << 60; template<int dummy> const Type CpuT<dummy>::tAMX_BF16 = uint64_t(1) << 61; template<int dummy> const Type CpuT<dummy>::tAVX_VNNI = uint64_t(1) << 62; template<int dummy> const Type CpuT<dummy>::tCLFLUSHOPT = Type(1) << 63; +template<int dummy> const Type CpuT<dummy>::tCLDEMOTE = Type(1) << 64; } // local |