mirror of https://github.com/x64dbg/TitanEngine
compiler generic XmmRegister types (mingw doesn't like M128A)
This commit is contained in:
parent
46398eba7b
commit
6e7778eddb
|
|
@ -10,14 +10,6 @@
|
|||
#include <windows.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
typedef struct DECLSPEC_ALIGN(16) _M128A
|
||||
{
|
||||
ULONGLONG Low;
|
||||
LONGLONG High;
|
||||
} M128A, *PM128A;
|
||||
#endif //__GNUC__
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
// Global.Constant.Structure.Declaration:
|
||||
|
|
@ -596,8 +588,14 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
M128A Low; //XMM/SSE part
|
||||
M128A High; //AVX part
|
||||
ULONGLONG Low;
|
||||
LONGLONG High;
|
||||
} XmmRegister_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
XmmRegister_t Low; //XMM/SSE part
|
||||
XmmRegister_t High; //AVX part
|
||||
} YmmRegister_t;
|
||||
|
||||
typedef struct
|
||||
|
|
@ -657,10 +655,10 @@ typedef struct
|
|||
x87FPU_t x87fpu;
|
||||
DWORD MxCsr;
|
||||
#ifdef _WIN64
|
||||
M128A XmmRegisters[16];
|
||||
XmmRegister_t XmmRegisters[16];
|
||||
YmmRegister_t YmmRegisters[16];
|
||||
#else // x86
|
||||
M128A XmmRegisters[8];
|
||||
XmmRegister_t XmmRegisters[8];
|
||||
YmmRegister_t YmmRegisters[8];
|
||||
#endif
|
||||
} TITAN_ENGINE_CONTEXT_t;
|
||||
|
|
|
|||
|
|
@ -962,8 +962,8 @@ __declspec(dllexport) bool TITCALL SetAVXContext(HANDLE hActiveThread, TITAN_ENG
|
|||
return false;
|
||||
|
||||
DWORD FeatureLength;
|
||||
PM128A Sse = (PM128A)_LocateXStateFeature(Context, XSTATE_LEGACY_SSE, &FeatureLength);
|
||||
PM128A Avx = (PM128A)_LocateXStateFeature(Context, XSTATE_AVX, NULL);
|
||||
XmmRegister_t* Sse = (XmmRegister_t*)_LocateXStateFeature(Context, XSTATE_LEGACY_SSE, &FeatureLength);
|
||||
XmmRegister_t* Avx = (XmmRegister_t*)_LocateXStateFeature(Context, XSTATE_AVX, NULL);
|
||||
int NumberOfRegisters = FeatureLength / sizeof(Sse[0]);
|
||||
|
||||
if(Sse != NULL) //If the feature is unsupported by the processor it will return NULL
|
||||
|
|
@ -1022,8 +1022,8 @@ __declspec(dllexport) bool TITCALL GetAVXContext(HANDLE hActiveThread, TITAN_ENG
|
|||
return false;
|
||||
|
||||
DWORD FeatureLength;
|
||||
PM128A Sse = (PM128A)_LocateXStateFeature(Context, XSTATE_LEGACY_SSE, &FeatureLength);
|
||||
PM128A Avx = (PM128A)_LocateXStateFeature(Context, XSTATE_AVX, NULL);
|
||||
XmmRegister_t* Sse = (XmmRegister_t*)_LocateXStateFeature(Context, XSTATE_LEGACY_SSE, &FeatureLength);
|
||||
XmmRegister_t* Avx = (XmmRegister_t*)_LocateXStateFeature(Context, XSTATE_AVX, NULL);
|
||||
int NumberOfRegisters = FeatureLength / sizeof(Sse[0]);
|
||||
|
||||
if(Sse != NULL) //If the feature is unsupported by the processor it will return NULL
|
||||
|
|
|
|||
|
|
@ -95,8 +95,14 @@
|
|||
|
||||
typedef struct
|
||||
{
|
||||
M128A Low; //XMM/SSE part
|
||||
M128A High; //AVX part
|
||||
ULONGLONG Low;
|
||||
LONGLONG High;
|
||||
} XmmRegister_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
XmmRegister_t Low; //XMM/SSE part
|
||||
XmmRegister_t High; //AVX part
|
||||
} YmmRegister_t;
|
||||
|
||||
typedef struct
|
||||
|
|
@ -156,10 +162,10 @@ typedef struct
|
|||
x87FPU_t x87fpu;
|
||||
DWORD MxCsr;
|
||||
#ifdef _WIN64
|
||||
M128A XmmRegisters[16];
|
||||
XmmRegister_t XmmRegisters[16];
|
||||
YmmRegister_t YmmRegisters[16];
|
||||
#else // x86
|
||||
M128A XmmRegisters[8];
|
||||
XmmRegister_t XmmRegisters[8];
|
||||
YmmRegister_t YmmRegisters[8];
|
||||
#endif
|
||||
} TITAN_ENGINE_CONTEXT_t;
|
||||
|
|
|
|||
Loading…
Reference in New Issue