modify definition of Type for Visual Studio with /O0
diff --git a/xbyak/xbyak_util.h b/xbyak/xbyak_util.h
index 2ee79ad..8682c98 100644
--- a/xbyak/xbyak_util.h
+++ b/xbyak/xbyak_util.h
@@ -330,77 +330,86 @@
#endif
}
- static const local::TypeT<0> NONE;
- static const local::TypeT<1 << 0> tMMX;
- static const local::TypeT<1 << 1> tMMX2;
- static const local::TypeT<1 << 2> tCMOV;
- static const local::TypeT<1 << 3> tSSE;
- static const local::TypeT<1 << 4> tSSE2;
- static const local::TypeT<1 << 5> tSSE3;
- static const local::TypeT<1 << 6> tSSSE3;
- static const local::TypeT<1 << 7> tSSE41;
- static const local::TypeT<1 << 8> tSSE42;
- static const local::TypeT<1 << 9> tPOPCNT;
- static const local::TypeT<1 << 10> tAESNI;
- static const local::TypeT<1 << 11> tAVX512_FP16;
- static const local::TypeT<1 << 12> tOSXSAVE;
- static const local::TypeT<1 << 13> tPCLMULQDQ;
- static const local::TypeT<1 << 14> tAVX;
- static const local::TypeT<1 << 15> tFMA;
- static const local::TypeT<1 << 16> t3DN;
- static const local::TypeT<1 << 17> tE3DN;
- static const local::TypeT<1 << 18> tWAITPKG;
- static const local::TypeT<1 << 19> tRDTSCP;
- static const local::TypeT<1 << 20> tAVX2;
- static const local::TypeT<1 << 21> tBMI1; // andn, bextr, blsi, blsmsk, blsr, tzcnt
- static const local::TypeT<1 << 22> tBMI2; // bzhi, mulx, pdep, pext, rorx, sarx, shlx, shrx
- static const local::TypeT<1 << 23> tLZCNT;
- static const local::TypeT<1 << 24> tINTEL;
- static const local::TypeT<1 << 25> tAMD;
- static const local::TypeT<1 << 26> tENHANCED_REP; // enhanced rep movsb/stosb
- static const local::TypeT<1 << 27> tRDRAND;
- static const local::TypeT<1 << 28> tADX; // adcx, adox
- static const local::TypeT<1 << 29> tRDSEED; // rdseed
- static const local::TypeT<1 << 30> tSMAP; // stac
- static const local::TypeT<uint64_t(1) << 31> tHLE; // xacquire, xrelease, xtest
- static const local::TypeT<uint64_t(1) << 32> tRTM; // xbegin, xend, xabort
- static const local::TypeT<uint64_t(1) << 33> tF16C; // vcvtph2ps, vcvtps2ph
- static const local::TypeT<uint64_t(1) << 34> tMOVBE; // mobve
- static const local::TypeT<uint64_t(1) << 35> tAVX512F;
- static const local::TypeT<uint64_t(1) << 36> tAVX512DQ;
- static const local::TypeT<uint64_t(1) << 37> tAVX512_IFMA;
- static const local::TypeT<uint64_t(1) << 37> tAVX512IFMA;// = tAVX512_IFMA;
- static const local::TypeT<uint64_t(1) << 38> tAVX512PF;
- static const local::TypeT<uint64_t(1) << 39> tAVX512ER;
- static const local::TypeT<uint64_t(1) << 40> tAVX512CD;
- static const local::TypeT<uint64_t(1) << 41> tAVX512BW;
- static const local::TypeT<uint64_t(1) << 42> tAVX512VL;
- static const local::TypeT<uint64_t(1) << 43> tAVX512_VBMI;
- static const local::TypeT<uint64_t(1) << 43> tAVX512VBMI; // = tAVX512_VBMI; // changed by Intel's manual
- static const local::TypeT<uint64_t(1) << 44> tAVX512_4VNNIW;
- static const local::TypeT<uint64_t(1) << 45> tAVX512_4FMAPS;
- static const local::TypeT<uint64_t(1) << 46> tPREFETCHWT1;
- static const local::TypeT<uint64_t(1) << 47> tPREFETCHW;
- static const local::TypeT<uint64_t(1) << 48> tSHA;
- static const local::TypeT<uint64_t(1) << 49> tMPX;
- static const local::TypeT<uint64_t(1) << 50> tAVX512_VBMI2;
- static const local::TypeT<uint64_t(1) << 51> tGFNI;
- static const local::TypeT<uint64_t(1) << 52> tVAES;
- static const local::TypeT<uint64_t(1) << 53> tVPCLMULQDQ;
- static const local::TypeT<uint64_t(1) << 54> tAVX512_VNNI;
- static const local::TypeT<uint64_t(1) << 55> tAVX512_BITALG;
- static const local::TypeT<uint64_t(1) << 56> tAVX512_VPOPCNTDQ;
- static const local::TypeT<uint64_t(1) << 57> tAVX512_BF16;
- static const local::TypeT<uint64_t(1) << 58> tAVX512_VP2INTERSECT;
- static const local::TypeT<uint64_t(1) << 59> tAMX_TILE;
- static const local::TypeT<uint64_t(1) << 60> tAMX_INT8;
- static const local::TypeT<uint64_t(1) << 61> tAMX_BF16;
- static const local::TypeT<uint64_t(1) << 62> tAVX_VNNI;
- static const local::TypeT<uint64_t(1) << 63> tCLFLUSHOPT;
- static const local::TypeT<0, 1 << 0> tCLDEMOTE;
- static const local::TypeT<0, 1 << 1> tMOVDIRI;
- static const local::TypeT<0, 1 << 2> tMOVDIR64B;
- static const local::TypeT<0, 1 << 3> tCLZERO; // AMD Zen
+#if (__cplusplus >= 201103) || (defined(_MSC_VER) && (_MSC_VER >= 1700)) /* Visual Studio 2012 or later */
+ #define XBYAK_TYPE_CONST const constexpr
+ #define XBYAK_BRACE {}
+#else
+ #define XBYAK_TYPE_CONST const
+ #define XBYAK_BRACE
+#endif
+ static XBYAK_TYPE_CONST local::TypeT<0> NONE XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 0> tMMX XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 1> tMMX2 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 2> tCMOV XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 3> tSSE XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 4> tSSE2 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 5> tSSE3 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 6> tSSSE3 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 7> tSSE41 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 8> tSSE42 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 9> tPOPCNT XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 10> tAESNI XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 11> tAVX512_FP16 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 12> tOSXSAVE XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 13> tPCLMULQDQ XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 14> tAVX XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 15> tFMA XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 16> t3DN XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 17> tE3DN XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 18> tWAITPKG XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 19> tRDTSCP XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 20> tAVX2 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 21> tBMI1 XBYAK_BRACE; // andn, bextr, blsi, blsmsk, blsr, tzcnt
+ static XBYAK_TYPE_CONST local::TypeT<1 << 22> tBMI2 XBYAK_BRACE; // bzhi, mulx, pdep, pext, rorx, sarx, shlx, shrx
+ static XBYAK_TYPE_CONST local::TypeT<1 << 23> tLZCNT XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 24> tINTEL XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 25> tAMD XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 26> tENHANCED_REP XBYAK_BRACE; // enhanced rep movsb/stosb
+ static XBYAK_TYPE_CONST local::TypeT<1 << 27> tRDRAND XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<1 << 28> tADX XBYAK_BRACE; // adcx, adox
+ static XBYAK_TYPE_CONST local::TypeT<1 << 29> tRDSEED XBYAK_BRACE; // rdseed
+ static XBYAK_TYPE_CONST local::TypeT<1 << 30> tSMAP XBYAK_BRACE; // stac
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 31> tHLE XBYAK_BRACE; // xacquire, xrelease, xtest
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 32> tRTM XBYAK_BRACE; // xbegin, xend, xabort
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 33> tF16C XBYAK_BRACE; // vcvtph2ps, vcvtps2ph
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 34> tMOVBE XBYAK_BRACE; // mobve
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 35> tAVX512F XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 36> tAVX512DQ XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 37> tAVX512_IFMA XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 37> tAVX512IFMA XBYAK_BRACE;// = tAVX512_IFMA;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 38> tAVX512PF XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 39> tAVX512ER XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 40> tAVX512CD XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 41> tAVX512BW XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 42> tAVX512VL XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 43> tAVX512_VBMI XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 43> tAVX512VBMI XBYAK_BRACE; // = tAVX512_VBMI; // changed by Intel's manual
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 44> tAVX512_4VNNIW XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 45> tAVX512_4FMAPS XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 46> tPREFETCHWT1 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 47> tPREFETCHW XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 48> tSHA XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 49> tMPX XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 50> tAVX512_VBMI2 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 51> tGFNI XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 52> tVAES XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 53> tVPCLMULQDQ XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 54> tAVX512_VNNI XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 55> tAVX512_BITALG XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 56> tAVX512_VPOPCNTDQ XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 57> tAVX512_BF16 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 58> tAVX512_VP2INTERSECT XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 59> tAMX_TILE XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 60> tAMX_INT8 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 61> tAMX_BF16 XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 62> tAVX_VNNI XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<uint64_t(1) << 63> tCLFLUSHOPT XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<0, 1 << 0> tCLDEMOTE XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<0, 1 << 1> tMOVDIRI XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<0, 1 << 2> tMOVDIR64B XBYAK_BRACE;
+ static XBYAK_TYPE_CONST local::TypeT<0, 1 << 3> tCLZERO XBYAK_BRACE; // AMD Zen
+#undef XBYAK_TYPE_CONST
+#undef XBYAK_BRACE
Cpu()
: type_(NONE)