Prepare 32 bit support

This commit is contained in:
Maurice Heumann
2025-04-14 12:13:38 +02:00
parent 35945caeec
commit a6dd9251b8
29 changed files with 111 additions and 80 deletions

View File

@@ -2,6 +2,13 @@
#if defined(_WIN32) || defined(_WIN64)
#define OS_WINDOWS
#if defined(_WIN64)
#define OS_WINDOWS_64
#else
#define OS_WINDOWS_32
#endif
#elif defined(__APPLE__) || defined(__MACH__)
#define OS_MAC
#elif defined(__linux__)

View File

@@ -583,7 +583,7 @@ typedef struct _TEB64
ARRAY_CONTAINER<ULONG, 2> Rcu;
} TEB64, *PTEB64;
#ifdef OS_WINDOWS
#if defined(OS_WINDOWS) && defined(_WIN64)
inline TEB64* NtCurrentTeb64()
{
return reinterpret_cast<TEB64*>(__readgsqword(FIELD_OFFSET(EMU_NT_TIB64, Self)));

View File

@@ -66,8 +66,8 @@ typedef enum _SECTION_INHERIT
typedef struct DECLSPEC_ALIGN(16) _EMU_MEMORY_BASIC_INFORMATION64
{
void* BaseAddress;
void* AllocationBase;
uint64_t BaseAddress;
uint64_t AllocationBase;
DWORD AllocationProtect;
WORD PartitionId;
std::int64_t RegionSize;

View File

@@ -553,13 +553,15 @@ struct SYSTEM_PROCESSOR_INFORMATION64
ULONG ProcessorFeatureBits;
};
#ifndef OS_WINDOWS
#if !defined(OS_WINDOWS) || !defined(_WIN64)
#if !defined(OS_WINDOWS)
typedef struct _M128A
{
ULONGLONG Low;
LONGLONG High;
} M128A, *PM128A;
#endif
typedef struct _XMM_SAVE_AREA32
{