mirror of https://github.com/x64dbg/TitanEngine
allow using k0 register
This commit is contained in:
parent
c37f9978fb
commit
1aae30c447
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue