diff --git a/SDK/C/TitanEngine.h b/SDK/C/TitanEngine.h index ea7bf8c..f39a1d4 100644 --- a/SDK/C/TitanEngine.h +++ b/SDK/C/TitanEngine.h @@ -681,7 +681,7 @@ typedef struct #else // x86 ZmmRegister_t ZmmRegisters[8]; #endif - ULONGLONG Opmask[7]; // k0 is omitted; AVX-512BW extends these registers from 16 bits to 64 bits + ULONGLONG Opmask[8]; } TITAN_ENGINE_CONTEXT_AVX512_t; #ifdef __cplusplus diff --git a/TitanEngine/TitanEngine.Debugger.Context.cpp b/TitanEngine/TitanEngine.Debugger.Context.cpp index 656c888..d684ad8 100644 --- a/TitanEngine/TitanEngine.Debugger.Context.cpp +++ b/TitanEngine/TitanEngine.Debugger.Context.cpp @@ -1141,9 +1141,8 @@ __declspec(dllexport) bool TITCALL SetAVX512Context(HANDLE hActiveThread, TITAN_ if (Avx512_KMASK != NULL) //If the feature is unsupported by the processor it will return NULL { - // k0 is always 0, don't store it. - for (int i = 1; i < MIN(FeatureLengthAvx512_KMASK / sizeof(ULONGLONG) - 1, _countof(titcontext->Opmask)); i++) - Avx512_KMASK[i] = titcontext->Opmask[i - 1]; + for (int i = 0; i < MIN(FeatureLengthAvx512_KMASK / sizeof(ULONGLONG), _countof(titcontext->Opmask)); i++) + Avx512_KMASK[i] = titcontext->Opmask[i]; } return (SetThreadContext(hActiveThread, Context) == TRUE); @@ -1241,9 +1240,8 @@ __declspec(dllexport) bool TITCALL GetAVX512Context(HANDLE hActiveThread, TITAN_ if (Avx512_KMASK != NULL) //If the feature is unsupported by the processor it will return NULL { - // k0 is always 0, don't store it. - for (int i = 1; i < MIN(FeatureLengthAvx512_KMASK / sizeof(ULONGLONG) - 1, _countof(titcontext->Opmask)); i++) - titcontext->Opmask[i - 1] = Avx512_KMASK[i]; + for (int i = 0; i < MIN(FeatureLengthAvx512_KMASK / sizeof(ULONGLONG), _countof(titcontext->Opmask)); i++) + titcontext->Opmask[i] = Avx512_KMASK[i]; } return true; diff --git a/TitanEngine/stdafx.h b/TitanEngine/stdafx.h index 3665df1..a2a67c1 100644 --- a/TitanEngine/stdafx.h +++ b/TitanEngine/stdafx.h @@ -203,7 +203,7 @@ typedef struct #else // x86 ZmmRegister_t ZmmRegisters[8]; #endif - ULONGLONG Opmask[7]; // k0 is omitted; AVX-512BW extends these registers from 16 bits to 64 bits + ULONGLONG Opmask[8]; } TITAN_ENGINE_CONTEXT_AVX512_t; typedef struct