зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1776281 - Update Zydis to version 3.2.1. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D150182
This commit is contained in:
Родитель
3ec2694a72
Коммит
b8e30b3751
|
@ -26,10 +26,107 @@
|
|||
|
||||
#include "zydis/Zycore/API/Memory.h"
|
||||
|
||||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
|
||||
#elif defined(ZYAN_POSIX)
|
||||
# include <unistd.h>
|
||||
#else
|
||||
# error "Unsupported platform detected"
|
||||
#endif
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Exported functions */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* General */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
ZyanU32 ZyanMemoryGetSystemPageSize()
|
||||
{
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
|
||||
SYSTEM_INFO system_info;
|
||||
GetSystemInfo(&system_info);
|
||||
|
||||
return system_info.dwPageSize;
|
||||
|
||||
#elif defined(ZYAN_POSIX)
|
||||
|
||||
return sysconf(_SC_PAGE_SIZE);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
ZyanU32 ZyanMemoryGetSystemAllocationGranularity()
|
||||
{
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
|
||||
SYSTEM_INFO system_info;
|
||||
GetSystemInfo(&system_info);
|
||||
|
||||
return system_info.dwAllocationGranularity;
|
||||
|
||||
#elif defined(ZYAN_POSIX)
|
||||
|
||||
return sysconf(_SC_PAGE_SIZE);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Memory management */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
ZyanStatus ZyanMemoryVirtualProtect(void* address, ZyanUSize size,
|
||||
ZyanMemoryPageProtection protection)
|
||||
{
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
|
||||
DWORD old;
|
||||
if (!VirtualProtect(address, size, protection, &old))
|
||||
{
|
||||
return ZYAN_STATUS_BAD_SYSTEMCALL;
|
||||
}
|
||||
|
||||
#elif defined(ZYAN_POSIX)
|
||||
|
||||
if (mprotect(address, size, protection))
|
||||
{
|
||||
return ZYAN_STATUS_BAD_SYSTEMCALL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ZyanStatus ZyanMemoryVirtualFree(void* address, ZyanUSize size)
|
||||
{
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
|
||||
ZYAN_UNUSED(size);
|
||||
if (!VirtualFree(address, 0, MEM_RELEASE))
|
||||
{
|
||||
return ZYAN_STATUS_BAD_SYSTEMCALL;
|
||||
}
|
||||
|
||||
#elif defined(ZYAN_POSIX)
|
||||
|
||||
if (munmap(address, size))
|
||||
{
|
||||
return ZYAN_STATUS_BAD_SYSTEMCALL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
||||
#endif /* ZYAN_NO_LIBC */
|
||||
|
|
|
@ -29,46 +29,109 @@
|
|||
* @brief
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_MEMORY_H
|
||||
#define ZYCORE_MEMORY_H
|
||||
#ifndef ZYCORE_API_MEMORY_H
|
||||
#define ZYCORE_API_MEMORY_H
|
||||
|
||||
#include "zydis/ZycoreExportConfig.h"
|
||||
#include "zydis/Zycore/Defines.h"
|
||||
#include "zydis/Zycore/Status.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
||||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
# include <windows.h>
|
||||
#elif defined(ZYAN_POSIX)
|
||||
# include <sys/mman.h>
|
||||
#else
|
||||
# error "Unsupported platform detected"
|
||||
#endif
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Enums and types */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanMemoryManager` struct.
|
||||
* Defines the `ZyanMemoryPageProtection` enum.
|
||||
*/
|
||||
typedef struct ZyanMemoryManager_
|
||||
typedef enum ZyanMemoryPageProtection_
|
||||
{
|
||||
int a;
|
||||
} ZyanMemoryManager;
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
|
||||
ZYAN_PAGE_READONLY = PAGE_READONLY,
|
||||
ZYAN_PAGE_READWRITE = PAGE_READWRITE,
|
||||
ZYAN_PAGE_EXECUTE = PAGE_EXECUTE,
|
||||
ZYAN_PAGE_EXECUTE_READ = PAGE_EXECUTE_READ,
|
||||
ZYAN_PAGE_EXECUTE_READWRITE = PAGE_EXECUTE_READWRITE
|
||||
|
||||
#elif defined(ZYAN_POSIX)
|
||||
|
||||
ZYAN_PAGE_READONLY = PROT_READ,
|
||||
ZYAN_PAGE_READWRITE = PROT_READ | PROT_WRITE,
|
||||
ZYAN_PAGE_EXECUTE = PROT_EXEC,
|
||||
ZYAN_PAGE_EXECUTE_READ = PROT_EXEC | PROT_READ,
|
||||
ZYAN_PAGE_EXECUTE_READWRITE = PROT_EXEC | PROT_READ | PROT_WRITE
|
||||
|
||||
#endif
|
||||
} ZyanMemoryPageProtection;
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Exported functions */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Memory manager */
|
||||
/* General */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the default memory manager.
|
||||
|
||||
* @return The default memory manager.
|
||||
* Returns the system page size.
|
||||
*
|
||||
* @return The system page size.
|
||||
*/
|
||||
ZYCORE_EXPORT const ZyanMemoryManager* ZyanMemoryManagerDefault(void);
|
||||
ZYCORE_EXPORT ZyanU32 ZyanMemoryGetSystemPageSize();
|
||||
|
||||
/**
|
||||
* Returns the system allocation granularity.
|
||||
*
|
||||
* The system allocation granularity specifies the minimum amount of bytes which can be allocated
|
||||
* at a specific address by a single call of `ZyanMemoryVirtualAlloc`.
|
||||
*
|
||||
* This value is typically 64KiB on Windows systems and equal to the page size on most POSIX
|
||||
* platforms.
|
||||
*
|
||||
* @return The system allocation granularity.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanU32 ZyanMemoryGetSystemAllocationGranularity();
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Memory management */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Changes the memory protection value of one or more pages.
|
||||
*
|
||||
* @param address The start address aligned to a page boundary.
|
||||
* @param size The size.
|
||||
* @param protection The new page protection value.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanMemoryVirtualProtect(void* address, ZyanUSize size,
|
||||
ZyanMemoryPageProtection protection);
|
||||
|
||||
/**
|
||||
* Releases one or more memory pages starting at the given address.
|
||||
*
|
||||
* @param address The start address aligned to a page boundary.
|
||||
* @param size The size.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanMemoryVirtualFree(void* address, ZyanUSize size);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
||||
#endif /* ZYCORE_MEMORY_H */
|
||||
#endif /* ZYAN_NO_LIBC */
|
||||
|
||||
#endif /* ZYCORE_API_MEMORY_H */
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
/***************************************************************************************************
|
||||
|
||||
Zyan Core Library (Zycore-C)
|
||||
|
||||
Original Author : Florian Bernd
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
|
||||
***************************************************************************************************/
|
||||
|
||||
#include "zydis/Zycore/Defines.h"
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
#if defined(ZYAN_KERNEL)
|
||||
# include <wdm.h>
|
||||
#else
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#elif defined(ZYAN_POSIX)
|
||||
# include <sys/mman.h>
|
||||
#else
|
||||
# error "Unsupported platform detected"
|
||||
#endif
|
||||
#include "zydis/Zycore/API/Process.h"
|
||||
|
||||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Exported functions */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* General */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
ZyanStatus ZyanProcessFlushInstructionCache(void* address, ZyanUSize size)
|
||||
{
|
||||
#if defined(ZYAN_WINDOWS)
|
||||
|
||||
if (!FlushInstructionCache(GetCurrentProcess(), address, size))
|
||||
{
|
||||
return ZYAN_STATUS_BAD_SYSTEMCALL;
|
||||
}
|
||||
|
||||
#elif defined(ZYAN_POSIX)
|
||||
|
||||
if (msync(address, size, MS_SYNC | MS_INVALIDATE))
|
||||
{
|
||||
return ZYAN_STATUS_BAD_SYSTEMCALL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
||||
#endif /* ZYAN_NO_LIBC */
|
|
@ -0,0 +1,70 @@
|
|||
/***************************************************************************************************
|
||||
|
||||
Zyan Core Library (Zycore-C)
|
||||
|
||||
Original Author : Florian Bernd
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
|
||||
***************************************************************************************************/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_API_PROCESS_H
|
||||
#define ZYCORE_API_PROCESS_H
|
||||
|
||||
#include "zydis/Zycore/Status.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
||||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Enums and types */
|
||||
/* ============================================================================================== */
|
||||
|
||||
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Exported functions */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* General */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Flushes the process instruction cache.
|
||||
*
|
||||
* @param address The address.
|
||||
* @param size The size.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanProcessFlushInstructionCache(void* address, ZyanUSize size);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
||||
#endif /* ZYAN_NO_LIBC */
|
||||
|
||||
#endif /* ZYCORE_API_PROCESS_H */
|
|
@ -32,7 +32,6 @@
|
|||
#ifndef ZYCORE_ALLOCATOR_H
|
||||
#define ZYCORE_ALLOCATOR_H
|
||||
|
||||
#include "zydis/ZycoreExportConfig.h"
|
||||
#include "zydis/Zycore/Status.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
||||
|
@ -47,7 +46,7 @@ extern "C" {
|
|||
struct ZyanAllocator_;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanAllocatorAllocate` function prototype.
|
||||
* Defines the `ZyanAllocatorAllocate` function prototype.
|
||||
*
|
||||
* @param allocator A pointer to the `ZyanAllocator` instance.
|
||||
* @param p Receives a pointer to the first memory block sufficient to hold an
|
||||
|
@ -66,7 +65,7 @@ typedef ZyanStatus (*ZyanAllocatorAllocate)(struct ZyanAllocator_* allocator, vo
|
|||
ZyanUSize element_size, ZyanUSize n);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanAllocatorDeallocate` function prototype.
|
||||
* Defines the `ZyanAllocatorDeallocate` function prototype.
|
||||
*
|
||||
* @param allocator A pointer to the `ZyanAllocator` instance.
|
||||
* @param p The pointer obtained from `(re-)allocate()`.
|
||||
|
@ -79,7 +78,7 @@ typedef ZyanStatus (*ZyanAllocatorDeallocate)(struct ZyanAllocator_* allocator,
|
|||
ZyanUSize element_size, ZyanUSize n);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanAllocator` struct.
|
||||
* Defines the `ZyanAllocator` struct.
|
||||
*
|
||||
* This is the base class for all custom allocator implementations.
|
||||
*
|
||||
|
@ -89,15 +88,15 @@ typedef ZyanStatus (*ZyanAllocatorDeallocate)(struct ZyanAllocator_* allocator,
|
|||
typedef struct ZyanAllocator_
|
||||
{
|
||||
/**
|
||||
* @brief The allocate function.
|
||||
* The allocate function.
|
||||
*/
|
||||
ZyanAllocatorAllocate allocate;
|
||||
/**
|
||||
* @brief The reallocate function.
|
||||
* The reallocate function.
|
||||
*/
|
||||
ZyanAllocatorAllocate reallocate;
|
||||
/**
|
||||
* @brief The deallocate function.
|
||||
* The deallocate function.
|
||||
*/
|
||||
ZyanAllocatorDeallocate deallocate;
|
||||
} ZyanAllocator;
|
||||
|
@ -107,7 +106,7 @@ typedef struct ZyanAllocator_
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanAllocator` instance.
|
||||
* Initializes the given `ZyanAllocator` instance.
|
||||
*
|
||||
* @param allocator A pointer to the `ZyanAllocator` instance.
|
||||
* @param allocate The allocate function.
|
||||
|
@ -122,7 +121,7 @@ ZYCORE_EXPORT ZyanStatus ZyanAllocatorInit(ZyanAllocator* allocator, ZyanAllocat
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Returns the default `ZyanAllocator` instance.
|
||||
* Returns the default `ZyanAllocator` instance.
|
||||
*
|
||||
* @return A pointer to the default `ZyanAllocator` instance.
|
||||
*
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implements command-line argument parsing.
|
||||
* Implements command-line argument parsing.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_ARGPARSE_H
|
||||
|
@ -46,50 +46,50 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Definition of a single argument.
|
||||
* Definition of a single argument.
|
||||
*/
|
||||
typedef struct ZyanArgParseDefinition_
|
||||
{
|
||||
/**
|
||||
* @brief The argument name, e.g. `--help`.
|
||||
* The argument name, e.g. `--help`.
|
||||
*
|
||||
* Must start with either one or two dashes. Single dash arguments must consist of a single
|
||||
* character, (e.g. `-n`), double-dash arguments can be of arbitrary length.
|
||||
*/
|
||||
const char* name;
|
||||
/**
|
||||
* @brief Whether the argument is boolean or expects a value.
|
||||
* Whether the argument is boolean or expects a value.
|
||||
*/
|
||||
ZyanBool boolean;
|
||||
/**
|
||||
* @brief Whether this argument is required (error if missing).
|
||||
* Whether this argument is required (error if missing).
|
||||
*/
|
||||
ZyanBool required;
|
||||
} ZyanArgParseDefinition;
|
||||
|
||||
/**
|
||||
* @brief Configuration for argument parsing.
|
||||
* Configuration for argument parsing.
|
||||
*/
|
||||
typedef struct ZyanArgParseConfig_
|
||||
{
|
||||
/**
|
||||
* @brief `argv` argument passed to `main` by LibC.
|
||||
* `argv` argument passed to `main` by LibC.
|
||||
*/
|
||||
const char** argv;
|
||||
/**
|
||||
* @brief `argc` argument passed to `main` by LibC.
|
||||
* `argc` argument passed to `main` by LibC.
|
||||
*/
|
||||
ZyanUSize argc;
|
||||
/**
|
||||
* @brief Minimum # of accepted unnamed / anonymous arguments.
|
||||
* Minimum # of accepted unnamed / anonymous arguments.
|
||||
*/
|
||||
ZyanUSize min_unnamed_args;
|
||||
/**
|
||||
* @brief Maximum # of accepted unnamed / anonymous arguments.
|
||||
* Maximum # of accepted unnamed / anonymous arguments.
|
||||
*/
|
||||
ZyanUSize max_unnamed_args;
|
||||
/**
|
||||
* @brief Argument definition array, or `ZYAN_NULL`.
|
||||
* Argument definition array, or `ZYAN_NULL`.
|
||||
*
|
||||
* Expects a pointer to an array of `ZyanArgParseDefinition` instances. The array is
|
||||
* terminated by setting the `.name` field of the last element to `ZYAN_NULL`. If no named
|
||||
|
@ -99,22 +99,22 @@ typedef struct ZyanArgParseConfig_
|
|||
} ZyanArgParseConfig;
|
||||
|
||||
/**
|
||||
* @brief Information about a parsed argument.
|
||||
* Information about a parsed argument.
|
||||
*/
|
||||
typedef struct ZyanArgParseArg_
|
||||
{
|
||||
/**
|
||||
* @brief Corresponding argument definition, or `ZYAN_NULL` for unnamed args.
|
||||
* Corresponding argument definition, or `ZYAN_NULL` for unnamed args.
|
||||
*
|
||||
* This pointer is borrowed from the `cfg` pointer passed to `ZyanArgParse`.
|
||||
*/
|
||||
const ZyanArgParseDefinition* def;
|
||||
/**
|
||||
* @brief Whether the argument has a value (is non-boolean).
|
||||
* Whether the argument has a value (is non-boolean).
|
||||
*/
|
||||
ZyanBool has_value;
|
||||
/**
|
||||
* @brief If `has_value == true`, then the argument value.
|
||||
* If `has_value == true`, then the argument value.
|
||||
*
|
||||
* This is a view into the `argv` string array passed to `ZyanArgParse` via the `cfg` argument.
|
||||
*/
|
||||
|
@ -128,7 +128,7 @@ typedef struct ZyanArgParseArg_
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Parse arguments according to a `ZyanArgParseConfig` definition.
|
||||
* Parse arguments according to a `ZyanArgParseConfig` definition.
|
||||
*
|
||||
* @param cfg Argument parser config to use.
|
||||
* @param parsed Receives the parsed output. Vector of `ZyanArgParseArg`. Ownership is
|
||||
|
@ -146,7 +146,7 @@ ZYCORE_EXPORT ZyanStatus ZyanArgParse(const ZyanArgParseConfig *cfg, ZyanVector*
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief Parse arguments according to a `ZyanArgParseConfig` definition.
|
||||
* Parse arguments according to a `ZyanArgParseConfig` definition.
|
||||
*
|
||||
* This version allows specification of a custom memory allocator and thus supports no-libc.
|
||||
*
|
||||
|
|
|
@ -0,0 +1,236 @@
|
|||
/***************************************************************************************************
|
||||
|
||||
Zyan Core Library (Zyan-C)
|
||||
|
||||
Original Author : Florian Bernd
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
|
||||
***************************************************************************************************/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Cross compiler atomic intrinsics.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_ATOMIC_H
|
||||
#define ZYCORE_ATOMIC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "zydis/Zycore/Defines.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Enums and Types */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/*
|
||||
* Wraps a 32-bit value to provide atomic access.
|
||||
*/
|
||||
typedef struct ZyanAtomic32_
|
||||
{
|
||||
ZyanU32 volatile value;
|
||||
} ZyanAtomic32;
|
||||
|
||||
/*
|
||||
* Wraps a 64-bit value to provide atomic access.
|
||||
*/
|
||||
typedef struct ZyanAtomic64_
|
||||
{
|
||||
ZyanU64 volatile value;
|
||||
} ZyanAtomic64;
|
||||
|
||||
/*
|
||||
* Wraps a pointer-sized value to provide atomic access.
|
||||
*/
|
||||
typedef struct ZyanAtomicPointer_
|
||||
{
|
||||
ZyanVoidPointer volatile value;
|
||||
} ZyanAtomicPointer;
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Macros */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Pointer sized */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicCompareExchange
|
||||
*/
|
||||
#define ZYAN_ATOMIC_COMPARE_EXCHANGE(destination, comparand, value) \
|
||||
ZyanAtomicCompareExchange((ZyanAtomicPointer*)&(destination), (comparand), (value))
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicIncrement
|
||||
*/
|
||||
#define ZYAN_ATOMIC_INCREMENT(destination) \
|
||||
ZyanAtomicIncrement((ZyanAtomicPointer*)&(destination));
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicDecrement
|
||||
*/
|
||||
#define ZYAN_ATOMIC_DECREMENT(destination) \
|
||||
ZyanAtomicDecrement((ZyanAtomicPointer*)&(destination));
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* 32-bit */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicCompareExchange
|
||||
*/
|
||||
#define ZYAN_ATOMIC_COMPARE_EXCHANGE32(destination, comparand, value) \
|
||||
ZyanAtomicCompareExchange32((ZyanAtomic32*)&(destination), (comparand), (value))
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicIncrement
|
||||
*/
|
||||
#define ZYAN_ATOMIC_INCREMENT32(destination) \
|
||||
ZyanAtomicIncrement32((ZyanAtomic32*)&(destination));
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicDecrement
|
||||
*/
|
||||
#define ZYAN_ATOMIC_DECREMENT32(destination) \
|
||||
ZyanAtomicDecrement32((ZyanAtomic32*)&(destination));
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* 64-bit */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicCompareExchange
|
||||
*/
|
||||
#define ZYAN_ATOMIC_COMPARE_EXCHANGE64(destination, comparand, value) \
|
||||
ZyanAtomicCompareExchange64((ZyanAtomic64*)&(destination), (comparand), (value))
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicIncrement
|
||||
*/
|
||||
#define ZYAN_ATOMIC_INCREMENT64(destination) \
|
||||
ZyanAtomicIncrement64((ZyanAtomic64*)&(destination));
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicDecrement
|
||||
*/
|
||||
#define ZYAN_ATOMIC_DECREMENT64(destination) \
|
||||
ZyanAtomicDecrement64((ZyanAtomic64*)&(destination));
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Functions */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Pointer sized */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Compares two values for equality and, if they are equal, replaces the first value.
|
||||
*
|
||||
* @param destination A pointer to the destination value.
|
||||
* @param comparand The value to compare with.
|
||||
* @param value The replacement value.
|
||||
*
|
||||
* @return The original value.
|
||||
*/
|
||||
static ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination,
|
||||
ZyanUPointer comparand, ZyanUPointer value);
|
||||
|
||||
/**
|
||||
* Increments the given value and stores the result, as an atomic operation.
|
||||
*
|
||||
* @param destination A pointer to the destination value.
|
||||
*
|
||||
* @return The incremented value.
|
||||
*/
|
||||
static ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination);
|
||||
|
||||
/**
|
||||
* Decrements the given value and stores the result, as an atomic operation.
|
||||
*
|
||||
* @param destination A pointer to the destination value.
|
||||
*
|
||||
* @return The decremented value.
|
||||
*/
|
||||
static ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* 32-bit */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicCompareExchange
|
||||
*/
|
||||
static ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination,
|
||||
ZyanU32 comparand, ZyanU32 value);
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicIncrement
|
||||
*/
|
||||
static ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination);
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicDecrement
|
||||
*/
|
||||
static ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* 64-bit */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicCompareExchange
|
||||
*/
|
||||
static ZyanU64 ZyanAtomicCompareExchange64(ZyanAtomic64* destination,
|
||||
ZyanU64 comparand, ZyanU64 value);
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicIncrement
|
||||
*/
|
||||
static ZyanU64 ZyanAtomicIncrement64(ZyanAtomic64* destination);
|
||||
|
||||
/**
|
||||
* @copydoc ZyanAtomicDecrement
|
||||
*/
|
||||
static ZyanU64 ZyanAtomicDecrement64(ZyanAtomic64* destination);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
||||
#if defined(ZYAN_CLANG) || defined(ZYAN_GCC) || defined(ZYAN_ICC)
|
||||
# include "zydis/Zycore/Internal/AtomicGNU.h"
|
||||
#elif defined(ZYAN_MSVC)
|
||||
# include "zydis/Zycore/Internal/AtomicMSVC.h"
|
||||
#else
|
||||
# error "Unsupported compiler detected"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZYCORE_ATOMIC_H */
|
|
@ -31,15 +31,15 @@
|
|||
/* Internal constants */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#define ZYAN_BITSET_GROWTH_FACTOR 2.00f
|
||||
#define ZYAN_BITSET_SHRINK_THRESHOLD 0.50f
|
||||
#define ZYAN_BITSET_GROWTH_FACTOR 2
|
||||
#define ZYAN_BITSET_SHRINK_THRESHOLD 2
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Internal macros */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Computes the smallest integer value not less than `x`.
|
||||
* Computes the smallest integer value not less than `x`.
|
||||
*
|
||||
* @param x The value.
|
||||
*
|
||||
|
@ -49,17 +49,17 @@
|
|||
(((x) == ((ZyanU32)(x))) ? (ZyanU32)(x) : ((ZyanU32)(x)) + 1)
|
||||
|
||||
/**
|
||||
* @brief Converts bits to bytes.
|
||||
* Converts bits to bytes.
|
||||
*
|
||||
* @param x The value in bits.
|
||||
*
|
||||
* @return The amount of bytes needed to fit `x` bits.
|
||||
*/
|
||||
#define ZYAN_BITSET_BITS_TO_BYTES(x) \
|
||||
ZYAN_BITSET_CEIL((x) / 8.0f)
|
||||
ZYAN_BITSET_CEIL((x) / 8)
|
||||
|
||||
/**
|
||||
* @brief Returns the offset of the given bit.
|
||||
* Returns the offset of the given bit.
|
||||
*
|
||||
* @param index The bit index.
|
||||
*
|
||||
|
@ -77,7 +77,7 @@
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `vector` with `count` "zero"-bytes.
|
||||
* Initializes the given `vector` with `count` "zero"-bytes.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param count The number of bytes.
|
||||
|
@ -140,7 +140,7 @@ ZyanStatus ZyanBitsetInit(ZyanBitset* bitset, ZyanUSize count)
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
ZyanStatus ZyanBitsetInitEx(ZyanBitset* bitset, ZyanUSize count, ZyanAllocator* allocator,
|
||||
float growth_factor, float shrink_threshold)
|
||||
ZyanU8 growth_factor, ZyanU8 shrink_threshold)
|
||||
{
|
||||
if (!bitset)
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ ZyanStatus ZyanBitsetInitEx(ZyanBitset* bitset, ZyanUSize count, ZyanAllocator*
|
|||
const ZyanU32 bytes = ZYAN_BITSET_BITS_TO_BYTES(count);
|
||||
|
||||
bitset->size = count;
|
||||
ZYAN_CHECK(ZyanVectorInitEx(&bitset->bits, sizeof(ZyanU8), bytes, ZYAN_NULL, allocator,
|
||||
ZYAN_CHECK(ZyanVectorInitEx(&bitset->bits, sizeof(ZyanU8), bytes, ZYAN_NULL, allocator,
|
||||
growth_factor, shrink_threshold));
|
||||
ZYAN_CHECK(ZyanBitsetInitVectorElements(&bitset->bits, bytes));
|
||||
|
||||
|
@ -172,7 +172,7 @@ ZyanStatus ZyanBitsetInitBuffer(ZyanBitset* bitset, ZyanUSize count, void* buffe
|
|||
}
|
||||
|
||||
bitset->size = count;
|
||||
ZYAN_CHECK(ZyanVectorInitCustomBuffer(&bitset->bits, sizeof(ZyanU8), buffer, capacity,
|
||||
ZYAN_CHECK(ZyanVectorInitCustomBuffer(&bitset->bits, sizeof(ZyanU8), buffer, capacity,
|
||||
ZYAN_NULL));
|
||||
ZYAN_CHECK(ZyanBitsetInitVectorElements(&bitset->bits, bytes));
|
||||
|
||||
|
@ -661,7 +661,7 @@ ZyanStatus ZyanBitsetNone(const ZyanBitset* bitset)
|
|||
// }
|
||||
//
|
||||
// // TODO:
|
||||
//
|
||||
//
|
||||
// return ZYAN_STATUS_SUCCESS;
|
||||
//}
|
||||
|
||||
|
|
|
@ -26,13 +26,12 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implements the bitset class.
|
||||
* Implements the bitset class.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_BITSET_H
|
||||
#define ZYCORE_BITSET_H
|
||||
|
||||
#include "zydis/ZycoreExportConfig.h"
|
||||
#include "zydis/Zycore/Allocator.h"
|
||||
#include "zydis/Zycore/Status.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
@ -47,7 +46,7 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanVector` struct.
|
||||
* Defines the `ZyanVector` struct.
|
||||
*
|
||||
* All fields in this struct should be considered as "private". Any changes may lead to unexpected
|
||||
* behavior.
|
||||
|
@ -55,17 +54,17 @@ extern "C" {
|
|||
typedef struct ZyanBitset_
|
||||
{
|
||||
/**
|
||||
* @brief The bitset size.
|
||||
* The bitset size.
|
||||
*/
|
||||
ZyanUSize size;
|
||||
/**
|
||||
* @brief The bitset data.
|
||||
* The bitset data.
|
||||
*/
|
||||
ZyanVector bits;
|
||||
} ZyanBitset;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanBitsetByteOperation` function prototype.
|
||||
* Defines the `ZyanBitsetByteOperation` function prototype.
|
||||
*
|
||||
* @param v1 A pointer to the first byte. This value receives the result after performing the
|
||||
* desired operation.
|
||||
|
@ -88,7 +87,7 @@ typedef ZyanStatus (*ZyanBitsetByteOperation)(ZyanU8* v1, const ZyanU8* v2);
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanBitset` instance.
|
||||
* Initializes the given `ZyanBitset` instance.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param count The initial amount of bits.
|
||||
|
@ -96,33 +95,33 @@ typedef ZyanStatus (*ZyanBitsetByteOperation)(ZyanU8* v1, const ZyanU8* v2);
|
|||
* @return A zyan status code.
|
||||
*
|
||||
* The space for the bitset is dynamically allocated by the default allocator using the default
|
||||
* growth factor of `2.0f` and the default shrink threshold of `0.5f`.
|
||||
* growth factor and the default shrink threshold.
|
||||
*/
|
||||
ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanBitsetInit(ZyanBitset* bitset, ZyanUSize count);
|
||||
|
||||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanBitset` instance and sets a custom `allocator` and memory
|
||||
* allocation/deallocation parameters.
|
||||
* Initializes the given `ZyanBitset` instance and sets a custom `allocator` and memory
|
||||
* allocation/deallocation parameters.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param count The initial amount of bits.
|
||||
* @param allocator A pointer to a `ZyanAllocator` instance.
|
||||
* @param growth_factor The growth factor (from `1.0f` to `x.xf`).
|
||||
* @param shrink_threshold The shrink threshold (from `0.0f` to `1.0f`).
|
||||
* @param growth_factor The growth factor.
|
||||
* @param shrink_threshold The shrink threshold.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
* A growth factor of `1.0f` disables overallocation and a shrink threshold of `0.0f` disables
|
||||
* A growth factor of `1` disables overallocation and a shrink threshold of `0` disables
|
||||
* dynamic shrinking.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanBitsetInitEx(ZyanBitset* bitset, ZyanUSize count,
|
||||
ZyanAllocator* allocator, float growth_factor, float shrink_threshold);
|
||||
ZyanAllocator* allocator, ZyanU8 growth_factor, ZyanU8 shrink_threshold);
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanBitset` instance and configures it to use a custom user
|
||||
* defined buffer with a fixed size.
|
||||
* Initializes the given `ZyanBitset` instance and configures it to use a custom user
|
||||
* defined buffer with a fixed size.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param count The initial amount of bits.
|
||||
|
@ -135,7 +134,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetInitBuffer(ZyanBitset* bitset, ZyanUSize coun
|
|||
ZyanUSize capacity);
|
||||
|
||||
/**
|
||||
* @brief Destroys the given `ZyanBitset` instance.
|
||||
* Destroys the given `ZyanBitset` instance.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
|
@ -148,7 +147,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetDestroy(ZyanBitset* bitset);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Performs a byte-wise `operation` for every byte in the given `ZyanBitset` instances.
|
||||
* Performs a byte-wise `operation` for every byte in the given `ZyanBitset` instances.
|
||||
*
|
||||
* @param destination A pointer to the `ZyanBitset` instance that is used as the first input and
|
||||
* as the destination.
|
||||
|
@ -164,7 +163,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetPerformByteOperation(ZyanBitset* destination,
|
|||
const ZyanBitset* source, ZyanBitsetByteOperation operation);
|
||||
|
||||
/**
|
||||
* @brief Performs a logical `AND` operation on the given `ZyanBitset` instances.
|
||||
* Performs a logical `AND` operation on the given `ZyanBitset` instances.
|
||||
*
|
||||
* @param destination A pointer to the `ZyanBitset` instance that is used as the first input and
|
||||
* as the destination.
|
||||
|
@ -178,7 +177,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetPerformByteOperation(ZyanBitset* destination,
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetAND(ZyanBitset* destination, const ZyanBitset* source);
|
||||
|
||||
/**
|
||||
* @brief Performs a logical `OR` operation on the given `ZyanBitset` instances.
|
||||
* Performs a logical `OR` operation on the given `ZyanBitset` instances.
|
||||
*
|
||||
* @param destination A pointer to the `ZyanBitset` instance that is used as the first input and
|
||||
* as the destination.
|
||||
|
@ -192,7 +191,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetAND(ZyanBitset* destination, const ZyanBitset
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetOR (ZyanBitset* destination, const ZyanBitset* source);
|
||||
|
||||
/**
|
||||
* @brief Performs a logical `XOR` operation on the given `ZyanBitset` instances.
|
||||
* Performs a logical `XOR` operation on the given `ZyanBitset` instances.
|
||||
*
|
||||
* @param destination A pointer to the `ZyanBitset` instance that is used as the first input and
|
||||
* as the destination.
|
||||
|
@ -206,7 +205,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetOR (ZyanBitset* destination, const ZyanBitset
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetXOR(ZyanBitset* destination, const ZyanBitset* source);
|
||||
|
||||
/**
|
||||
* @brief Flips all bits of the given `ZyanBitset` instance.
|
||||
* Flips all bits of the given `ZyanBitset` instance.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
|
@ -219,7 +218,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetFlip(ZyanBitset* bitset);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Sets the bit at `index` of the given `ZyanBitset` instance to `1`.
|
||||
* Sets the bit at `index` of the given `ZyanBitset` instance to `1`.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param index The bit index.
|
||||
|
@ -229,7 +228,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetFlip(ZyanBitset* bitset);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetSet(ZyanBitset* bitset, ZyanUSize index);
|
||||
|
||||
/**
|
||||
* @brief Sets the bit at `index` of the given `ZyanBitset` instance to `0`.
|
||||
* Sets the bit at `index` of the given `ZyanBitset` instance to `0`.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param index The bit index.
|
||||
|
@ -239,7 +238,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetSet(ZyanBitset* bitset, ZyanUSize index);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetReset(ZyanBitset* bitset, ZyanUSize index);
|
||||
|
||||
/**
|
||||
* @brief Sets the bit at `index` of the given `ZyanBitset` instance to the specified `value`.
|
||||
* Sets the bit at `index` of the given `ZyanBitset` instance to the specified `value`.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param index The bit index.
|
||||
|
@ -250,7 +249,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetReset(ZyanBitset* bitset, ZyanUSize index);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetAssign(ZyanBitset* bitset, ZyanUSize index, ZyanBool value);
|
||||
|
||||
/**
|
||||
* @brief Toggles the bit at `index` of the given `ZyanBitset` instance.
|
||||
* Toggles the bit at `index` of the given `ZyanBitset` instance.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param index The bit index.
|
||||
|
@ -260,40 +259,40 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetAssign(ZyanBitset* bitset, ZyanUSize index, Z
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetToggle(ZyanBitset* bitset, ZyanUSize index);
|
||||
|
||||
/**
|
||||
* @brief Returns the value of the bit at `index`.
|
||||
* Returns the value of the bit at `index`.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param index The bit index.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the bit is set or `ZYAN_STATUS_FALSE`, if not, Another zyan
|
||||
* status code, if an error occured.
|
||||
* status code, if an error occurred.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanBitsetTest(ZyanBitset* bitset, ZyanUSize index);
|
||||
|
||||
/**
|
||||
* @brief Returns the value of the most significant bit.
|
||||
* Returns the value of the most significant bit.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the bit is set or `ZYAN_STATUS_FALSE`, if not. Another zyan
|
||||
* status code, if an error occured.
|
||||
* status code, if an error occurred.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanBitsetTestMSB(ZyanBitset* bitset);
|
||||
|
||||
/**
|
||||
* @brief Returns the value of the least significant bit.
|
||||
* Returns the value of the least significant bit.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the bit is set or `ZYAN_STATUS_FALSE`, if not. Another zyan
|
||||
* status code, if an error occured.
|
||||
* status code, if an error occurred.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanBitsetTestLSB(ZyanBitset* bitset);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Sets all bits of the given `ZyanBitset` instance to `1`.
|
||||
* Sets all bits of the given `ZyanBitset` instance to `1`.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
|
@ -302,7 +301,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetTestLSB(ZyanBitset* bitset);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetSetAll(ZyanBitset* bitset);
|
||||
|
||||
/**
|
||||
* @brief Sets all bits of the given `ZyanBitset` instance to `0`.
|
||||
* Sets all bits of the given `ZyanBitset` instance to `0`.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
|
@ -315,7 +314,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetResetAll(ZyanBitset* bitset);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Adds a new bit at the end of the bitset.
|
||||
* Adds a new bit at the end of the bitset.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param value The value of the new bit.
|
||||
|
@ -325,7 +324,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetResetAll(ZyanBitset* bitset);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetPush(ZyanBitset* bitset, ZyanBool value);
|
||||
|
||||
/**
|
||||
* @brief Removes the last bit of the bitset.
|
||||
* Removes the last bit of the bitset.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
|
@ -334,7 +333,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetPush(ZyanBitset* bitset, ZyanBool value);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetPop(ZyanBitset* bitset);
|
||||
|
||||
/**
|
||||
* @brief Deletes all bits of the given `ZyanBitset` instance.
|
||||
* Deletes all bits of the given `ZyanBitset` instance.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
|
@ -347,7 +346,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetClear(ZyanBitset* bitset);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Changes the capacity of the given `ZyanBitset` instance.
|
||||
* Changes the capacity of the given `ZyanBitset` instance.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param count The new capacity (number of bits).
|
||||
|
@ -357,7 +356,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetClear(ZyanBitset* bitset);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetReserve(ZyanBitset* bitset, ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Shrinks the capacity of the given bitset to match it's size.
|
||||
* Shrinks the capacity of the given bitset to match it's size.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
|
@ -370,7 +369,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetShrinkToFit(ZyanBitset* bitset);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the current size of the bitset in bits.
|
||||
* Returns the current size of the bitset in bits.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param size Receives the size of the bitset in bits.
|
||||
|
@ -380,7 +379,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetShrinkToFit(ZyanBitset* bitset);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetGetSize(const ZyanBitset* bitset, ZyanUSize* size);
|
||||
|
||||
/**
|
||||
* @brief Returns the current capacity of the bitset in bits.
|
||||
* Returns the current capacity of the bitset in bits.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param capacity Receives the size of the bitset in bits.
|
||||
|
@ -390,7 +389,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetGetSize(const ZyanBitset* bitset, ZyanUSize*
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetGetCapacity(const ZyanBitset* bitset, ZyanUSize* capacity);
|
||||
|
||||
/**
|
||||
* @brief Returns the current size of the bitset in bytes.
|
||||
* Returns the current size of the bitset in bytes.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param size Receives the size of the bitset in bytes.
|
||||
|
@ -400,7 +399,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetGetCapacity(const ZyanBitset* bitset, ZyanUSi
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetGetSizeBytes(const ZyanBitset* bitset, ZyanUSize* size);
|
||||
|
||||
/**
|
||||
* @brief Returns the current capacity of the bitset in bytes.
|
||||
* Returns the current capacity of the bitset in bytes.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param capacity Receives the size of the bitset in bytes.
|
||||
|
@ -412,7 +411,7 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetGetCapacityBytes(const ZyanBitset* bitset, Zy
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the amount of bits set in the given bitset.
|
||||
* Returns the amount of bits set in the given bitset.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
* @param count Receives the amount of bits set in the given bitset.
|
||||
|
@ -422,54 +421,54 @@ ZYCORE_EXPORT ZyanStatus ZyanBitsetGetCapacityBytes(const ZyanBitset* bitset, Zy
|
|||
ZYCORE_EXPORT ZyanStatus ZyanBitsetCount(const ZyanBitset* bitset, ZyanUSize* count);
|
||||
|
||||
/**
|
||||
* @brief Checks, if all bits of the given bitset are set.
|
||||
* Checks, if all bits of the given bitset are set.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if all bits are set, `ZYAN_STATUS_FALSE`, if not. Another zyan
|
||||
* status code, if an error occured.
|
||||
* status code, if an error occurred.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanBitsetAll(const ZyanBitset* bitset);
|
||||
|
||||
/**
|
||||
* @brief Checks, if at least one bit of the given bitset is set.
|
||||
* Checks, if at least one bit of the given bitset is set.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if at least one bit is set, `ZYAN_STATUS_FALSE`, if not. Another
|
||||
* zyan status code, if an error occured.
|
||||
* zyan status code, if an error occurred.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanBitsetAny(const ZyanBitset* bitset);
|
||||
|
||||
/**
|
||||
* @brief Checks, if none bits of the given bitset are set.
|
||||
* Checks, if none bits of the given bitset are set.
|
||||
*
|
||||
* @param bitset A pointer to the `ZyanBitset` instance.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if none bits are set, `ZYAN_STATUS_FALSE`, if not. Another zyan
|
||||
* status code, if an error occured.
|
||||
* status code, if an error occurred.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanBitsetNone(const ZyanBitset* bitset);
|
||||
|
||||
///* ---------------------------------------------------------------------------------------------- */
|
||||
//
|
||||
///**
|
||||
// * @brief Returns a 32-bit unsigned integer representation of the data.
|
||||
// *
|
||||
// * Returns a 32-bit unsigned integer representation of the data.
|
||||
// *
|
||||
// * @param bitset A pointer to the `ZyanBitset` instance.
|
||||
// * @param value Receives the 32-bit unsigned integer representation of the data.
|
||||
// *
|
||||
// * @return A zyan status code.
|
||||
// *
|
||||
// * @return A zyan status code.
|
||||
// */
|
||||
//ZYCORE_EXPORT ZyanStatus ZyanBitsetToU32(const ZyanBitset* bitset, ZyanU32* value);
|
||||
//
|
||||
///**
|
||||
// * @brief Returns a 64-bit unsigned integer representation of the data.
|
||||
// *
|
||||
// * Returns a 64-bit unsigned integer representation of the data.
|
||||
// *
|
||||
// * @param bitset A pointer to the `ZyanBitset` instance.
|
||||
// * @param value Receives the 64-bit unsigned integer representation of the data.
|
||||
// *
|
||||
// * @return A zyan status code.
|
||||
// *
|
||||
// * @return A zyan status code.
|
||||
// */
|
||||
//ZYCORE_EXPORT ZyanStatus ZyanBitsetToU64(const ZyanBitset* bitset, ZyanU64* value);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Defines prototypes of general-purpose comparison functions.
|
||||
* Defines prototypes of general-purpose comparison functions.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_COMPARISON_H
|
||||
|
@ -44,7 +44,7 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanEqualityComparison` function prototype.
|
||||
* Defines the `ZyanEqualityComparison` function prototype.
|
||||
*
|
||||
* @param left A pointer to the first element.
|
||||
* @param right A pointer to the second element.
|
||||
|
@ -55,7 +55,7 @@ extern "C" {
|
|||
typedef ZyanBool (*ZyanEqualityComparison)(const void* left, const void* right);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanComparison` function prototype.
|
||||
* Defines the `ZyanComparison` function prototype.
|
||||
*
|
||||
* @param left A pointer to the first element.
|
||||
* @param right A pointer to the second element.
|
||||
|
@ -76,10 +76,10 @@ typedef ZyanI32 (*ZyanComparison)(const void* left, const void* right);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Declares a generic equality comparison function for an integral datatype.
|
||||
* Declares a generic equality comparison function for an integral data-type.
|
||||
*
|
||||
* @param name The name of the function.
|
||||
* @param type The name of the integral datatype.
|
||||
* @param type The name of the integral data-type.
|
||||
*/
|
||||
#define ZYAN_DECLARE_EQUALITY_COMPARISON(name, type) \
|
||||
ZyanBool name(const type* left, const type* right) \
|
||||
|
@ -91,11 +91,11 @@ typedef ZyanI32 (*ZyanComparison)(const void* left, const void* right);
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Declares a generic equality comparison function that compares a single integral
|
||||
* datatype field of a struct.
|
||||
* Declares a generic equality comparison function that compares a single integral
|
||||
* data-type field of a struct.
|
||||
*
|
||||
* @param name The name of the function.
|
||||
* @param type The name of the integral datatype.
|
||||
* @param type The name of the integral data-type.
|
||||
* @param field_name The name of the struct field.
|
||||
*/
|
||||
#define ZYAN_DECLARE_EQUALITY_COMPARISON_FOR_FIELD(name, type, field_name) \
|
||||
|
@ -112,10 +112,10 @@ typedef ZyanI32 (*ZyanComparison)(const void* left, const void* right);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Declares a generic comparison function for an integral datatype.
|
||||
* Declares a generic comparison function for an integral data-type.
|
||||
*
|
||||
* @param name The name of the function.
|
||||
* @param type The name of the integral datatype.
|
||||
* @param type The name of the integral data-type.
|
||||
*/
|
||||
#define ZYAN_DECLARE_COMPARISON(name, type) \
|
||||
ZyanI32 name(const type* left, const type* right) \
|
||||
|
@ -135,11 +135,11 @@ typedef ZyanI32 (*ZyanComparison)(const void* left, const void* right);
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Declares a generic comparison function that compares a single integral datatype field
|
||||
* Declares a generic comparison function that compares a single integral data-type field
|
||||
* of a struct.
|
||||
*
|
||||
* @param name The name of the function.
|
||||
* @param type The name of the integral datatype.
|
||||
* @param type The name of the integral data-type.
|
||||
* @param field_name The name of the struct field.
|
||||
*/
|
||||
#define ZYAN_DECLARE_COMPARISON_FOR_FIELD(name, type, field_name) \
|
||||
|
@ -170,7 +170,7 @@ typedef ZyanI32 (*ZyanComparison)(const void* left, const void* right);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines a default equality comparison function for pointer values.
|
||||
* Defines a default equality comparison function for pointer values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -181,7 +181,7 @@ typedef ZyanI32 (*ZyanComparison)(const void* left, const void* right);
|
|||
ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsPointer, void* const)
|
||||
|
||||
/**
|
||||
* @brief Defines a default equality comparison function for `ZyanBool` values.
|
||||
* Defines a default equality comparison function for `ZyanBool` values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -192,7 +192,7 @@ ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsPointer, void* const)
|
|||
ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsBool, ZyanBool)
|
||||
|
||||
/**
|
||||
* @brief Defines a default equality comparison function for 8-bit numeric values.
|
||||
* Defines a default equality comparison function for 8-bit numeric values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -203,7 +203,7 @@ ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsBool, ZyanBool)
|
|||
ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric8, ZyanU8)
|
||||
|
||||
/**
|
||||
* @brief Defines a default equality comparison function for 16-bit numeric values.
|
||||
* Defines a default equality comparison function for 16-bit numeric values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -214,7 +214,7 @@ ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric8, ZyanU8)
|
|||
ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric16, ZyanU16)
|
||||
|
||||
/**
|
||||
* @brief Defines a default equality comparison function for 32-bit numeric values.
|
||||
* Defines a default equality comparison function for 32-bit numeric values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -225,7 +225,7 @@ ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric16, ZyanU16)
|
|||
ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric32, ZyanU32)
|
||||
|
||||
/**
|
||||
* @brief Defines a default equality comparison function for 64-bit numeric values.
|
||||
* Defines a default equality comparison function for 64-bit numeric values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -240,7 +240,7 @@ ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric64, ZyanU64)
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines a default comparison function for pointer values.
|
||||
* Defines a default comparison function for pointer values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -251,7 +251,7 @@ ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric64, ZyanU64)
|
|||
ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanComparePointer, void* const)
|
||||
|
||||
/**
|
||||
* @brief Defines a default comparison function for `ZyanBool` values.
|
||||
* Defines a default comparison function for `ZyanBool` values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -262,7 +262,7 @@ ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanComparePointer, void* const)
|
|||
ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareBool, ZyanBool)
|
||||
|
||||
/**
|
||||
* @brief Defines a default comparison function for 8-bit numeric values.
|
||||
* Defines a default comparison function for 8-bit numeric values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -273,7 +273,7 @@ ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareBool, ZyanBool)
|
|||
ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareNumeric8, ZyanU8)
|
||||
|
||||
/**
|
||||
* @brief Defines a default comparison function for 16-bit numeric values.
|
||||
* Defines a default comparison function for 16-bit numeric values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -284,7 +284,7 @@ ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareNumeric8, ZyanU8)
|
|||
ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareNumeric16, ZyanU16)
|
||||
|
||||
/**
|
||||
* @brief Defines a default comparison function for 32-bit numeric values.
|
||||
* Defines a default comparison function for 32-bit numeric values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
@ -295,7 +295,7 @@ ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareNumeric16, ZyanU16)
|
|||
ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareNumeric32, ZyanU32)
|
||||
|
||||
/**
|
||||
* @brief Defines a default comparison function for 64-bit numeric values.
|
||||
* Defines a default comparison function for 64-bit numeric values.
|
||||
*
|
||||
* @param left A pointer to the first value.
|
||||
* @param right A pointer to the second value.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief General helper and platform detection macros.
|
||||
* General helper and platform detection macros.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_DEFINES_H
|
||||
|
@ -37,21 +37,21 @@
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Concatenates two values using the stringify operator (`##`).
|
||||
* Concatenates two values using the stringify operator (`##`).
|
||||
*
|
||||
* @brief x The first value.
|
||||
* @brief y The second value.
|
||||
* @param x The first value.
|
||||
* @param y The second value.
|
||||
*
|
||||
* @return The combined string of the given values.
|
||||
*/
|
||||
#define ZYAN_MACRO_CONCAT(x, y) x ## y
|
||||
|
||||
/**
|
||||
* @brief Concatenates two values using the stringify operator (`##`) and expands the value to
|
||||
* Concatenates two values using the stringify operator (`##`) and expands the value to
|
||||
* be used in another macro.
|
||||
*
|
||||
* @brief x The first value.
|
||||
* @brief y The second value.
|
||||
* @param x The first value.
|
||||
* @param y The second value.
|
||||
*
|
||||
* @return The combined string of the given values.
|
||||
*/
|
||||
|
@ -85,6 +85,9 @@
|
|||
# define ZYAN_WINDOWS
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
# define ZYAN_EMSCRIPTEN
|
||||
#elif defined(__wasi__) || defined(__WASI__)
|
||||
// via: https://reviews.llvm.org/D57155
|
||||
# define ZYAN_WASI
|
||||
#elif defined(__APPLE__)
|
||||
# define ZYAN_APPLE
|
||||
# define ZYAN_POSIX
|
||||
|
@ -131,8 +134,8 @@
|
|||
# define ZYAN_AARCH64
|
||||
#elif defined(_M_ARM) || defined(_M_ARMT) || defined(__arm__) || defined(__thumb__)
|
||||
# define ZYAN_ARM
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
// Nothing to do, `ZYAN_EMSCRIPTEN` is both platform and arch macro for this one.
|
||||
#elif defined(__EMSCRIPTEN__) || defined(__wasm__) || defined(__WASM__)
|
||||
# define ZYAN_WASM
|
||||
#else
|
||||
# error "Unsupported architecture detected"
|
||||
#endif
|
||||
|
@ -157,22 +160,103 @@
|
|||
# define ZYAN_RELEASE
|
||||
#endif
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Deprecation hint */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#if defined(ZYAN_GCC) || defined(ZYAN_CLANG)
|
||||
# define ZYAN_DEPRECATED __attribute__((__deprecated__))
|
||||
#elif defined(ZYAN_MSVC)
|
||||
# define ZYAN_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
# define ZYAN_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Generic DLL import/export helpers */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#if defined(ZYAN_MSVC)
|
||||
# define ZYAN_DLLEXPORT __declspec(dllexport)
|
||||
# define ZYAN_DLLIMPORT __declspec(dllimport)
|
||||
#else
|
||||
# define ZYAN_DLLEXPORT
|
||||
# define ZYAN_DLLIMPORT
|
||||
#endif
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Zycore dll{export,import} */
|
||||
/* ============================================================================================== */
|
||||
|
||||
// This is a cut-down version of what CMake's `GenerateExportHeader` would usually generate. To
|
||||
// simplify builds without CMake, we define these things manually instead of relying on CMake
|
||||
// to generate the header.
|
||||
//
|
||||
// For static builds, our CMakeList will define `ZYCORE_STATIC_BUILD`. For shared library builds,
|
||||
// our CMake will define `ZYCORE_SHOULD_EXPORT` depending on whether the target is being imported or
|
||||
// exported. If CMake isn't used, users can manually define these to fit their use-case.
|
||||
|
||||
// Backward compatibility: CMake would previously generate these variables names. However, because
|
||||
// they have pretty cryptic names, we renamed them when we got rid of `GenerateExportHeader`. For
|
||||
// backward compatibility for users that don't use CMake and previously manually defined these, we
|
||||
// translate the old defines here and print a warning.
|
||||
#if defined(ZYCORE_STATIC_DEFINE)
|
||||
# pragma message("ZYCORE_STATIC_DEFINE was renamed to ZYCORE_STATIC_BUILD.")
|
||||
# define ZYCORE_STATIC_BUILD
|
||||
#endif
|
||||
#if defined(Zycore_EXPORTS)
|
||||
# pragma message("Zycore_EXPORTS was renamed to ZYCORE_SHOULD_EXPORT.")
|
||||
# define ZYCORE_SHOULD_EXPORT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Symbol is exported in shared library builds.
|
||||
*/
|
||||
#if defined(ZYCORE_STATIC_BUILD)
|
||||
# define ZYCORE_EXPORT
|
||||
#else
|
||||
# if defined(ZYCORE_SHOULD_EXPORT)
|
||||
# define ZYCORE_EXPORT ZYAN_DLLEXPORT
|
||||
# else
|
||||
# define ZYCORE_EXPORT ZYAN_DLLIMPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Symbol is not exported and for internal use only.
|
||||
*/
|
||||
#define ZYCORE_NO_EXPORT
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Misc compatibility macros */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#if defined(ZYAN_CLANG)
|
||||
# define ZYAN_NO_SANITIZE(what) __attribute__((no_sanitize(what)))
|
||||
#else
|
||||
# define ZYAN_NO_SANITIZE(what)
|
||||
#endif
|
||||
|
||||
#if defined(ZYAN_MSVC) || defined(ZYAN_BORLAND)
|
||||
# define ZYAN_INLINE __inline
|
||||
#else
|
||||
# define ZYAN_INLINE static inline
|
||||
#endif
|
||||
|
||||
#if defined(ZYAN_MSVC)
|
||||
# define ZYAN_NOINLINE __declspec(noinline)
|
||||
#elif defined(ZYAN_GCC) || defined(ZYAN_CLANG)
|
||||
# define ZYAN_NOINLINE __attribute__((noinline))
|
||||
#else
|
||||
# define ZYAN_NOINLINE
|
||||
#endif
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Debugging and optimization macros */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Runtime debug assersion.
|
||||
* Runtime debug assertion.
|
||||
*/
|
||||
#if defined(ZYAN_NO_LIBC)
|
||||
# define ZYAN_ASSERT(condition) (void)(condition)
|
||||
|
@ -185,7 +269,7 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief Compiler-time assertion.
|
||||
* Compiler-time assertion.
|
||||
*/
|
||||
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
|
||||
# define ZYAN_STATIC_ASSERT(x) _Static_assert(x, #x)
|
||||
|
@ -199,7 +283,7 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief Marks the current code path as unreachable.
|
||||
* Marks the current code path as unreachable.
|
||||
*/
|
||||
#if defined(ZYAN_RELEASE)
|
||||
# if defined(ZYAN_CLANG) // GCC eagerly evals && RHS, we have to use nested ifs.
|
||||
|
@ -240,35 +324,35 @@
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Marks the specified parameter as unused.
|
||||
* Marks the specified parameter as unused.
|
||||
*
|
||||
* @param x The name of the unused parameter.
|
||||
*/
|
||||
#define ZYAN_UNUSED(x) (void)(x)
|
||||
|
||||
/**
|
||||
* @brief Intentional fallthrough.
|
||||
* Intentional fallthrough.
|
||||
*/
|
||||
#if defined(ZYAN_GCC) && __GNUC__ >= 7
|
||||
# define ZYAN_FALLTHROUGH __attribute__((fallthrough))
|
||||
# define ZYAN_FALLTHROUGH __attribute__((__fallthrough__))
|
||||
#else
|
||||
# define ZYAN_FALLTHROUGH
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Declares a bitfield.
|
||||
* Declares a bitfield.
|
||||
*
|
||||
* @param x The size (in bits) of the bitfield.
|
||||
*/
|
||||
#define ZYAN_BITFIELD(x) : x
|
||||
|
||||
/**
|
||||
* @brief Marks functions that require libc (cannot be used with `ZYAN_NO_LIBC`).
|
||||
* Marks functions that require libc (cannot be used with `ZYAN_NO_LIBC`).
|
||||
*/
|
||||
#define ZYAN_REQUIRES_LIBC
|
||||
|
||||
/**
|
||||
* @brief Decorator for `printf`-style functions.
|
||||
* Decorator for `printf`-style functions.
|
||||
*
|
||||
* @param format_index The 1-based index of the format string parameter.
|
||||
* @param first_to_check The 1-based index of the format arguments parameter.
|
||||
|
@ -284,7 +368,7 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief Decorator for `wprintf`-style functions.
|
||||
* Decorator for `wprintf`-style functions.
|
||||
*
|
||||
* @param format_index The 1-based index of the format string parameter.
|
||||
* @param first_to_check The 1-based index of the format arguments parameter.
|
||||
|
@ -301,7 +385,7 @@
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the length (number of elements) of an array.
|
||||
* Returns the length (number of elements) of an array.
|
||||
*
|
||||
* @param a The name of the array.
|
||||
*
|
||||
|
@ -314,7 +398,7 @@
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the smaller value of `a` or `b`.
|
||||
* Returns the smaller value of `a` or `b`.
|
||||
*
|
||||
* @param a The first value.
|
||||
* @param b The second value.
|
||||
|
@ -324,7 +408,7 @@
|
|||
#define ZYAN_MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
/**
|
||||
* @brief Returns the bigger value of `a` or `b`.
|
||||
* Returns the bigger value of `a` or `b`.
|
||||
*
|
||||
* @param a The first value.
|
||||
* @param b The second value.
|
||||
|
@ -334,7 +418,7 @@
|
|||
#define ZYAN_MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
/**
|
||||
* @brief Returns the absolute value of `a`.
|
||||
* Returns the absolute value of `a`.
|
||||
*
|
||||
* @param a The value.
|
||||
*
|
||||
|
@ -343,7 +427,7 @@
|
|||
#define ZYAN_ABS(a) (((a) < 0) ? -(a) : (a))
|
||||
|
||||
/**
|
||||
* @brief Checks, if the given value is a power of 2.
|
||||
* Checks, if the given value is a power of 2.
|
||||
*
|
||||
* @param x The value.
|
||||
*
|
||||
|
@ -354,14 +438,14 @@
|
|||
#define ZYAN_IS_POWER_OF_2(x) (((x) & ((x) - 1)) == 0)
|
||||
|
||||
/**
|
||||
* @brief Checks, if the given value is properly aligned.
|
||||
* Checks, if the given value is properly aligned.
|
||||
*
|
||||
* Note that this macro only works for powers of 2.
|
||||
*/
|
||||
#define ZYAN_IS_ALIGNED_TO(x, align) ((x & (align - 1)) == 0)
|
||||
#define ZYAN_IS_ALIGNED_TO(x, align) (((x) & ((align) - 1)) == 0)
|
||||
|
||||
/**
|
||||
* @brief Aligns the value to the nearest given alignment boundary (by rounding it up).
|
||||
* Aligns the value to the nearest given alignment boundary (by rounding it up).
|
||||
*
|
||||
* @param x The value.
|
||||
* @param align The desired alignment.
|
||||
|
@ -373,7 +457,7 @@
|
|||
#define ZYAN_ALIGN_UP(x, align) (((x) + (align) - 1) & ~((align) - 1))
|
||||
|
||||
/**
|
||||
* @brief Aligns the value to the nearest given alignment boundary (by rounding it down).
|
||||
* Aligns the value to the nearest given alignment boundary (by rounding it down).
|
||||
*
|
||||
* @param x The value.
|
||||
* @param align The desired alignment.
|
||||
|
@ -389,7 +473,7 @@
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* @brief Checks, if the bit at index `b` is required to present the ordinal value `n`.
|
||||
* Checks, if the bit at index `b` is required to present the ordinal value `n`.
|
||||
*
|
||||
* @param n The ordinal value.
|
||||
* @param b The bit index.
|
||||
|
@ -402,7 +486,7 @@
|
|||
#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
|
||||
|
||||
/*
|
||||
* @brief Returns the number of bits required to represent the ordinal value `n`.
|
||||
* Returns the number of bits required to represent the ordinal value `n`.
|
||||
*
|
||||
* @param n The ordinal value.
|
||||
*
|
||||
|
|
|
@ -70,7 +70,7 @@ static const ZyanStringView STR_SUB = ZYAN_DEFINE_STRING_VIEW("-");
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Writes a terminating '\0' character at the end of the string data.
|
||||
* Writes a terminating '\0' character at the end of the string data.
|
||||
*/
|
||||
#define ZYCORE_STRING_NULLTERMINATE(string) \
|
||||
*(char*)((ZyanU8*)(string)->vector.data + (string)->vector.size - 1) = '\0';
|
||||
|
@ -83,7 +83,7 @@ static const ZyanStringView STR_SUB = ZYAN_DEFINE_STRING_VIEW("-");
|
|||
/* Decimal */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN)
|
||||
#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM)
|
||||
ZyanStatus ZyanStringAppendDecU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length)
|
||||
{
|
||||
if (!string)
|
||||
|
@ -179,7 +179,7 @@ ZyanStatus ZyanStringAppendDecU64(ZyanString* string, ZyanU64 value, ZyanU8 padd
|
|||
/* Hexadecimal */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN)
|
||||
#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM)
|
||||
ZyanStatus ZyanStringAppendHexU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length,
|
||||
ZyanBool uppercase)
|
||||
{
|
||||
|
@ -445,7 +445,7 @@ ZyanStatus ZyanStringAppendDecS(ZyanString* string, ZyanI64 value, ZyanU8 paddin
|
|||
{
|
||||
ZYAN_CHECK(ZyanStringAppend(string, prefix));
|
||||
}
|
||||
return ZyanStringAppendDecU(string, -value, padding_length);
|
||||
return ZyanStringAppendDecU(string, ZyanAbsI64(value), padding_length);
|
||||
}
|
||||
|
||||
if (force_sign)
|
||||
|
@ -486,7 +486,7 @@ ZyanStatus ZyanStringAppendHexS(ZyanString* string, ZyanI64 value, ZyanU8 paddin
|
|||
{
|
||||
ZYAN_CHECK(ZyanStringAppend(string, prefix));
|
||||
}
|
||||
return ZyanStringAppendHexU(string, -value, padding_length, uppercase);
|
||||
return ZyanStringAppendHexU(string, ZyanAbsI64(value), padding_length, uppercase);
|
||||
}
|
||||
|
||||
if (force_sign)
|
||||
|
|
|
@ -26,13 +26,12 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Provides helper functions for performant number to string conversion.
|
||||
* Provides helper functions for performant number to string conversion.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_FORMAT_H
|
||||
#define ZYCORE_FORMAT_H
|
||||
|
||||
#include "zydis/ZycoreExportConfig.h"
|
||||
#include "zydis/Zycore/Status.h"
|
||||
#include "zydis/Zycore/String.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
@ -45,12 +44,37 @@ extern "C" {
|
|||
/* Exported functions */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Helpers */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Get the absolute value of a 64 bit int.
|
||||
*
|
||||
* @param x The value to process.
|
||||
* @return The absolute, unsigned value.
|
||||
*
|
||||
* This gracefully deals with the special case of `x` being `INT_MAX`.
|
||||
*/
|
||||
ZYAN_INLINE ZyanU64 ZyanAbsI64(ZyanI64 x)
|
||||
{
|
||||
// INT_MIN special case. Can't use the value directly because GCC thinks
|
||||
// it's too big for an INT64 literal, however is perfectly happy to accept
|
||||
// this expression. This is also hit INT64_MIN is defined in `stdint.h`.
|
||||
if (x == (-0x7fffffffffffffff - 1))
|
||||
{
|
||||
return 0x8000000000000000u;
|
||||
}
|
||||
|
||||
return (ZyanU64)(x < 0 ? -x : x);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Insertion */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Inserts formatted text in the destination string at the given `index`.
|
||||
* Inserts formatted text in the destination string at the given `index`.
|
||||
*
|
||||
* @param string The destination string.
|
||||
* @param index The insert index.
|
||||
|
@ -69,8 +93,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInsertFormat(ZyanString* string, ZyanUSize in
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Formats the given unsigned ordinal `value` to its decimal text-representation and
|
||||
* inserts it to the `string`.
|
||||
* Formats the given unsigned ordinal `value` to its decimal text-representation and
|
||||
* inserts it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The insert index.
|
||||
|
@ -87,8 +111,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInsertDecU(ZyanString* string, ZyanUSize inde
|
|||
ZyanU8 padding_length);
|
||||
|
||||
/**
|
||||
* @brief Formats the given signed ordinal `value` to its decimal text-representation and
|
||||
* inserts it to the `string`.
|
||||
* Formats the given signed ordinal `value` to its decimal text-representation and
|
||||
* inserts it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The insert index.
|
||||
|
@ -107,8 +131,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInsertDecS(ZyanString* string, ZyanUSize inde
|
|||
ZyanU8 padding_length, ZyanBool force_sign, const ZyanString* prefix);
|
||||
|
||||
/**
|
||||
* @brief Formats the given unsigned ordinal `value` to its hexadecimal text-representation and
|
||||
* inserts it to the `string`.
|
||||
* Formats the given unsigned ordinal `value` to its hexadecimal text-representation and
|
||||
* inserts it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The insert index.
|
||||
|
@ -127,8 +151,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInsertHexU(ZyanString* string, ZyanUSize inde
|
|||
ZyanU8 padding_length, ZyanBool uppercase);
|
||||
|
||||
/**
|
||||
* @brief Formats the given signed ordinal `value` to its hexadecimal text-representation and
|
||||
* inserts it to the `string`.
|
||||
* Formats the given signed ordinal `value` to its hexadecimal text-representation and
|
||||
* inserts it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The insert index.
|
||||
|
@ -155,7 +179,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInsertHexS(ZyanString* string, ZyanUSize inde
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Appends formatted text to the destination string.
|
||||
* Appends formatted text to the destination string.
|
||||
*
|
||||
* @param string The destination string.
|
||||
* @param format The format string.
|
||||
|
@ -175,8 +199,8 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringAppendFormat(
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Formats the given unsigned ordinal `value` to its decimal text-representation and
|
||||
* appends it to the `string`.
|
||||
* Formats the given unsigned ordinal `value` to its decimal text-representation and
|
||||
* appends it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param value The value.
|
||||
|
@ -192,8 +216,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringAppendDecU(ZyanString* string, ZyanU64 value,
|
|||
ZyanU8 padding_length);
|
||||
|
||||
/**
|
||||
* @brief Formats the given signed ordinal `value` to its decimal text-representation and
|
||||
* appends it to the `string`.
|
||||
* Formats the given signed ordinal `value` to its decimal text-representation and
|
||||
* appends it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param value The value.
|
||||
|
@ -211,8 +235,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringAppendDecS(ZyanString* string, ZyanI64 value,
|
|||
ZyanU8 padding_length, ZyanBool force_sign, const ZyanStringView* prefix);
|
||||
|
||||
/**
|
||||
* @brief Formats the given unsigned ordinal `value` to its hexadecimal text-representation and
|
||||
* appends it to the `string`.
|
||||
* Formats the given unsigned ordinal `value` to its hexadecimal text-representation and
|
||||
* appends it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param value The value.
|
||||
|
@ -230,8 +254,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringAppendHexU(ZyanString* string, ZyanU64 value,
|
|||
ZyanU8 padding_length, ZyanBool uppercase);
|
||||
|
||||
/**
|
||||
* @brief Formats the given signed ordinal `value` to its hexadecimal text-representation and
|
||||
* appends it to the `string`.
|
||||
* Formats the given signed ordinal `value` to its hexadecimal text-representation and
|
||||
* appends it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param value The value.
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
/***************************************************************************************************
|
||||
|
||||
Zyan Core Library (Zyan-C)
|
||||
|
||||
Original Author : Florian Bernd
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
|
||||
***************************************************************************************************/
|
||||
|
||||
#ifndef ZYCORE_ATOMIC_GNU_H
|
||||
#define ZYCORE_ATOMIC_GNU_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "zydis/Zycore/Defines.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Functions */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#if defined(ZYAN_CLANG) || defined(ZYAN_GCC) || defined(ZYAN_ICC)
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Pointer sized */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
ZYAN_INLINE ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination,
|
||||
ZyanUPointer comparand, ZyanUPointer value)
|
||||
{
|
||||
return (ZyanUPointer)(__sync_val_compare_and_swap(
|
||||
&destination->value, (void*)comparand, (void*)value, &destination->value));
|
||||
}
|
||||
|
||||
ZYAN_INLINE ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination)
|
||||
{
|
||||
return (ZyanUPointer)(__sync_fetch_and_add(&destination->value, (void*)1,
|
||||
&destination->value)) + 1;
|
||||
}
|
||||
|
||||
ZYAN_INLINE ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination)
|
||||
{
|
||||
return (ZyanUPointer)(__sync_sub_and_fetch(&destination->value, (void*)1, &destination->value));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* 32-bit */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
ZYAN_INLINE ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination,
|
||||
ZyanU32 comparand, ZyanU32 value)
|
||||
{
|
||||
return (ZyanU32)(__sync_val_compare_and_swap(&destination->value, comparand, value,
|
||||
&destination->value));
|
||||
}
|
||||
|
||||
ZYAN_INLINE ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination)
|
||||
{
|
||||
return (ZyanU32)(__sync_fetch_and_add(&destination->value, 1, &destination->value)) + 1;
|
||||
}
|
||||
|
||||
ZYAN_INLINE ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination)
|
||||
{
|
||||
return (ZyanU32)(__sync_sub_and_fetch(&destination->value, 1, &destination->value));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* 64-bit */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
ZYAN_INLINE ZyanU64 ZyanAtomicCompareExchange64(ZyanAtomic64* destination,
|
||||
ZyanU64 comparand, ZyanU64 value)
|
||||
{
|
||||
return (ZyanU64)(__sync_val_compare_and_swap(&destination->value, comparand, value,
|
||||
&destination->value));
|
||||
}
|
||||
|
||||
ZYAN_INLINE ZyanU64 ZyanAtomicIncrement64(ZyanAtomic64* destination)
|
||||
{
|
||||
return (ZyanU64)(__sync_fetch_and_add(&destination->value, 1, &destination->value)) + 1;
|
||||
}
|
||||
|
||||
ZYAN_INLINE ZyanU64 ZyanAtomicDecrement64(ZyanAtomic64* destination)
|
||||
{
|
||||
return (ZyanU64)(__sync_sub_and_fetch(&destination->value, 1, &destination->value));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
#endif
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZYCORE_ATOMIC_GNU_H */
|
|
@ -0,0 +1,141 @@
|
|||
/***************************************************************************************************
|
||||
|
||||
Zyan Core Library (Zyan-C)
|
||||
|
||||
Original Author : Florian Bernd
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
|
||||
***************************************************************************************************/
|
||||
|
||||
#ifndef ZYCORE_ATOMIC_MSVC_H
|
||||
#define ZYCORE_ATOMIC_MSVC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
#include "zydis/Zycore/Defines.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Functions */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#if defined(ZYAN_MSVC)
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Pointer sized */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
#if defined(ZYAN_X86)
|
||||
|
||||
static ZYAN_INLINE ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination,
|
||||
ZyanUPointer comparand, ZyanUPointer value)
|
||||
{
|
||||
return (ZyanUPointer)ZyanAtomicCompareExchange32((ZyanAtomic32*)destination, comparand, value);
|
||||
}
|
||||
|
||||
static ZYAN_INLINE ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination)
|
||||
{
|
||||
return (ZyanUPointer)ZyanAtomicIncrement32((ZyanAtomic32*)destination);
|
||||
}
|
||||
|
||||
static ZYAN_INLINE ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination)
|
||||
{
|
||||
return (ZyanUPointer)ZyanAtomicDecrement32((ZyanAtomic32*)destination);
|
||||
}
|
||||
|
||||
#elif defined(ZYAN_X64)
|
||||
|
||||
static ZYAN_INLINE ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination,
|
||||
ZyanUPointer comparand, ZyanUPointer value)
|
||||
{
|
||||
return (ZyanUPointer)ZyanAtomicCompareExchange64((ZyanAtomic64*)destination, comparand, value);
|
||||
}
|
||||
|
||||
static ZYAN_INLINE ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination)
|
||||
{
|
||||
return (ZyanUPointer)ZyanAtomicIncrement64((ZyanAtomic64*)destination);
|
||||
}
|
||||
|
||||
static ZYAN_INLINE ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination)
|
||||
{
|
||||
return (ZyanUPointer)ZyanAtomicDecrement64((ZyanAtomic64*)destination);
|
||||
}
|
||||
|
||||
#else
|
||||
# error "Unsupported architecture detected"
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* 32-bit */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
static ZYAN_INLINE ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination,
|
||||
ZyanU32 comparand, ZyanU32 value)
|
||||
{
|
||||
return (ZyanU32)(_InterlockedCompareExchange((volatile LONG*)&(destination->value),
|
||||
(LONG)value, (LONG)comparand));
|
||||
}
|
||||
|
||||
static ZYAN_INLINE ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination)
|
||||
{
|
||||
return (ZyanU32)(_InterlockedIncrement((volatile LONG*)&(destination->value)));
|
||||
}
|
||||
|
||||
static ZYAN_INLINE ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination)
|
||||
{
|
||||
return (ZyanU32)(_InterlockedDecrement((volatile LONG*)&(destination->value)));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* 64-bit */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
static ZYAN_INLINE ZyanU64 ZyanAtomicCompareExchange64(ZyanAtomic64* destination,
|
||||
ZyanU64 comparand, ZyanU64 value)
|
||||
{
|
||||
return (ZyanU64)(_InterlockedCompareExchange64((volatile LONG64*)&(destination->value),
|
||||
(LONG64)value, (LONG64)comparand));
|
||||
}
|
||||
|
||||
static ZYAN_INLINE ZyanU64 ZyanAtomicIncrement64(ZyanAtomic64* destination)
|
||||
{
|
||||
return (ZyanU64)(_InterlockedIncrement64((volatile LONG64*)&(destination->value)));
|
||||
}
|
||||
|
||||
static ZYAN_INLINE ZyanU64 ZyanAtomicDecrement64(ZyanAtomic64* destination)
|
||||
{
|
||||
return (ZyanU64)(_InterlockedDecrement64((volatile LONG64*)&(destination->value)));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
#endif
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZYCORE_ATOMIC_MSVC_H */
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Provides a simple LibC abstraction and fallback routines.
|
||||
* Provides a simple LibC abstraction and fallback routines.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_LIBC_H
|
||||
|
@ -58,7 +58,7 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanVAList` datatype.
|
||||
* Defines the `ZyanVAList` datatype.
|
||||
*/
|
||||
typedef va_list ZyanVAList;
|
||||
|
||||
|
@ -84,7 +84,7 @@ typedef va_list ZyanVAList;
|
|||
#define ZYAN_VSNPRINTF vsnprintf
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanFile` datatype.
|
||||
* Defines the `ZyanFile` datatype.
|
||||
*/
|
||||
typedef FILE ZyanFile;
|
||||
|
||||
|
@ -153,7 +153,7 @@ typedef FILE ZyanFile;
|
|||
#if defined(ZYAN_MSVC) || defined(ZYAN_ICC)
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanVAList` datatype.
|
||||
* Defines the `ZyanVAList` datatype.
|
||||
*/
|
||||
typedef char* ZyanVAList;
|
||||
|
||||
|
@ -165,7 +165,7 @@ typedef char* ZyanVAList;
|
|||
#elif defined(ZYAN_GNUC)
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanVAList` datatype.
|
||||
* Defines the `ZyanVAList` datatype.
|
||||
*/
|
||||
typedef __builtin_va_list ZyanVAList;
|
||||
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Returns a pointer to the data of the given `node`.
|
||||
*
|
||||
* Returns a pointer to the data of the given `node`.
|
||||
*
|
||||
* @param node A pointer to the `ZyanNodeData` struct.
|
||||
*
|
||||
*
|
||||
* @return A pointer to the data of the given `node`.
|
||||
*/
|
||||
#define ZYCORE_LIST_GET_NODE_DATA(node) \
|
||||
|
@ -50,11 +50,11 @@
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Allocates memory for a new list node.
|
||||
*
|
||||
* Allocates memory for a new list node.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param node Receives a pointer to the new `ZyanListNode` struct.
|
||||
*
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
static ZyanStatus ZyanListAllocateNode(ZyanList* list, ZyanListNode** node)
|
||||
|
@ -66,7 +66,7 @@ static ZyanStatus ZyanListAllocateNode(ZyanList* list, ZyanListNode** node)
|
|||
if (is_dynamic)
|
||||
{
|
||||
ZYAN_ASSERT(list->allocator->allocate);
|
||||
ZYAN_CHECK(list->allocator->allocate(list->allocator, (void**)node,
|
||||
ZYAN_CHECK(list->allocator->allocate(list->allocator, (void**)node,
|
||||
sizeof(ZyanListNode) + list->element_size, 1));
|
||||
} else
|
||||
{
|
||||
|
@ -90,11 +90,11 @@ static ZyanStatus ZyanListAllocateNode(ZyanList* list, ZyanListNode** node)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Frees memory of a node.
|
||||
*
|
||||
* Frees memory of a node.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param node A pointer to the `ZyanListNode` struct.
|
||||
*
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
static ZyanStatus ZyanListDeallocateNode(ZyanList* list, ZyanListNode* node)
|
||||
|
@ -106,7 +106,7 @@ static ZyanStatus ZyanListDeallocateNode(ZyanList* list, ZyanListNode* node)
|
|||
if (is_dynamic)
|
||||
{
|
||||
ZYAN_ASSERT(list->allocator->deallocate);
|
||||
ZYAN_CHECK(list->allocator->deallocate(list->allocator, (void*)node,
|
||||
ZYAN_CHECK(list->allocator->deallocate(list->allocator, (void*)node,
|
||||
sizeof(ZyanListNode) + list->element_size, 1));
|
||||
} else
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ ZYAN_REQUIRES_LIBC ZyanStatus ZyanListInit(ZyanList* list, ZyanUSize element_siz
|
|||
|
||||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
ZyanStatus ZyanListInitEx(ZyanList* list, ZyanUSize element_size, ZyanMemberProcedure destructor,
|
||||
ZyanStatus ZyanListInitEx(ZyanList* list, ZyanUSize element_size, ZyanMemberProcedure destructor,
|
||||
ZyanAllocator* allocator)
|
||||
{
|
||||
if (!list || !element_size || !allocator)
|
||||
|
@ -176,7 +176,7 @@ ZyanStatus ZyanListInitCustomBuffer(ZyanList* list, ZyanUSize element_size,
|
|||
list->capacity = capacity;
|
||||
list->first_unused = ZYAN_NULL;
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListDestroy(ZyanList* list)
|
||||
|
@ -201,14 +201,14 @@ ZyanStatus ZyanListDestroy(ZyanList* list)
|
|||
|
||||
if (is_dynamic)
|
||||
{
|
||||
ZYAN_CHECK(list->allocator->deallocate(list->allocator, node,
|
||||
sizeof(ZyanListNode) + list->element_size, 1));
|
||||
ZYAN_CHECK(list->allocator->deallocate(list->allocator, node,
|
||||
sizeof(ZyanListNode) + list->element_size, 1));
|
||||
}
|
||||
|
||||
node = next;
|
||||
}
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
@ -242,7 +242,7 @@ ZyanStatus ZyanListGetTailNode(const ZyanList* list, const ZyanListNode** node)
|
|||
|
||||
*node = list->tail;
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListGetPrevNode(const ZyanListNode** node)
|
||||
|
@ -254,7 +254,7 @@ ZyanStatus ZyanListGetPrevNode(const ZyanListNode** node)
|
|||
|
||||
*node = (*node)->prev;
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListGetNextNode(const ZyanListNode** node)
|
||||
|
@ -266,7 +266,7 @@ ZyanStatus ZyanListGetNextNode(const ZyanListNode** node)
|
|||
|
||||
*node = (*node)->next;
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
const void* ZyanListGetNodeData(const ZyanListNode* node)
|
||||
|
@ -276,7 +276,7 @@ const void* ZyanListGetNodeData(const ZyanListNode* node)
|
|||
return ZYAN_NULL;
|
||||
}
|
||||
|
||||
return (const void*)ZYCORE_LIST_GET_NODE_DATA(node);
|
||||
return (const void*)ZYCORE_LIST_GET_NODE_DATA(node);
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListGetNodeDataEx(const ZyanListNode* node, const void** value)
|
||||
|
@ -288,7 +288,7 @@ ZyanStatus ZyanListGetNodeDataEx(const ZyanListNode* node, const void** value)
|
|||
|
||||
*value = (const void*)ZYCORE_LIST_GET_NODE_DATA(node);
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void* ZyanListGetNodeDataMutable(const ZyanListNode* node)
|
||||
|
@ -298,7 +298,7 @@ void* ZyanListGetNodeDataMutable(const ZyanListNode* node)
|
|||
return ZYAN_NULL;
|
||||
}
|
||||
|
||||
return ZYCORE_LIST_GET_NODE_DATA(node);
|
||||
return ZYCORE_LIST_GET_NODE_DATA(node);
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListGetNodeDataMutableEx(const ZyanListNode* node, void** value)
|
||||
|
@ -310,7 +310,7 @@ ZyanStatus ZyanListGetNodeDataMutableEx(const ZyanListNode* node, void** value)
|
|||
|
||||
*value = ZYCORE_LIST_GET_NODE_DATA(node);
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListSetNodeData(const ZyanList* list, const ZyanListNode* node, const void* value)
|
||||
|
@ -388,7 +388,7 @@ ZyanStatus ZyanListPushFront(ZyanList* list, const void* item)
|
|||
}
|
||||
++list->size;
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListEmplaceBack(ZyanList* list, void** item, ZyanMemberFunction constructor)
|
||||
|
@ -452,7 +452,7 @@ ZyanStatus ZyanListEmplaceFront(ZyanList* list, void** item, ZyanMemberFunction
|
|||
}
|
||||
++list->size;
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
@ -520,7 +520,7 @@ ZyanStatus ZyanListPopFront(ZyanList* list)
|
|||
}
|
||||
--list->size;
|
||||
|
||||
return ZyanListDeallocateNode(list, node);
|
||||
return ZyanListDeallocateNode(list, node);
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListRemove(ZyanList* list, const ZyanListNode* node)
|
||||
|
@ -535,7 +535,7 @@ ZyanStatus ZyanListRemoveRange(ZyanList* list, const ZyanListNode* first, const
|
|||
ZYAN_UNUSED(list);
|
||||
ZYAN_UNUSED(first);
|
||||
ZYAN_UNUSED(last);
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ZyanStatus ZyanListClear(ZyanList* list)
|
||||
|
@ -584,8 +584,8 @@ ZyanStatus ZyanListResizeEx(ZyanList* list, ZyanUSize size, const void* initiali
|
|||
|
||||
if (is_dynamic)
|
||||
{
|
||||
ZYAN_CHECK(list->allocator->deallocate(list->allocator, node,
|
||||
sizeof(ZyanListNode) + list->element_size, 1));
|
||||
ZYAN_CHECK(list->allocator->deallocate(list->allocator, node,
|
||||
sizeof(ZyanListNode) + list->element_size, 1));
|
||||
}
|
||||
|
||||
node = next;
|
||||
|
@ -610,9 +610,9 @@ ZyanStatus ZyanListResizeEx(ZyanList* list, ZyanUSize size, const void* initiali
|
|||
|
||||
if (initializer)
|
||||
{
|
||||
ZYAN_MEMCPY(ZYCORE_LIST_GET_NODE_DATA(node), initializer, list->element_size);
|
||||
ZYAN_MEMCPY(ZYCORE_LIST_GET_NODE_DATA(node), initializer, list->element_size);
|
||||
}
|
||||
|
||||
|
||||
if (!list->head)
|
||||
{
|
||||
list->head = node;
|
||||
|
@ -649,7 +649,7 @@ ZyanStatus ZyanListResizeEx(ZyanList* list, ZyanUSize size, const void* initiali
|
|||
list->size = size;
|
||||
}
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -26,13 +26,12 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implements a doubly linked list.
|
||||
* Implements a doubly linked list.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_LIST_H
|
||||
#define ZYCORE_LIST_H
|
||||
|
||||
#include "zydis/ZycoreExportConfig.h"
|
||||
#include "zydis/Zycore/Allocator.h"
|
||||
#include "zydis/Zycore/Object.h"
|
||||
#include "zydis/Zycore/Status.h"
|
||||
|
@ -47,7 +46,7 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanListNode` struct.
|
||||
* Defines the `ZyanListNode` struct.
|
||||
*
|
||||
* All fields in this struct should be considered as "private". Any changes may lead to unexpected
|
||||
* behavior.
|
||||
|
@ -55,17 +54,17 @@ extern "C" {
|
|||
typedef struct ZyanListNode_
|
||||
{
|
||||
/**
|
||||
* @brief A pointer to the previous list node.
|
||||
* A pointer to the previous list node.
|
||||
*/
|
||||
struct ZyanListNode_* prev;
|
||||
/**
|
||||
* @brief A pointer to the next list node.
|
||||
* A pointer to the next list node.
|
||||
*/
|
||||
struct ZyanListNode_* next;
|
||||
} ZyanListNode;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanList` struct.
|
||||
* Defines the `ZyanList` struct.
|
||||
*
|
||||
* All fields in this struct should be considered as "private". Any changes may lead to unexpected
|
||||
* behavior.
|
||||
|
@ -73,53 +72,53 @@ typedef struct ZyanListNode_
|
|||
typedef struct ZyanList_
|
||||
{
|
||||
/**
|
||||
* @brief The memory allocator.
|
||||
* The memory allocator.
|
||||
*/
|
||||
ZyanAllocator* allocator;
|
||||
/**
|
||||
* @brief The current number of elements in the list.
|
||||
* The current number of elements in the list.
|
||||
*/
|
||||
ZyanUSize size;
|
||||
/**
|
||||
* @brief The size of a single element in bytes.
|
||||
* The size of a single element in bytes.
|
||||
*/
|
||||
ZyanUSize element_size;
|
||||
/**
|
||||
* @brief The element destructor callback.
|
||||
* The element destructor callback.
|
||||
*/
|
||||
ZyanMemberProcedure destructor;
|
||||
/**
|
||||
* @brief The head node.
|
||||
* The head node.
|
||||
*/
|
||||
ZyanListNode* head;
|
||||
/**
|
||||
* @brief The tail node.
|
||||
* The tail node.
|
||||
*/
|
||||
ZyanListNode* tail;
|
||||
/**
|
||||
* @brief The data buffer.
|
||||
*
|
||||
* Only used for instances created by `ZyanListInitCustomBuffer`.
|
||||
* The data buffer.
|
||||
*
|
||||
* Only used for instances created by `ZyanListInitCustomBuffer`.
|
||||
*/
|
||||
void* buffer;
|
||||
/**
|
||||
* @brief The data buffer capacity (number of bytes).
|
||||
*
|
||||
* The data buffer capacity (number of bytes).
|
||||
*
|
||||
* Only used for instances created by `ZyanListInitCustomBuffer`.
|
||||
*/
|
||||
ZyanUSize capacity;
|
||||
/**
|
||||
* @brief The first unused node.
|
||||
*
|
||||
* The first unused node.
|
||||
*
|
||||
* When removing a node, the first-unused value is updated to point at the removed node and the
|
||||
* next node of the removed node will be updated to point at the old first-unused node.
|
||||
*
|
||||
*
|
||||
* When appending the memory of the first unused-node is recycled to store the new node. The
|
||||
* value of the first-unused node is then updated to point at the reused nodes next node.
|
||||
*
|
||||
*
|
||||
* If the first-unused value is `ZYAN_NULL`, any new node will be "allocated" behind the tail
|
||||
* node (if there is enough space left in the fixed size buffer).
|
||||
*
|
||||
*
|
||||
* Only used for instances created by `ZyanListInitCustomBuffer`.
|
||||
*/
|
||||
ZyanListNode* first_unused;
|
||||
|
@ -134,7 +133,7 @@ typedef struct ZyanList_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines an uninitialized `ZyanList` instance.
|
||||
* Defines an uninitialized `ZyanList` instance.
|
||||
*/
|
||||
#define ZYAN_LIST_INITIALIZER \
|
||||
{ \
|
||||
|
@ -154,7 +153,7 @@ typedef struct ZyanList_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the data value of the given `node`.
|
||||
* Returns the data value of the given `node`.
|
||||
*
|
||||
* @param type The desired value type.
|
||||
* @param node A pointer to the `ZyanListNode` struct.
|
||||
|
@ -184,7 +183,7 @@ typedef struct ZyanList_
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanList` instance.
|
||||
* Initializes the given `ZyanList` instance.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param element_size The size of a single element in bytes.
|
||||
|
@ -203,7 +202,7 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanListInit(ZyanList* list, ZyanUSi
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanList` instance and sets a custom `allocator`.
|
||||
* Initializes the given `ZyanList` instance and sets a custom `allocator`.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param element_size The size of a single element in bytes.
|
||||
|
@ -219,15 +218,15 @@ ZYCORE_EXPORT ZyanStatus ZyanListInitEx(ZyanList* list, ZyanUSize element_size,
|
|||
ZyanMemberProcedure destructor, ZyanAllocator* allocator);
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanList` instance and configures it to use a custom user
|
||||
* defined buffer with a fixed size.
|
||||
* Initializes the given `ZyanList` instance and configures it to use a custom user
|
||||
* defined buffer with a fixed size.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param element_size The size of a single element in bytes.
|
||||
* @param destructor A destructor callback that is invoked every time an item is deleted, or
|
||||
* `ZYAN_NULL` if not needed.
|
||||
* @param buffer A pointer to the buffer that is used as storage for the elements.
|
||||
* @param capacity The maximum capacity (number of bytes) of the buffer including the
|
||||
* @param capacity The maximum capacity (number of bytes) of the buffer including the
|
||||
* space required for the list-nodes.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
|
@ -241,7 +240,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListInitCustomBuffer(ZyanList* list, ZyanUSize elem
|
|||
ZyanMemberProcedure destructor, void* buffer, ZyanUSize capacity);
|
||||
|
||||
/**
|
||||
* @brief Destroys the given `ZyanList` instance.
|
||||
* Destroys the given `ZyanList` instance.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
*
|
||||
|
@ -256,7 +255,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListDestroy(ZyanList* list);
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanList` instance by duplicating an existing list.
|
||||
* Initializes a new `ZyanList` instance by duplicating an existing list.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanList` instance.
|
||||
* @param source A pointer to the source list.
|
||||
|
@ -273,8 +272,8 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanListDuplicate(ZyanList* destinat
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanList` instance by duplicating an existing list and sets a
|
||||
* custom `allocator`.
|
||||
* Initializes a new `ZyanList` instance by duplicating an existing list and sets a
|
||||
* custom `allocator`.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanList` instance.
|
||||
* @param source A pointer to the source list.
|
||||
|
@ -288,20 +287,20 @@ ZYCORE_EXPORT ZyanStatus ZyanListDuplicateEx(ZyanList* destination, const ZyanLi
|
|||
ZyanAllocator* allocator);
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanList` instance by duplicating an existing list and
|
||||
* configures it to use a custom user defined buffer with a fixed size.
|
||||
* Initializes a new `ZyanList` instance by duplicating an existing list and
|
||||
* configures it to use a custom user defined buffer with a fixed size.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanList` instance.
|
||||
* @param source A pointer to the source list.
|
||||
* @param buffer A pointer to the buffer that is used as storage for the elements.
|
||||
* @param capacity The maximum capacity (number of bytes) of the buffer including the
|
||||
* @param capacity The maximum capacity (number of bytes) of the buffer including the
|
||||
* space required for the list-nodes.
|
||||
|
||||
* This function will fail, if the capacity of the buffer is not sufficient
|
||||
* to store all elements of the source list.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
*
|
||||
* The buffer capacity required to store `n` elements of type `T` is be calculated by:
|
||||
* `size = n * sizeof(ZyanListNode) + n * sizeof(T)`
|
||||
*
|
||||
|
@ -315,46 +314,46 @@ ZYCORE_EXPORT ZyanStatus ZyanListDuplicateCustomBuffer(ZyanList* destination,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns a pointer to the first `ZyanListNode` struct of the given list.
|
||||
*
|
||||
* Returns a pointer to the first `ZyanListNode` struct of the given list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param node Receives a pointer to the first `ZyanListNode` struct of the list.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanListGetHeadNode(const ZyanList* list, const ZyanListNode** node);
|
||||
|
||||
/**
|
||||
* @brief Returns a pointer to the last `ZyanListNode` struct of the given list.
|
||||
*
|
||||
* Returns a pointer to the last `ZyanListNode` struct of the given list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param node Receives a pointer to the last `ZyanListNode` struct of the list.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanListGetTailNode(const ZyanList* list, const ZyanListNode** node);
|
||||
|
||||
/**
|
||||
* @brief Receives a pointer to the previous `ZyanListNode` struct linked to the passed one.
|
||||
*
|
||||
* @param node Receives a pointer to the previous `ZyanListNode` struct linked to the passed
|
||||
* Receives a pointer to the previous `ZyanListNode` struct linked to the passed one.
|
||||
*
|
||||
* @param node Receives a pointer to the previous `ZyanListNode` struct linked to the passed
|
||||
* one.
|
||||
*
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanListGetPrevNode(const ZyanListNode** node);
|
||||
|
||||
/**
|
||||
* @brief Receives a pointer to the next `ZyanListNode` struct linked to the passed one.
|
||||
*
|
||||
* Receives a pointer to the next `ZyanListNode` struct linked to the passed one.
|
||||
*
|
||||
* @param node Receives a pointer to the next `ZyanListNode` struct linked to the passed one.
|
||||
*
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanListGetNextNode(const ZyanListNode** node);
|
||||
|
||||
/**
|
||||
* @brief Returns a constant pointer to the data of the given `node`.
|
||||
* Returns a constant pointer to the data of the given `node`.
|
||||
*
|
||||
* @param node A pointer to the `ZyanListNode` struct.
|
||||
*
|
||||
|
@ -366,7 +365,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListGetNextNode(const ZyanListNode** node);
|
|||
ZYCORE_EXPORT const void* ZyanListGetNodeData(const ZyanListNode* node);
|
||||
|
||||
/**
|
||||
* @brief Returns a constant pointer to the data of the given `node`..
|
||||
* Returns a constant pointer to the data of the given `node`..
|
||||
*
|
||||
* @param node A pointer to the `ZyanListNode` struct.
|
||||
* @param value Receives a constant pointer to the data of the given `node`.
|
||||
|
@ -378,25 +377,25 @@ ZYCORE_EXPORT const void* ZyanListGetNodeData(const ZyanListNode* node);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanListGetNodeDataEx(const ZyanListNode* node, const void** value);
|
||||
|
||||
/**
|
||||
* @brief Returns a mutable pointer to the data of the given `node`.
|
||||
* Returns a mutable pointer to the data of the given `node`.
|
||||
*
|
||||
* @param node A pointer to the `ZyanListNode` struct.
|
||||
*
|
||||
* @return A mutable pointer to the the data of the given `node` or `ZYAN_NULL`, if an error
|
||||
* occured.
|
||||
*
|
||||
* Take a look at `ZyanListGetPointerMutableEx` instead, if you need a function that returns a
|
||||
* Take a look at `ZyanListGetPointerMutableEx` instead, if you need a function that returns a
|
||||
* zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT void* ZyanListGetNodeDataMutable(const ZyanListNode* node);
|
||||
|
||||
/**
|
||||
* @brief Returns a mutable pointer to the data of the given `node`..
|
||||
* Returns a mutable pointer to the data of the given `node`..
|
||||
*
|
||||
* @param node A pointer to the `ZyanListNode` struct.
|
||||
* @param value Receives a mutable pointer to the data of the given `node`.
|
||||
*
|
||||
* Take a look at `ZyanListGetNodeDataMutable`, if you need a function that directly returns a
|
||||
* Take a look at `ZyanListGetNodeDataMutable`, if you need a function that directly returns a
|
||||
* pointer.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
|
@ -404,7 +403,7 @@ ZYCORE_EXPORT void* ZyanListGetNodeDataMutable(const ZyanListNode* node);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanListGetNodeDataMutableEx(const ZyanListNode* node, void** value);
|
||||
|
||||
/**
|
||||
* @brief Assigns a new data value to the given `node`.
|
||||
* Assigns a new data value to the given `node`.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param node A pointer to the `ZyanListNode` struct.
|
||||
|
@ -412,7 +411,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListGetNodeDataMutableEx(const ZyanListNode* node,
|
|||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanListSetNodeData(const ZyanList* list, const ZyanListNode* node,
|
||||
ZYCORE_EXPORT ZyanStatus ZyanListSetNodeData(const ZyanList* list, const ZyanListNode* node,
|
||||
const void* value);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
@ -420,7 +419,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListSetNodeData(const ZyanList* list, const ZyanLis
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Adds a new `item` to the end of the list.
|
||||
* Adds a new `item` to the end of the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param item A pointer to the item to add.
|
||||
|
@ -430,7 +429,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListSetNodeData(const ZyanList* list, const ZyanLis
|
|||
ZYCORE_EXPORT ZyanStatus ZyanListPushBack(ZyanList* list, const void* item);
|
||||
|
||||
/**
|
||||
* @brief Adds a new `item` to the beginning of the list.
|
||||
* Adds a new `item` to the beginning of the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param item A pointer to the item to add.
|
||||
|
@ -440,7 +439,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListPushBack(ZyanList* list, const void* item);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanListPushFront(ZyanList* list, const void* item);
|
||||
|
||||
/**
|
||||
* @brief Constructs an `item` in-place at the end of the list.
|
||||
* Constructs an `item` in-place at the end of the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param item Receives a pointer to the new item.
|
||||
|
@ -453,7 +452,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListEmplaceBack(ZyanList* list, void** item,
|
|||
ZyanMemberFunction constructor);
|
||||
|
||||
/**
|
||||
* @brief Constructs an `item` in-place at the beginning of the list.
|
||||
* Constructs an `item` in-place at the beginning of the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param item Receives a pointer to the new item.
|
||||
|
@ -470,7 +469,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListEmplaceFront(ZyanList* list, void** item,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Removes the last element of the list.
|
||||
* Removes the last element of the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
*
|
||||
|
@ -479,7 +478,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListEmplaceFront(ZyanList* list, void** item,
|
|||
ZYCORE_EXPORT ZyanStatus ZyanListPopBack(ZyanList* list);
|
||||
|
||||
/**
|
||||
* @brief Removes the firstelement of the list.
|
||||
* Removes the firstelement of the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
*
|
||||
|
@ -488,7 +487,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListPopBack(ZyanList* list);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanListPopFront(ZyanList* list);
|
||||
|
||||
/**
|
||||
* @brief Removes the given `node` from the list.
|
||||
* Removes the given `node` from the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param node A pointer to the `ZyanListNode` struct.
|
||||
|
@ -498,7 +497,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListPopFront(ZyanList* list);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanListRemove(ZyanList* list, const ZyanListNode* node);
|
||||
|
||||
/**
|
||||
* @brief Removes multiple nodes from the list.
|
||||
* Removes multiple nodes from the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param first A pointer to the first node.
|
||||
|
@ -506,11 +505,11 @@ ZYCORE_EXPORT ZyanStatus ZyanListRemove(ZyanList* list, const ZyanListNode* node
|
|||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanListRemoveRange(ZyanList* list, const ZyanListNode* first,
|
||||
ZYCORE_EXPORT ZyanStatus ZyanListRemoveRange(ZyanList* list, const ZyanListNode* first,
|
||||
const ZyanListNode* last);
|
||||
|
||||
/**
|
||||
* @brief Erases all elements of the list.
|
||||
* Erases all elements of the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
*
|
||||
|
@ -529,7 +528,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListClear(ZyanList* list);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Resizes the given `ZyanList` instance.
|
||||
* Resizes the given `ZyanList` instance.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param size The new size of the list.
|
||||
|
@ -539,7 +538,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListClear(ZyanList* list);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanListResize(ZyanList* list, ZyanUSize size);
|
||||
|
||||
/**
|
||||
* @brief Resizes the given `ZyanList` instance.
|
||||
* Resizes the given `ZyanList` instance.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param size The new size of the list.
|
||||
|
@ -554,7 +553,7 @@ ZYCORE_EXPORT ZyanStatus ZyanListResizeEx(ZyanList* list, ZyanUSize size, const
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the current size of the list.
|
||||
* Returns the current size of the list.
|
||||
*
|
||||
* @param list A pointer to the `ZyanList` instance.
|
||||
* @param size Receives the size of the list.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Defines some generic object-related datatypes.
|
||||
* Defines some generic object-related datatypes.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_OBJECT_H
|
||||
|
@ -44,21 +44,21 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanMemberProcedure` function prototype.
|
||||
* Defines the `ZyanMemberProcedure` function prototype.
|
||||
*
|
||||
* @param object A pointer to the object.
|
||||
*/
|
||||
typedef void (*ZyanMemberProcedure)(void* object);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanConstMemberProcedure` function prototype.
|
||||
* Defines the `ZyanConstMemberProcedure` function prototype.
|
||||
*
|
||||
* @param object A pointer to the object.
|
||||
*/
|
||||
typedef void (*ZyanConstMemberProcedure)(const void* object);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanMemberFunction` function prototype.
|
||||
* Defines the `ZyanMemberFunction` function prototype.
|
||||
*
|
||||
* @param object A pointer to the object.
|
||||
*
|
||||
|
@ -67,7 +67,7 @@ typedef void (*ZyanConstMemberProcedure)(const void* object);
|
|||
typedef ZyanStatus (*ZyanMemberFunction)(void* object);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanConstMemberFunction` function prototype.
|
||||
* Defines the `ZyanConstMemberFunction` function prototype.
|
||||
*
|
||||
* @param object A pointer to the object.
|
||||
*
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Status code definitions and check macros.
|
||||
* Status code definitions and check macros.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_STATUS_H
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanStatus` data type.
|
||||
* Defines the `ZyanStatus` data type.
|
||||
*/
|
||||
typedef ZyanU32 ZyanStatus;
|
||||
|
||||
|
@ -56,7 +56,7 @@ typedef ZyanU32 ZyanStatus;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines a zyan status code.
|
||||
* Defines a zyan status code.
|
||||
*
|
||||
* @param error `1`, if the status code signals an error or `0`, if not.
|
||||
* @param module The module id.
|
||||
|
@ -65,34 +65,34 @@ typedef ZyanU32 ZyanStatus;
|
|||
* @return The zyan status code.
|
||||
*/
|
||||
#define ZYAN_MAKE_STATUS(error, module, code) \
|
||||
(ZyanStatus)((((error) & 0x01) << 31) | (((module) & 0x7FF) << 20) | ((code) & 0xFFFFF))
|
||||
(ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Checks */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Checks if a zyan operation was successful.
|
||||
* Checks if a zyan operation was successful.
|
||||
*
|
||||
* @param status The zyan status-code to check.
|
||||
*
|
||||
* @return `ZYAN_TRUE`, if the operation succeeded or `ZYAN_FALSE`, if not.
|
||||
*/
|
||||
#define ZYAN_SUCCESS(status) \
|
||||
(!((status) & 0x80000000))
|
||||
(!((status) & 0x80000000u))
|
||||
|
||||
/**
|
||||
* @brief Checks if a zyan operation failed.
|
||||
* Checks if a zyan operation failed.
|
||||
*
|
||||
* @param status The zyan status-code to check.
|
||||
*
|
||||
* @return `ZYAN_TRUE`, if the operation failed or `ZYAN_FALSE`, if not.
|
||||
*/
|
||||
#define ZYAN_FAILED(status) \
|
||||
((status) & 0x80000000)
|
||||
((status) & 0x80000000u)
|
||||
|
||||
/**
|
||||
* @brief Checks if a zyan operation was successful and returns with the status-code, if not.
|
||||
* Checks if a zyan operation was successful and returns with the status-code, if not.
|
||||
*
|
||||
* @param status The zyan status-code to check.
|
||||
*/
|
||||
|
@ -111,24 +111,24 @@ typedef ZyanU32 ZyanStatus;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the module id of a zyan status-code.
|
||||
* Returns the module id of a zyan status-code.
|
||||
*
|
||||
* @param status The zyan status-code.
|
||||
*
|
||||
* @return The module id of the zyan status-code.
|
||||
*/
|
||||
#define ZYAN_STATUS_MODULE(status) \
|
||||
(((status) >> 20) & 0x7FF)
|
||||
(((status) >> 20) & 0x7FFu)
|
||||
|
||||
/**
|
||||
* @brief Returns the code of a zyan status-code.
|
||||
* Returns the code of a zyan status-code.
|
||||
*
|
||||
* @param status The zyan status-code.
|
||||
*
|
||||
* @return The code of the zyan status-code.
|
||||
*/
|
||||
#define ZYAN_STATUS_CODE(status) \
|
||||
((status) & 0xFFFFF)
|
||||
((status) & 0xFFFFFu)
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Status codes */
|
||||
|
@ -139,142 +139,142 @@ typedef ZyanU32 ZyanStatus;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief The zycore generic module id.
|
||||
* The zycore generic module id.
|
||||
*/
|
||||
#define ZYAN_MODULE_ZYCORE 0x001
|
||||
#define ZYAN_MODULE_ZYCORE 0x001u
|
||||
|
||||
/**
|
||||
* @brief The zycore arg-parse submodule id.
|
||||
* The zycore arg-parse submodule id.
|
||||
*/
|
||||
#define ZYAN_MODULE_ARGPARSE 0x003
|
||||
#define ZYAN_MODULE_ARGPARSE 0x003u
|
||||
|
||||
/**
|
||||
* @brief The base module id for user-defined status codes.
|
||||
* The base module id for user-defined status codes.
|
||||
*/
|
||||
#define ZYAN_MODULE_USER 0x3FF
|
||||
#define ZYAN_MODULE_USER 0x3FFu
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Status codes (general purpose) */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief The operation completed successfully.
|
||||
* The operation completed successfully.
|
||||
*/
|
||||
#define ZYAN_STATUS_SUCCESS \
|
||||
ZYAN_MAKE_STATUS(0, ZYAN_MODULE_ZYCORE, 0x00)
|
||||
ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
|
||||
|
||||
/**
|
||||
* @brief The operation failed with an generic error.
|
||||
* The operation failed with an generic error.
|
||||
*/
|
||||
#define ZYAN_STATUS_FAILED \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x01)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x01u)
|
||||
|
||||
/**
|
||||
* @brief The operation completed successfully and returned `ZYAN_TRUE`.
|
||||
* The operation completed successfully and returned `ZYAN_TRUE`.
|
||||
*/
|
||||
#define ZYAN_STATUS_TRUE \
|
||||
ZYAN_MAKE_STATUS(0, ZYAN_MODULE_ZYCORE, 0x02)
|
||||
ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x02u)
|
||||
|
||||
/**
|
||||
* @brief The operation completed successfully and returned `ZYAN_FALSE`.
|
||||
* The operation completed successfully and returned `ZYAN_FALSE`.
|
||||
*/
|
||||
#define ZYAN_STATUS_FALSE \
|
||||
ZYAN_MAKE_STATUS(0, ZYAN_MODULE_ZYCORE, 0x03)
|
||||
ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x03u)
|
||||
|
||||
/**
|
||||
* @brief An invalid argument was passed to a function.
|
||||
* An invalid argument was passed to a function.
|
||||
*/
|
||||
#define ZYAN_STATUS_INVALID_ARGUMENT \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x04)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
|
||||
|
||||
/**
|
||||
* @brief An attempt was made to perform an invalid operation.
|
||||
* An attempt was made to perform an invalid operation.
|
||||
*/
|
||||
#define ZYAN_STATUS_INVALID_OPERATION \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x05)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x05u)
|
||||
|
||||
/**
|
||||
* @brief Insufficient privileges to perform the requested operation.
|
||||
* Insufficient privileges to perform the requested operation.
|
||||
*/
|
||||
#define ZYAN_STATUS_ACCESS_DENIED \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x06)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x06u)
|
||||
|
||||
/**
|
||||
* @brief The requested entity was not found.
|
||||
* The requested entity was not found.
|
||||
*/
|
||||
#define ZYAN_STATUS_NOT_FOUND \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x07)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x07u)
|
||||
|
||||
/**
|
||||
* @brief An index passed to a function was out of bounds.
|
||||
* An index passed to a function was out of bounds.
|
||||
*/
|
||||
#define ZYAN_STATUS_OUT_OF_RANGE \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x08)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x08u)
|
||||
|
||||
/**
|
||||
* @brief A buffer passed to a function was too small to complete the requested operation.
|
||||
* A buffer passed to a function was too small to complete the requested operation.
|
||||
*/
|
||||
#define ZYAN_STATUS_INSUFFICIENT_BUFFER_SIZE \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x09)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x09u)
|
||||
|
||||
/**
|
||||
* @brief Insufficient memory to perform the operation.
|
||||
* Insufficient memory to perform the operation.
|
||||
*/
|
||||
#define ZYAN_STATUS_NOT_ENOUGH_MEMORY \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x0A)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x0Au)
|
||||
|
||||
/**
|
||||
* @brief An unknown error occurred during a system function call.
|
||||
* An unknown error occurred during a system function call.
|
||||
*/
|
||||
#define ZYAN_STATUS_BAD_SYSTEMCALL \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x0B)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x0Bu)
|
||||
|
||||
/**
|
||||
* @brief The process ran out of resources while performing an operation.
|
||||
* The process ran out of resources while performing an operation.
|
||||
*/
|
||||
#define ZYAN_STATUS_OUT_OF_RESOURCES \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x0C)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x0Cu)
|
||||
|
||||
/**
|
||||
* @brief A dependency library was not found or does have an unexpected version number or
|
||||
* feature-set.
|
||||
* A dependency library was not found or does have an unexpected version number or
|
||||
* feature-set.
|
||||
*/
|
||||
#define ZYAN_STATUS_MISSING_DEPENDENCY \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYCORE, 0x0D)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x0Du)
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Status codes (arg parse) */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Argument was not expected.
|
||||
* Argument was not expected.
|
||||
*/
|
||||
#define ZYAN_STATUS_ARG_NOT_UNDERSTOOD \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ARGPARSE, 0x00)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ARGPARSE, 0x00u)
|
||||
|
||||
/**
|
||||
* @brief Too few arguments were provided.
|
||||
* Too few arguments were provided.
|
||||
*/
|
||||
#define ZYAN_STATUS_TOO_FEW_ARGS \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ARGPARSE, 0x01)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ARGPARSE, 0x01u)
|
||||
|
||||
/**
|
||||
* @brief Too many arguments were provided.
|
||||
* Too many arguments were provided.
|
||||
*/
|
||||
#define ZYAN_STATUS_TOO_MANY_ARGS \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ARGPARSE, 0x02)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ARGPARSE, 0x02u)
|
||||
|
||||
/**
|
||||
* @brief An argument that expected a value misses its value.
|
||||
* An argument that expected a value misses its value.
|
||||
*/
|
||||
#define ZYAN_STATUS_ARG_MISSES_VALUE \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ARGPARSE, 0x03)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ARGPARSE, 0x03u)
|
||||
|
||||
/**
|
||||
* @brief A required argument is missing.
|
||||
* A required argument is missing.
|
||||
*/
|
||||
#define ZYAN_STATUS_REQUIRED_ARG_MISSING \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ARGPARSE, 0x04)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ARGPARSE, 0x04u)
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -26,13 +26,12 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implements a string type.
|
||||
* Implements a string type.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_STRING_H
|
||||
#define ZYCORE_STRING_H
|
||||
|
||||
#include "zydis/ZycoreExportConfig.h"
|
||||
#include "zydis/Zycore/Allocator.h"
|
||||
#include "zydis/Zycore/Status.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
@ -47,20 +46,20 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief The initial minimum capacity (number of characters) for all dynamically allocated
|
||||
* string instances - not including the terminating '\0'-character.
|
||||
* The initial minimum capacity (number of characters) for all dynamically allocated
|
||||
* string instances - not including the terminating '\0'-character.
|
||||
*/
|
||||
#define ZYAN_STRING_MIN_CAPACITY 32
|
||||
|
||||
/**
|
||||
* @brief The default growth factor for all string instances.
|
||||
* The default growth factor for all string instances.
|
||||
*/
|
||||
#define ZYAN_STRING_DEFAULT_GROWTH_FACTOR 2.00f
|
||||
#define ZYAN_STRING_DEFAULT_GROWTH_FACTOR 2
|
||||
|
||||
/**
|
||||
* @brief The default shrink threshold for all string instances.
|
||||
* The default shrink threshold for all string instances.
|
||||
*/
|
||||
#define ZYAN_STRING_DEFAULT_SHRINK_THRESHOLD 0.25f
|
||||
#define ZYAN_STRING_DEFAULT_SHRINK_THRESHOLD 4
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Enums and types */
|
||||
|
@ -71,12 +70,12 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanStringFlags` datatype.
|
||||
* Defines the `ZyanStringFlags` data-type.
|
||||
*/
|
||||
typedef ZyanU8 ZyanStringFlags;
|
||||
|
||||
/**
|
||||
* @brief The string uses a custom user-defined buffer with a fixed capacity.
|
||||
* The string uses a custom user-defined buffer with a fixed capacity.
|
||||
*/
|
||||
#define ZYAN_STRING_HAS_FIXED_CAPACITY 0x01 // (1 << 0)
|
||||
|
||||
|
@ -85,7 +84,7 @@ typedef ZyanU8 ZyanStringFlags;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanString` struct.
|
||||
* Defines the `ZyanString` struct.
|
||||
*
|
||||
* The `ZyanString` type is implemented as a size-prefixed string - which allows for a lot of
|
||||
* performance optimizations.
|
||||
|
@ -98,11 +97,11 @@ typedef ZyanU8 ZyanStringFlags;
|
|||
typedef struct ZyanString_
|
||||
{
|
||||
/**
|
||||
* @brief String flags.
|
||||
* String flags.
|
||||
*/
|
||||
ZyanStringFlags flags;
|
||||
/**
|
||||
* @brief The vector that contains the actual string.
|
||||
* The vector that contains the actual string.
|
||||
*/
|
||||
ZyanVector vector;
|
||||
} ZyanString;
|
||||
|
@ -112,7 +111,7 @@ typedef struct ZyanString_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanStringView` struct.
|
||||
* Defines the `ZyanStringView` struct.
|
||||
*
|
||||
* The `ZyanStringView` type provides a view inside a string (`ZyanString` instances, null-
|
||||
* terminated C-style strings, or even not-null-terminated custom strings). A view is immutable
|
||||
|
@ -132,7 +131,7 @@ typedef struct ZyanString_
|
|||
typedef struct ZyanStringView_
|
||||
{
|
||||
/**
|
||||
* @brief The string data.
|
||||
* The string data.
|
||||
*
|
||||
* The view internally re-uses the normal string struct to allow casts without any runtime
|
||||
* overhead.
|
||||
|
@ -151,7 +150,7 @@ typedef struct ZyanStringView_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines an uninitialized `ZyanString` instance.
|
||||
* Defines an uninitialized `ZyanString` instance.
|
||||
*/
|
||||
#define ZYAN_STRING_INITIALIZER \
|
||||
{ \
|
||||
|
@ -164,12 +163,12 @@ typedef struct ZyanStringView_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Casts a `ZyanString` pointer to a constant `ZyanStringView` pointer.
|
||||
* Casts a `ZyanString` pointer to a constant `ZyanStringView` pointer.
|
||||
*/
|
||||
#define ZYAN_STRING_TO_VIEW(string) (const ZyanStringView*)(string)
|
||||
|
||||
/**
|
||||
* @brief Defines a `ZyanStringView` struct that provides a view into a static C-style string.
|
||||
* Defines a `ZyanStringView` struct that provides a view into a static C-style string.
|
||||
*
|
||||
* @param string The C-style string.
|
||||
*/
|
||||
|
@ -181,8 +180,8 @@ typedef struct ZyanStringView_
|
|||
/* vector */ \
|
||||
{ \
|
||||
/* allocator */ ZYAN_NULL, \
|
||||
/* growth_factor */ 1.0f, \
|
||||
/* shrink_threshold */ 0.0f, \
|
||||
/* growth_factor */ 1, \
|
||||
/* shrink_threshold */ 0, \
|
||||
/* size */ sizeof(string), \
|
||||
/* capacity */ sizeof(string), \
|
||||
/* element_size */ sizeof(char), \
|
||||
|
@ -205,7 +204,7 @@ typedef struct ZyanStringView_
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanString` instance.
|
||||
* Initializes the given `ZyanString` instance.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param capacity The initial capacity (number of characters).
|
||||
|
@ -213,7 +212,7 @@ typedef struct ZyanStringView_
|
|||
* @return A zyan status code.
|
||||
*
|
||||
* The memory for the string is dynamically allocated by the default allocator using the default
|
||||
* growth factor of `2.0f` and the default shrink threshold of `0.25f`.
|
||||
* growth factor and the default shrink threshold.
|
||||
*
|
||||
* The allocated buffer will be at least one character larger than the given `capacity`, to reserve
|
||||
* space for the terminating '\0'.
|
||||
|
@ -225,18 +224,18 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringInit(ZyanString* string, Z
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanString` instance and sets a custom `allocator` and memory
|
||||
* allocation/deallocation parameters.
|
||||
* Initializes the given `ZyanString` instance and sets a custom `allocator` and memory
|
||||
* allocation/deallocation parameters.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param capacity The initial capacity (number of characters).
|
||||
* @param allocator A pointer to a `ZyanAllocator` instance.
|
||||
* @param growth_factor The growth factor (from `1.0f` to `x.xf`).
|
||||
* @param shrink_threshold The shrink threshold (from `0.0f` to `1.0f`).
|
||||
* @param growth_factor The growth factor.
|
||||
* @param shrink_threshold The shrink threshold.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
* A growth factor of `1.0f` disables overallocation and a shrink threshold of `0.0f` disables
|
||||
* A growth factor of `1` disables overallocation and a shrink threshold of `0` disables
|
||||
* dynamic shrinking.
|
||||
*
|
||||
* The allocated buffer will be at least one character larger than the given `capacity`, to reserve
|
||||
|
@ -245,11 +244,11 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringInit(ZyanString* string, Z
|
|||
* Finalization with `ZyanStringDestroy` is required for all strings created by this function.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanStringInitEx(ZyanString* string, ZyanUSize capacity,
|
||||
ZyanAllocator* allocator, float growth_factor, float shrink_threshold);
|
||||
ZyanAllocator* allocator, ZyanU8 growth_factor, ZyanU8 shrink_threshold);
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanString` instance and configures it to use a custom user
|
||||
* defined buffer with a fixed size.
|
||||
* Initializes the given `ZyanString` instance and configures it to use a custom user
|
||||
* defined buffer with a fixed size.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param buffer A pointer to the buffer that is used as storage for the string.
|
||||
|
@ -264,7 +263,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInitCustomBuffer(ZyanString* string, char* bu
|
|||
ZyanUSize capacity);
|
||||
|
||||
/**
|
||||
* @brief Destroys the given `ZyanString` instance.
|
||||
* Destroys the given `ZyanString` instance.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
*
|
||||
|
@ -280,7 +279,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringDestroy(ZyanString* string);
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanString` instance by duplicating an existing string.
|
||||
* Initializes a new `ZyanString` instance by duplicating an existing string.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanString` instance.
|
||||
* @param source A pointer to the source string.
|
||||
|
@ -295,7 +294,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringDestroy(ZyanString* string);
|
|||
* string or `destination` points to an already initialized `ZyanString` instance.
|
||||
*
|
||||
* The memory for the string is dynamically allocated by the default allocator using the default
|
||||
* growth factor of `2.0f` and the default shrink threshold of `0.25f`.
|
||||
* growth factor and the default shrink threshold.
|
||||
*
|
||||
* The allocated buffer will be at least one character larger than the given `capacity`, to reserve
|
||||
* space for the terminating '\0'.
|
||||
|
@ -308,8 +307,8 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringDuplicate(ZyanString* dest
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanString` instance by duplicating an existing string and sets a
|
||||
* custom `allocator` and memory allocation/deallocation parameters.
|
||||
* Initializes a new `ZyanString` instance by duplicating an existing string and sets a
|
||||
* custom `allocator` and memory allocation/deallocation parameters.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanString` instance.
|
||||
* @param source A pointer to the source string.
|
||||
|
@ -318,15 +317,15 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringDuplicate(ZyanString* dest
|
|||
* This value is automatically adjusted to the size of the source
|
||||
* string, if a smaller value was passed.
|
||||
* @param allocator A pointer to a `ZyanAllocator` instance.
|
||||
* @param growth_factor The growth factor (from `1.0f` to `x.xf`).
|
||||
* @param shrink_threshold The shrink threshold (from `0.0f` to `1.0f`).
|
||||
* @param growth_factor The growth factor.
|
||||
* @param shrink_threshold The shrink threshold.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
* The behavior of this function is undefined, if `source` is a view into the `destination`
|
||||
* string or `destination` points to an already initialized `ZyanString` instance.
|
||||
*
|
||||
* A growth factor of `1.0f` disables overallocation and a shrink threshold of `0.0f` disables
|
||||
* A growth factor of `1` disables overallocation and a shrink threshold of `0` disables
|
||||
* dynamic shrinking.
|
||||
*
|
||||
* The allocated buffer will be at least one character larger than the given `capacity`, to reserve
|
||||
|
@ -336,11 +335,11 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringDuplicate(ZyanString* dest
|
|||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanStringDuplicateEx(ZyanString* destination,
|
||||
const ZyanStringView* source, ZyanUSize capacity, ZyanAllocator* allocator,
|
||||
float growth_factor, float shrink_threshold);
|
||||
ZyanU8 growth_factor, ZyanU8 shrink_threshold);
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanString` instance by duplicating an existing string and
|
||||
* configures it to use a custom user defined buffer with a fixed size.
|
||||
* Initializes a new `ZyanString` instance by duplicating an existing string and
|
||||
* configures it to use a custom user defined buffer with a fixed size.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanString` instance.
|
||||
* @param source A pointer to the source string.
|
||||
|
@ -368,7 +367,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringDuplicateCustomBuffer(ZyanString* destination
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanString` instance by concatenating two existing strings.
|
||||
* Initializes a new `ZyanString` instance by concatenating two existing strings.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanString` instance.
|
||||
*
|
||||
|
@ -387,7 +386,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringDuplicateCustomBuffer(ZyanString* destination
|
|||
* string or `destination` points to an already initialized `ZyanString` instance.
|
||||
*
|
||||
* The memory for the string is dynamically allocated by the default allocator using the default
|
||||
* growth factor of `2.0f` and the default shrink threshold of `0.25f`.
|
||||
* growth factor and the default shrink threshold.
|
||||
*
|
||||
* The allocated buffer will be at least one character larger than the given `capacity`, to reserve
|
||||
* space for the terminating '\0'.
|
||||
|
@ -400,8 +399,8 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringConcat(ZyanString* destina
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanString` instance by concatenating two existing strings and sets
|
||||
* a custom `allocator` and memory allocation/deallocation parameters.
|
||||
* Initializes a new `ZyanString` instance by concatenating two existing strings and sets
|
||||
* a custom `allocator` and memory allocation/deallocation parameters.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanString` instance.
|
||||
*
|
||||
|
@ -414,15 +413,15 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringConcat(ZyanString* destina
|
|||
* This value is automatically adjusted to the combined size of the
|
||||
* source strings, if a smaller value was passed.
|
||||
* @param allocator A pointer to a `ZyanAllocator` instance.
|
||||
* @param growth_factor The growth factor (from `1.0f` to `x.xf`).
|
||||
* @param shrink_threshold The shrink threshold (from `0.0f` to `1.0f`).
|
||||
* @param growth_factor The growth factor.
|
||||
* @param shrink_threshold The shrink threshold.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
* The behavior of this function is undefined, if `s1` or `s2` are views into the `destination`
|
||||
* string or `destination` points to an already initialized `ZyanString` instance.
|
||||
*
|
||||
* A growth factor of `1.0f` disables overallocation and a shrink threshold of `0.0f` disables
|
||||
* A growth factor of `1` disables overallocation and a shrink threshold of `0` disables
|
||||
* dynamic shrinking.
|
||||
*
|
||||
* The allocated buffer will be at least one character larger than the given `capacity`, to reserve
|
||||
|
@ -431,12 +430,12 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanStringConcat(ZyanString* destina
|
|||
* Finalization with `ZyanStringDestroy` is required for all strings created by this function.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanStringConcatEx(ZyanString* destination, const ZyanStringView* s1,
|
||||
const ZyanStringView* s2, ZyanUSize capacity, ZyanAllocator* allocator, float growth_factor,
|
||||
float shrink_threshold);
|
||||
const ZyanStringView* s2, ZyanUSize capacity, ZyanAllocator* allocator, ZyanU8 growth_factor,
|
||||
ZyanU8 shrink_threshold);
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanString` instance by concatenating two existing strings and
|
||||
* configures it to use a custom user defined buffer with a fixed size.
|
||||
* Initializes a new `ZyanString` instance by concatenating two existing strings and
|
||||
* configures it to use a custom user defined buffer with a fixed size.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanString` instance.
|
||||
*
|
||||
|
@ -465,7 +464,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringConcatCustomBuffer(ZyanString* destination,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns a view inside an existing view/string.
|
||||
* Returns a view inside an existing view/string.
|
||||
*
|
||||
* @param view A pointer to the `ZyanStringView` instance.
|
||||
* @param source A pointer to the source string.
|
||||
|
@ -479,7 +478,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringViewInsideView(ZyanStringView* view,
|
|||
const ZyanStringView* source);
|
||||
|
||||
/**
|
||||
* @brief Returns a view inside an existing view/string starting from the given `index`.
|
||||
* Returns a view inside an existing view/string starting from the given `index`.
|
||||
*
|
||||
* @param view A pointer to the `ZyanStringView` instance.
|
||||
* @param source A pointer to the source string.
|
||||
|
@ -495,7 +494,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringViewInsideViewEx(ZyanStringView* view,
|
|||
const ZyanStringView* source, ZyanUSize index, ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Returns a view inside a null-terminated C-style string.
|
||||
* Returns a view inside a null-terminated C-style string.
|
||||
*
|
||||
* @param view A pointer to the `ZyanStringView` instance.
|
||||
* @param string The C-style string.
|
||||
|
@ -505,7 +504,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringViewInsideViewEx(ZyanStringView* view,
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringViewInsideBuffer(ZyanStringView* view, const char* string);
|
||||
|
||||
/**
|
||||
* @brief Returns a view inside a character buffer with custom length.
|
||||
* Returns a view inside a character buffer with custom length.
|
||||
*
|
||||
* @param view A pointer to the `ZyanStringView` instance.
|
||||
* @param buffer A pointer to the buffer containing the string characters.
|
||||
|
@ -517,7 +516,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringViewInsideBufferEx(ZyanStringView* view, cons
|
|||
ZyanUSize length);
|
||||
|
||||
/**
|
||||
* @brief Returns the size (number of characters) of the view.
|
||||
* Returns the size (number of characters) of the view.
|
||||
*
|
||||
* @param view A pointer to the `ZyanStringView` instance.
|
||||
* @param size Receives the size (number of characters) of the view.
|
||||
|
@ -527,12 +526,12 @@ ZYCORE_EXPORT ZyanStatus ZyanStringViewInsideBufferEx(ZyanStringView* view, cons
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringViewGetSize(const ZyanStringView* view, ZyanUSize* size);
|
||||
|
||||
/**
|
||||
* @brief Returns the C-style string of the given `ZyanString` instance.
|
||||
* Returns the C-style string of the given `ZyanString` instance.
|
||||
*
|
||||
* @warning The string is not guaranteed to be null terminated!
|
||||
*
|
||||
* @param string A pointer to the `ZyanStringView` instance.
|
||||
* @param value Receives a pointer to the C-style string.
|
||||
* @param view A pointer to the `ZyanStringView` instance.
|
||||
* @param buffer Receives a pointer to the C-style string.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
|
@ -543,7 +542,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringViewGetData(const ZyanStringView* view, const
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the character at the given `index`.
|
||||
* Returns the character at the given `index`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanStringView` instance.
|
||||
* @param index The character index.
|
||||
|
@ -555,7 +554,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringGetChar(const ZyanStringView* string, ZyanUSi
|
|||
char* value);
|
||||
|
||||
/**
|
||||
* @brief Returns a pointer to the character at the given `index`.
|
||||
* Returns a pointer to the character at the given `index`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The character index.
|
||||
|
@ -567,7 +566,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringGetCharMutable(ZyanString* string, ZyanUSize
|
|||
char** value);
|
||||
|
||||
/**
|
||||
* @brief Assigns a new value to the character at the given `index`.
|
||||
* Assigns a new value to the character at the given `index`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The character index.
|
||||
|
@ -582,7 +581,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringSetChar(ZyanString* string, ZyanUSize index,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Inserts the content of the source string in the destination string at the given `index`.
|
||||
* Inserts the content of the source string in the destination string at the given `index`.
|
||||
*
|
||||
* @param destination The destination string.
|
||||
* @param index The insert index.
|
||||
|
@ -594,8 +593,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInsert(ZyanString* destination, ZyanUSize ind
|
|||
const ZyanStringView* source);
|
||||
|
||||
/**
|
||||
* @brief Inserts `count` characters of the source string in the destination string at the given
|
||||
* `index`.
|
||||
* Inserts `count` characters of the source string in the destination string at the given
|
||||
* `index`.
|
||||
*
|
||||
* @param destination The destination string.
|
||||
* @param destination_index The insert index.
|
||||
|
@ -614,7 +613,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInsertEx(ZyanString* destination, ZyanUSize d
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Appends the content of the source string to the end of the destination string.
|
||||
* Appends the content of the source string to the end of the destination string.
|
||||
*
|
||||
* @param destination The destination string.
|
||||
* @param source The source string.
|
||||
|
@ -624,7 +623,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringInsertEx(ZyanString* destination, ZyanUSize d
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringAppend(ZyanString* destination, const ZyanStringView* source);
|
||||
|
||||
/**
|
||||
* @brief Appends `count` characters of the source string to the end of the destination string.
|
||||
* Appends `count` characters of the source string to the end of the destination string.
|
||||
*
|
||||
* @param destination The destination string.
|
||||
* @param source The source string.
|
||||
|
@ -641,7 +640,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringAppendEx(ZyanString* destination, const ZyanS
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Deletes characters from the given string, starting at `index`.
|
||||
* Deletes characters from the given string, starting at `index`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The index of the first character to delete.
|
||||
|
@ -652,7 +651,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringAppendEx(ZyanString* destination, const ZyanS
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringDelete(ZyanString* string, ZyanUSize index, ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Deletes all remaining characters from the given string, starting at `index`.
|
||||
* Deletes all remaining characters from the given string, starting at `index`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The index of the first character to delete.
|
||||
|
@ -662,7 +661,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringDelete(ZyanString* string, ZyanUSize index, Z
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringTruncate(ZyanString* string, ZyanUSize index);
|
||||
|
||||
/**
|
||||
* @brief Erases the given string.
|
||||
* Erases the given string.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
*
|
||||
|
@ -675,8 +674,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringClear(ZyanString* string);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Searches for the first occurrence of `needle` in the given `haystack` starting from the
|
||||
* left.
|
||||
* Searches for the first occurrence of `needle` in the given `haystack` starting from the
|
||||
* left.
|
||||
*
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The sub-string to search for.
|
||||
|
@ -692,8 +691,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringLPos(const ZyanStringView* haystack,
|
|||
const ZyanStringView* needle, ZyanISize* found_index);
|
||||
|
||||
/**
|
||||
* @brief Searches for the first occurrence of `needle` in the given `haystack` starting from the
|
||||
* left.
|
||||
* Searches for the first occurrence of `needle` in the given `haystack` starting from the
|
||||
* left.
|
||||
*
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The sub-string to search for.
|
||||
|
@ -712,8 +711,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringLPosEx(const ZyanStringView* haystack,
|
|||
const ZyanStringView* needle, ZyanISize* found_index, ZyanUSize index, ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Performs a case-insensitive search for the first occurrence of `needle` in the given
|
||||
* `haystack` starting from the left.
|
||||
* Performs a case-insensitive search for the first occurrence of `needle` in the given
|
||||
* `haystack` starting from the left.
|
||||
*
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The sub-string to search for.
|
||||
|
@ -729,8 +728,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringLPosI(const ZyanStringView* haystack,
|
|||
const ZyanStringView* needle, ZyanISize* found_index);
|
||||
|
||||
/**
|
||||
* @brief Performs a case-insensitive search for the first occurrence of `needle` in the given
|
||||
* `haystack` starting from the left.
|
||||
* Performs a case-insensitive search for the first occurrence of `needle` in the given
|
||||
* `haystack` starting from the left.
|
||||
*
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The sub-string to search for.
|
||||
|
@ -741,7 +740,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringLPosI(const ZyanStringView* haystack,
|
|||
* `index`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the needle was found, `ZYAN_STATUS_FALSE`, if not, or another
|
||||
* zyan status code, if an error occured.
|
||||
* zyan status code, if an error occurred.
|
||||
*
|
||||
* The `found_index` is set to `-1`, if the needle was not found.
|
||||
*/
|
||||
|
@ -749,8 +748,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringLPosIEx(const ZyanStringView* haystack,
|
|||
const ZyanStringView* needle, ZyanISize* found_index, ZyanUSize index, ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Searches for the first occurrence of `needle` in the given `haystack` starting from the
|
||||
* right.
|
||||
* Searches for the first occurrence of `needle` in the given `haystack` starting from the
|
||||
* right.
|
||||
*
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The sub-string to search for.
|
||||
|
@ -758,7 +757,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringLPosIEx(const ZyanStringView* haystack,
|
|||
* `needle`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the needle was found, `ZYAN_STATUS_FALSE`, if not, or another
|
||||
* zyan status code, if an error occured.
|
||||
* zyan status code, if an error occurred.
|
||||
*
|
||||
* The `found_index` is set to `-1`, if the needle was not found.
|
||||
*/
|
||||
|
@ -766,7 +765,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringRPos(const ZyanStringView* haystack,
|
|||
const ZyanStringView* needle, ZyanISize* found_index);
|
||||
|
||||
/**
|
||||
* @brief Searches for the first occurrence of `needle` in the given `haystack` starting from the
|
||||
* Searches for the first occurrence of `needle` in the given `haystack` starting from the
|
||||
* right.
|
||||
*
|
||||
* @param haystack The string to search in.
|
||||
|
@ -778,7 +777,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringRPos(const ZyanStringView* haystack,
|
|||
* `index`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the needle was found, `ZYAN_STATUS_FALSE`, if not, or another
|
||||
* zyan status code, if an error occured.
|
||||
* zyan status code, if an error occurred.
|
||||
*
|
||||
* The `found_index` is set to `-1`, if the needle was not found.
|
||||
*/
|
||||
|
@ -786,8 +785,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringRPosEx(const ZyanStringView* haystack,
|
|||
const ZyanStringView* needle, ZyanISize* found_index, ZyanUSize index, ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Performs a case-insensitive search for the first occurrence of `needle` in the given
|
||||
* `haystack` starting from the right.
|
||||
* Performs a case-insensitive search for the first occurrence of `needle` in the given
|
||||
* `haystack` starting from the right.
|
||||
*
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The sub-string to search for.
|
||||
|
@ -795,7 +794,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringRPosEx(const ZyanStringView* haystack,
|
|||
* `needle`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the needle was found, `ZYAN_STATUS_FALSE`, if not, or another
|
||||
* zyan status code, if an error occured.
|
||||
* zyan status code, if an error occurred.
|
||||
*
|
||||
* The `found_index` is set to `-1`, if the needle was not found.
|
||||
*/
|
||||
|
@ -803,8 +802,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringRPosI(const ZyanStringView* haystack,
|
|||
const ZyanStringView* needle, ZyanISize* found_index);
|
||||
|
||||
/**
|
||||
* @brief Performs a case-insensitive search for the first occurrence of `needle` in the given
|
||||
* `haystack` starting from the right.
|
||||
* Performs a case-insensitive search for the first occurrence of `needle` in the given
|
||||
* `haystack` starting from the right.
|
||||
*
|
||||
* @param haystack The string to search in.
|
||||
* @param needle The sub-string to search for.
|
||||
|
@ -815,7 +814,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringRPosI(const ZyanStringView* haystack,
|
|||
* `index`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the needle was found, `ZYAN_STATUS_FALSE`, if not, or another
|
||||
* zyan status code, if an error occured.
|
||||
* zyan status code, if an error occurred.
|
||||
*
|
||||
* The `found_index` is set to `-1`, if the needle was not found.
|
||||
*/
|
||||
|
@ -827,7 +826,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringRPosIEx(const ZyanStringView* haystack,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Compares two strings.
|
||||
* Compares two strings.
|
||||
*
|
||||
* @param s1 The first string
|
||||
* @param s2 The second string.
|
||||
|
@ -841,13 +840,13 @@ ZYCORE_EXPORT ZyanStatus ZyanStringRPosIEx(const ZyanStringView* haystack,
|
|||
* in `s1` than in `s2`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the strings are equal, `ZYAN_STATUS_FALSE`, if not, or another
|
||||
* zyan status code, if an error occured.
|
||||
* zyan status code, if an error occurred.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanStringCompare(const ZyanStringView* s1, const ZyanStringView* s2,
|
||||
ZyanI32* result);
|
||||
|
||||
/**
|
||||
* @brief Performs a case-insensitive comparison of two strings.
|
||||
* Performs a case-insensitive comparison of two strings.
|
||||
*
|
||||
* @param s1 The first string
|
||||
* @param s2 The second string.
|
||||
|
@ -861,7 +860,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringCompare(const ZyanStringView* s1, const ZyanS
|
|||
* in `s1` than in `s2`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE`, if the strings are equal, `ZYAN_STATUS_FALSE`, if not, or another
|
||||
* zyan status code, if an error occured.
|
||||
* zyan status code, if an error occurred.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanStringCompareI(const ZyanStringView* s1, const ZyanStringView* s2,
|
||||
ZyanI32* result);
|
||||
|
@ -871,7 +870,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringCompareI(const ZyanStringView* s1, const Zyan
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Converts the given string to lowercase letters.
|
||||
* Converts the given string to lowercase letters.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
*
|
||||
|
@ -883,7 +882,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringCompareI(const ZyanStringView* s1, const Zyan
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringToLowerCase(ZyanString* string);
|
||||
|
||||
/**
|
||||
* @brief Converts `count` characters of the given string to lowercase letters.
|
||||
* Converts `count` characters of the given string to lowercase letters.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The start index.
|
||||
|
@ -898,7 +897,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringToLowerCaseEx(ZyanString* string, ZyanUSize i
|
|||
ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Converts the given string to uppercase letters.
|
||||
* Converts the given string to uppercase letters.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
*
|
||||
|
@ -910,7 +909,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringToLowerCaseEx(ZyanString* string, ZyanUSize i
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringToUpperCase(ZyanString* string);
|
||||
|
||||
/**
|
||||
* @brief Converts `count` characters of the given string to uppercase letters.
|
||||
* Converts `count` characters of the given string to uppercase letters.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param index The start index.
|
||||
|
@ -929,7 +928,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringToUpperCaseEx(ZyanString* string, ZyanUSize i
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Resizes the given `ZyanString` instance.
|
||||
* Resizes the given `ZyanString` instance.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param size The new size of the string.
|
||||
|
@ -942,7 +941,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringToUpperCaseEx(ZyanString* string, ZyanUSize i
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringResize(ZyanString* string, ZyanUSize size);
|
||||
|
||||
/**
|
||||
* @brief Changes the capacity of the given `ZyanString` instance.
|
||||
* Changes the capacity of the given `ZyanString` instance.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param capacity The new minimum capacity of the string.
|
||||
|
@ -955,7 +954,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringResize(ZyanString* string, ZyanUSize size);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringReserve(ZyanString* string, ZyanUSize capacity);
|
||||
|
||||
/**
|
||||
* @brief Shrinks the capacity of the given string to match it's size.
|
||||
* Shrinks the capacity of the given string to match it's size.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
*
|
||||
|
@ -971,7 +970,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringShrinkToFit(ZyanString* string);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the current capacity of the string.
|
||||
* Returns the current capacity of the string.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param capacity Receives the size of the string.
|
||||
|
@ -981,8 +980,8 @@ ZYCORE_EXPORT ZyanStatus ZyanStringShrinkToFit(ZyanString* string);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringGetCapacity(const ZyanString* string, ZyanUSize* capacity);
|
||||
|
||||
/**
|
||||
* @brief Returns the current size (number of characters) of the string (excluding the
|
||||
* terminating zero character).
|
||||
* Returns the current size (number of characters) of the string (excluding the
|
||||
* terminating zero character).
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param size Receives the size (number of characters) of the string.
|
||||
|
@ -992,7 +991,7 @@ ZYCORE_EXPORT ZyanStatus ZyanStringGetCapacity(const ZyanString* string, ZyanUSi
|
|||
ZYCORE_EXPORT ZyanStatus ZyanStringGetSize(const ZyanString* string, ZyanUSize* size);
|
||||
|
||||
/**
|
||||
* @brief Returns the C-style string of the given `ZyanString` instance.
|
||||
* Returns the C-style string of the given `ZyanString` instance.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param value Receives a pointer to the C-style string.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Includes and defines some default data types.
|
||||
* Includes and defines some default data types.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_TYPES_H
|
||||
|
@ -38,25 +38,9 @@
|
|||
/* Integer types */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#if !defined(ZYAN_NO_LIBC) && \
|
||||
(!defined(ZYAN_MSVC) && defined(ZYAN_KERNEL)) // The WDK LibC lacks stdint.h.
|
||||
// If is LibC present, we use stdint types.
|
||||
# include <stdint.h>
|
||||
# include <stddef.h>
|
||||
typedef uint8_t ZyanU8;
|
||||
typedef uint16_t ZyanU16;
|
||||
typedef uint32_t ZyanU32;
|
||||
typedef uint64_t ZyanU64;
|
||||
typedef int8_t ZyanI8;
|
||||
typedef int16_t ZyanI16;
|
||||
typedef int32_t ZyanI32;
|
||||
typedef int64_t ZyanI64;
|
||||
typedef size_t ZyanUSize;
|
||||
typedef ptrdiff_t ZyanISize;
|
||||
typedef uintptr_t ZyanUPointer;
|
||||
typedef intptr_t ZyanIPointer;
|
||||
#else
|
||||
// No LibC, use compiler built-in types / macros.
|
||||
#if defined(ZYAN_NO_LIBC) || \
|
||||
(defined(ZYAN_MSVC) && defined(ZYAN_KERNEL)) // The WDK LibC lacks stdint.h.
|
||||
// No LibC mode, use compiler built-in types / macros.
|
||||
# if defined(ZYAN_MSVC) || defined(ZYAN_ICC)
|
||||
typedef unsigned __int8 ZyanU8;
|
||||
typedef unsigned __int16 ZyanU16;
|
||||
|
@ -93,6 +77,63 @@
|
|||
# else
|
||||
# error "Unsupported compiler for no-libc mode."
|
||||
# endif
|
||||
|
||||
# if defined(ZYAN_MSVC)
|
||||
# define ZYAN_INT8_MIN (-127i8 - 1)
|
||||
# define ZYAN_INT16_MIN (-32767i16 - 1)
|
||||
# define ZYAN_INT32_MIN (-2147483647i32 - 1)
|
||||
# define ZYAN_INT64_MIN (-9223372036854775807i64 - 1)
|
||||
# define ZYAN_INT8_MAX 127i8
|
||||
# define ZYAN_INT16_MAX 32767i16
|
||||
# define ZYAN_INT32_MAX 2147483647i32
|
||||
# define ZYAN_INT64_MAX 9223372036854775807i64
|
||||
# define ZYAN_UINT8_MAX 0xffui8
|
||||
# define ZYAN_UINT16_MAX 0xffffui16
|
||||
# define ZYAN_UINT32_MAX 0xffffffffui32
|
||||
# define ZYAN_UINT64_MAX 0xffffffffffffffffui64
|
||||
# else
|
||||
# define ZYAN_INT8_MAX __INT8_MAX__
|
||||
# define ZYAN_INT8_MIN (-ZYAN_INT8_MAX - 1)
|
||||
# define ZYAN_INT16_MAX __INT16_MAX__
|
||||
# define ZYAN_INT16_MIN (-ZYAN_INT16_MAX - 1)
|
||||
# define ZYAN_INT32_MAX __INT32_MAX__
|
||||
# define ZYAN_INT32_MIN (-ZYAN_INT32_MAX - 1)
|
||||
# define ZYAN_INT64_MAX __INT64_MAX__
|
||||
# define ZYAN_INT64_MIN (-ZYAN_INT64_MAX - 1)
|
||||
# define ZYAN_UINT8_MAX __UINT8_MAX__
|
||||
# define ZYAN_UINT16_MAX __UINT16_MAX__
|
||||
# define ZYAN_UINT32_MAX __UINT32_MAX__
|
||||
# define ZYAN_UINT64_MAX __UINT64_MAX__
|
||||
# endif
|
||||
#else
|
||||
// If is LibC present, we use stdint types.
|
||||
# include <stdint.h>
|
||||
# include <stddef.h>
|
||||
typedef uint8_t ZyanU8;
|
||||
typedef uint16_t ZyanU16;
|
||||
typedef uint32_t ZyanU32;
|
||||
typedef uint64_t ZyanU64;
|
||||
typedef int8_t ZyanI8;
|
||||
typedef int16_t ZyanI16;
|
||||
typedef int32_t ZyanI32;
|
||||
typedef int64_t ZyanI64;
|
||||
typedef size_t ZyanUSize;
|
||||
typedef ptrdiff_t ZyanISize;
|
||||
typedef uintptr_t ZyanUPointer;
|
||||
typedef intptr_t ZyanIPointer;
|
||||
|
||||
# define ZYAN_INT8_MIN INT8_MIN
|
||||
# define ZYAN_INT16_MIN INT16_MIN
|
||||
# define ZYAN_INT32_MIN INT32_MIN
|
||||
# define ZYAN_INT64_MIN INT64_MIN
|
||||
# define ZYAN_INT8_MAX INT8_MAX
|
||||
# define ZYAN_INT16_MAX INT16_MAX
|
||||
# define ZYAN_INT32_MAX INT32_MAX
|
||||
# define ZYAN_INT64_MAX INT64_MAX
|
||||
# define ZYAN_UINT8_MAX UINT8_MAX
|
||||
# define ZYAN_UINT16_MAX UINT16_MAX
|
||||
# define ZYAN_UINT32_MAX UINT32_MAX
|
||||
# define ZYAN_UINT64_MAX UINT64_MAX
|
||||
#endif
|
||||
|
||||
// Verify size assumptions.
|
||||
|
@ -116,9 +157,19 @@ ZYAN_STATIC_ASSERT((ZyanI32)-1 >> 1 < (ZyanI32)((ZyanU32)-1 >> 1));
|
|||
ZYAN_STATIC_ASSERT((ZyanI64)-1 >> 1 < (ZyanI64)((ZyanU64)-1 >> 1));
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* NULL */
|
||||
/* Pointer */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* Defines the `ZyanVoidPointer` data-type.
|
||||
*/
|
||||
typedef void* ZyanVoidPointer;
|
||||
|
||||
/**
|
||||
* Defines the `ZyanConstVoidPointer` data-type.
|
||||
*/
|
||||
typedef const void* ZyanConstVoidPointer;
|
||||
|
||||
#define ZYAN_NULL ((void*)0)
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
@ -133,8 +184,8 @@ ZYAN_STATIC_ASSERT((ZyanI64)-1 >> 1 < (ZyanI64)((ZyanU64)-1 >> 1));
|
|||
#define ZYAN_TRUE 1
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanBool` data-type.
|
||||
*
|
||||
* Defines the `ZyanBool` data-type.
|
||||
*
|
||||
* Represents a default boolean data-type where `0` is interpreted as `false` and all other values
|
||||
* as `true`.
|
||||
*/
|
||||
|
@ -145,9 +196,9 @@ typedef ZyanU8 ZyanBool;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanTernary` data-type.
|
||||
*
|
||||
* The `ZyanTernary` is a balanced ternary type that uses three truth values indicating `true`,
|
||||
* Defines the `ZyanTernary` data-type.
|
||||
*
|
||||
* The `ZyanTernary` is a balanced ternary type that uses three truth values indicating `true`,
|
||||
* `false` and an indeterminate third value.
|
||||
*/
|
||||
typedef ZyanI8 ZyanTernary;
|
||||
|
@ -165,14 +216,14 @@ typedef ZyanI8 ZyanTernary;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanCharPointer` data-type.
|
||||
*
|
||||
* Defines the `ZyanCharPointer` data-type.
|
||||
*
|
||||
* This type is most often used to represent null-terminated strings aka. C-style strings.
|
||||
*/
|
||||
typedef char* ZyanCharPointer;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanConstCharPointer` data-type.
|
||||
* Defines the `ZyanConstCharPointer` data-type.
|
||||
*
|
||||
* This type is most often used to represent null-terminated strings aka. C-style strings.
|
||||
*/
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Checks, if the passed vector should grow.
|
||||
* Checks, if the passed vector should grow.
|
||||
*
|
||||
* @param size The desired size of the vector.
|
||||
* @param capacity The current capacity of the vector.
|
||||
|
@ -43,7 +43,7 @@
|
|||
((size) > (capacity))
|
||||
|
||||
/**
|
||||
* @brief Checks, if the passed vector should shrink.
|
||||
* Checks, if the passed vector should shrink.
|
||||
*
|
||||
* @param size The desired size of the vector.
|
||||
* @param capacity The current capacity of the vector.
|
||||
|
@ -52,10 +52,10 @@
|
|||
* @return `ZYAN_TRUE`, if the vector should shrink or `ZYAN_FALSE`, if not.
|
||||
*/
|
||||
#define ZYCORE_VECTOR_SHOULD_SHRINK(size, capacity, threshold) \
|
||||
((size) < (capacity) * (threshold))
|
||||
(((threshold) != 0) && ((size) * (threshold) < (capacity)))
|
||||
|
||||
/**
|
||||
* @brief Returns the offset of the element at the given `index`.
|
||||
* Returns the offset of the element at the given `index`.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The element index.
|
||||
|
@ -74,7 +74,7 @@
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Reallocates the internal buffer of the vector.
|
||||
* Reallocates the internal buffer of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param capacity The new capacity.
|
||||
|
@ -119,8 +119,7 @@ static ZyanStatus ZyanVectorReallocate(ZyanVector* vector, ZyanUSize capacity)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Shifts all elements starting at the specified `index` by the amount of `count` to the
|
||||
* left.
|
||||
* Shifts all elements starting at the specified `index` by the amount of `count` to the left.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The start index.
|
||||
|
@ -136,17 +135,16 @@ static ZyanStatus ZyanVectorShiftLeft(ZyanVector* vector, ZyanUSize index, ZyanU
|
|||
ZYAN_ASSERT(count > 0);
|
||||
//ZYAN_ASSERT((ZyanISize)count - (ZyanISize)index + 1 >= 0);
|
||||
|
||||
void* const source = ZYCORE_VECTOR_OFFSET(vector, index + count);
|
||||
void* const dest = ZYCORE_VECTOR_OFFSET(vector, index);
|
||||
const ZyanUSize size = (vector->size - index - count) * vector->element_size;
|
||||
const void* const source = ZYCORE_VECTOR_OFFSET(vector, index + count);
|
||||
void* const dest = ZYCORE_VECTOR_OFFSET(vector, index);
|
||||
const ZyanUSize size = (vector->size - index - count) * vector->element_size;
|
||||
ZYAN_MEMMOVE(dest, source, size);
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Shifts all elements starting at the specified `index` by the amount of `count` to the
|
||||
* right.
|
||||
* Shifts all elements starting at the specified `index` by the amount of `count` to the right.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The start index.
|
||||
|
@ -162,9 +160,9 @@ static ZyanStatus ZyanVectorShiftRight(ZyanVector* vector, ZyanUSize index, Zyan
|
|||
ZYAN_ASSERT(count > 0);
|
||||
ZYAN_ASSERT(vector->size + count <= vector->capacity);
|
||||
|
||||
void* const source = ZYCORE_VECTOR_OFFSET(vector, index);
|
||||
void* const dest = ZYCORE_VECTOR_OFFSET(vector, index + count);
|
||||
const ZyanUSize size = (vector->size - index) * vector->element_size;
|
||||
const void* const source = ZYCORE_VECTOR_OFFSET(vector, index);
|
||||
void* const dest = ZYCORE_VECTOR_OFFSET(vector, index + count);
|
||||
const ZyanUSize size = (vector->size - index) * vector->element_size;
|
||||
ZYAN_MEMMOVE(dest, source, size);
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
|
@ -192,11 +190,10 @@ ZyanStatus ZyanVectorInit(ZyanVector* vector, ZyanUSize element_size, ZyanUSize
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
ZyanStatus ZyanVectorInitEx(ZyanVector* vector, ZyanUSize element_size, ZyanUSize capacity,
|
||||
ZyanMemberProcedure destructor, ZyanAllocator* allocator, float growth_factor,
|
||||
float shrink_threshold)
|
||||
ZyanMemberProcedure destructor, ZyanAllocator* allocator, ZyanU8 growth_factor,
|
||||
ZyanU8 shrink_threshold)
|
||||
{
|
||||
if (!vector || !element_size || !allocator || (growth_factor < 1.0f) ||
|
||||
(shrink_threshold < 0.0f) || (shrink_threshold > 1.0f))
|
||||
if (!vector || !element_size || !allocator || (growth_factor < 1))
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
@ -225,8 +222,8 @@ ZyanStatus ZyanVectorInitCustomBuffer(ZyanVector* vector, ZyanUSize element_size
|
|||
}
|
||||
|
||||
vector->allocator = ZYAN_NULL;
|
||||
vector->growth_factor = 1.0f;
|
||||
vector->shrink_threshold = 0.0f;
|
||||
vector->growth_factor = 1;
|
||||
vector->shrink_threshold = 0;
|
||||
vector->size = 0;
|
||||
vector->capacity = capacity;
|
||||
vector->element_size = element_size;
|
||||
|
@ -281,7 +278,7 @@ ZyanStatus ZyanVectorDuplicate(ZyanVector* destination, const ZyanVector* source
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
ZyanStatus ZyanVectorDuplicateEx(ZyanVector* destination, const ZyanVector* source,
|
||||
ZyanUSize capacity, ZyanAllocator* allocator, float growth_factor, float shrink_threshold)
|
||||
ZyanUSize capacity, ZyanAllocator* allocator, ZyanU8 growth_factor, ZyanU8 shrink_threshold)
|
||||
{
|
||||
if (!source)
|
||||
{
|
||||
|
@ -291,7 +288,7 @@ ZyanStatus ZyanVectorDuplicateEx(ZyanVector* destination, const ZyanVector* sour
|
|||
const ZyanUSize len = source->size;
|
||||
|
||||
capacity = ZYAN_MAX(capacity, len);
|
||||
ZYAN_CHECK(ZyanVectorInitEx(destination, source->element_size, capacity, source->destructor,
|
||||
ZYAN_CHECK(ZyanVectorInitEx(destination, source->element_size, capacity, source->destructor,
|
||||
allocator, growth_factor, shrink_threshold));
|
||||
ZYAN_ASSERT(destination->capacity >= len);
|
||||
|
||||
|
@ -316,7 +313,7 @@ ZyanStatus ZyanVectorDuplicateCustomBuffer(ZyanVector* destination, const ZyanVe
|
|||
return ZYAN_STATUS_INSUFFICIENT_BUFFER_SIZE;
|
||||
}
|
||||
|
||||
ZYAN_CHECK(ZyanVectorInitCustomBuffer(destination, source->element_size, buffer, capacity,
|
||||
ZYAN_CHECK(ZyanVectorInitCustomBuffer(destination, source->element_size, buffer, capacity,
|
||||
source->destructor));
|
||||
ZYAN_ASSERT(destination->capacity >= len);
|
||||
|
||||
|
@ -768,21 +765,22 @@ ZyanStatus ZyanVectorResizeEx(ZyanVector* vector, ZyanUSize size, const void* in
|
|||
for (ZyanUSize i = size; i < vector->size; ++i)
|
||||
{
|
||||
vector->destructor(ZYCORE_VECTOR_OFFSET(vector, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ZYCORE_VECTOR_SHOULD_GROW(size, vector->capacity) ||
|
||||
ZYCORE_VECTOR_SHOULD_SHRINK(size, vector->capacity, vector->shrink_threshold))
|
||||
{
|
||||
ZYAN_ASSERT(vector->growth_factor >= 1);
|
||||
ZYAN_CHECK(ZyanVectorReallocate(vector, (ZyanUSize)(size * vector->growth_factor)));
|
||||
};
|
||||
}
|
||||
|
||||
if (initializer && (size > vector->size))
|
||||
{
|
||||
for (ZyanUSize i = vector->size; i < size; ++i)
|
||||
{
|
||||
ZYAN_MEMCPY(ZYCORE_VECTOR_OFFSET(vector, i), initializer, vector->element_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vector->size = size;
|
||||
|
|
|
@ -26,13 +26,12 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implements the vector container class.
|
||||
* Implements the vector container class.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_VECTOR_H
|
||||
#define ZYCORE_VECTOR_H
|
||||
|
||||
#include "zydis/ZycoreExportConfig.h"
|
||||
#include "zydis/Zycore/Allocator.h"
|
||||
#include "zydis/Zycore/Comparison.h"
|
||||
#include "zydis/Zycore/Object.h"
|
||||
|
@ -48,27 +47,27 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief The initial minimum capacity (number of elements) for all dynamically allocated vector
|
||||
* instances.
|
||||
* The initial minimum capacity (number of elements) for all dynamically allocated vector
|
||||
* instances.
|
||||
*/
|
||||
#define ZYAN_VECTOR_MIN_CAPACITY 1
|
||||
|
||||
/**
|
||||
* @brief The default growth factor for all vector instances.
|
||||
* The default growth factor for all vector instances.
|
||||
*/
|
||||
#define ZYAN_VECTOR_DEFAULT_GROWTH_FACTOR 2.00f
|
||||
#define ZYAN_VECTOR_DEFAULT_GROWTH_FACTOR 2
|
||||
|
||||
/**
|
||||
* @brief The default shrink threshold for all vector instances.
|
||||
* The default shrink threshold for all vector instances.
|
||||
*/
|
||||
#define ZYAN_VECTOR_DEFAULT_SHRINK_THRESHOLD 0.25f
|
||||
#define ZYAN_VECTOR_DEFAULT_SHRINK_THRESHOLD 4
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Enums and types */
|
||||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZyanVector` struct.
|
||||
* Defines the `ZyanVector` struct.
|
||||
*
|
||||
* All fields in this struct should be considered as "private". Any changes may lead to unexpected
|
||||
* behavior.
|
||||
|
@ -76,35 +75,35 @@ extern "C" {
|
|||
typedef struct ZyanVector_
|
||||
{
|
||||
/**
|
||||
* @brief The memory allocator.
|
||||
* The memory allocator.
|
||||
*/
|
||||
ZyanAllocator* allocator;
|
||||
/**
|
||||
* @brief The growth factor.
|
||||
* The growth factor.
|
||||
*/
|
||||
float growth_factor;
|
||||
ZyanU8 growth_factor;
|
||||
/**
|
||||
* @brief The shrink threshold.
|
||||
* The shrink threshold.
|
||||
*/
|
||||
float shrink_threshold;
|
||||
ZyanU8 shrink_threshold;
|
||||
/**
|
||||
* @brief The current number of elements in the vector.
|
||||
* The current number of elements in the vector.
|
||||
*/
|
||||
ZyanUSize size;
|
||||
/**
|
||||
* @brief The maximum capacity (number of elements).
|
||||
* The maximum capacity (number of elements).
|
||||
*/
|
||||
ZyanUSize capacity;
|
||||
/**
|
||||
* @brief The size of a single element in bytes.
|
||||
* The size of a single element in bytes.
|
||||
*/
|
||||
ZyanUSize element_size;
|
||||
/**
|
||||
* @brief The element destructor callback.
|
||||
* The element destructor callback.
|
||||
*/
|
||||
ZyanMemberProcedure destructor;
|
||||
/**
|
||||
* @brief The data pointer.
|
||||
* The data pointer.
|
||||
*/
|
||||
void* data;
|
||||
} ZyanVector;
|
||||
|
@ -118,13 +117,13 @@ typedef struct ZyanVector_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines an uninitialized `ZyanVector` instance.
|
||||
* Defines an uninitialized `ZyanVector` instance.
|
||||
*/
|
||||
#define ZYAN_VECTOR_INITIALIZER \
|
||||
{ \
|
||||
/* allocator */ ZYAN_NULL, \
|
||||
/* growth_factor */ 0.0f, \
|
||||
/* shrink_threshold */ 0.0f, \
|
||||
/* growth_factor */ 0, \
|
||||
/* shrink_threshold */ 0, \
|
||||
/* size */ 0, \
|
||||
/* capacity */ 0, \
|
||||
/* element_size */ 0, \
|
||||
|
@ -137,7 +136,7 @@ typedef struct ZyanVector_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the value of the element at the given `index`.
|
||||
* Returns the value of the element at the given `index`.
|
||||
*
|
||||
* @param type The desired value type.
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
|
@ -156,7 +155,7 @@ typedef struct ZyanVector_
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief Loops through all elements of the vector.
|
||||
* Loops through all elements of the vector.
|
||||
*
|
||||
* @param type The desired value type.
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
|
@ -178,7 +177,7 @@ typedef struct ZyanVector_
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Loops through all elements of the vector.
|
||||
* Loops through all elements of the vector.
|
||||
*
|
||||
* @param type The desired value type.
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
|
@ -212,7 +211,7 @@ typedef struct ZyanVector_
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanVector` instance.
|
||||
* Initializes the given `ZyanVector` instance.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element_size The size of a single element in bytes.
|
||||
|
@ -223,7 +222,7 @@ typedef struct ZyanVector_
|
|||
* @return A zyan status code.
|
||||
*
|
||||
* The memory for the vector elements is dynamically allocated by the default allocator using the
|
||||
* default growth factor of `2.0f` and the default shrink threshold of `0.25f`.
|
||||
* default growth factor and the default shrink threshold.
|
||||
*
|
||||
* Finalization with `ZyanVectorDestroy` is required for all instances created by this function.
|
||||
*/
|
||||
|
@ -233,32 +232,32 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanVectorInit(ZyanVector* vector,
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanVector` instance and sets a custom `allocator` and memory
|
||||
* allocation/deallocation parameters.
|
||||
* Initializes the given `ZyanVector` instance and sets a custom `allocator` and memory
|
||||
* allocation/deallocation parameters.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element_size The size of a single element in bytes.
|
||||
* @param capacity The initial capacity (number of elements).
|
||||
* @param destructor A destructor callback that is invoked every time an item is deleted,
|
||||
* @param destructor A destructor callback that is invoked every time an item is deleted,
|
||||
* or `ZYAN_NULL` if not needed.
|
||||
* @param allocator A pointer to a `ZyanAllocator` instance.
|
||||
* @param growth_factor The growth factor (from `1.0f` to `x.xf`).
|
||||
* @param shrink_threshold The shrink threshold (from `0.0f` to `1.0f`).
|
||||
* @param growth_factor The growth factor.
|
||||
* @param shrink_threshold The shrink threshold.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
* A growth factor of `1.0f` disables overallocation and a shrink threshold of `0.0f` disables
|
||||
* A growth factor of `1` disables overallocation and a shrink threshold of `0` disables
|
||||
* dynamic shrinking.
|
||||
*
|
||||
* Finalization with `ZyanVectorDestroy` is required for all instances created by this function.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanVectorInitEx(ZyanVector* vector, ZyanUSize element_size,
|
||||
ZyanUSize capacity, ZyanMemberProcedure destructor, ZyanAllocator* allocator,
|
||||
float growth_factor, float shrink_threshold);
|
||||
ZyanUSize capacity, ZyanMemberProcedure destructor, ZyanAllocator* allocator,
|
||||
ZyanU8 growth_factor, ZyanU8 shrink_threshold);
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZyanVector` instance and configures it to use a custom user
|
||||
* defined buffer with a fixed size.
|
||||
* Initializes the given `ZyanVector` instance and configures it to use a custom user
|
||||
* defined buffer with a fixed size.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element_size The size of a single element in bytes.
|
||||
|
@ -275,7 +274,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorInitCustomBuffer(ZyanVector* vector, ZyanUSiz
|
|||
void* buffer, ZyanUSize capacity, ZyanMemberProcedure destructor);
|
||||
|
||||
/**
|
||||
* @brief Destroys the given `ZyanVector` instance.
|
||||
* Destroys the given `ZyanVector` instance.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance..
|
||||
*
|
||||
|
@ -290,7 +289,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorDestroy(ZyanVector* vector);
|
|||
#ifndef ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanVector` instance by duplicating an existing vector.
|
||||
* Initializes a new `ZyanVector` instance by duplicating an existing vector.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanVector` instance.
|
||||
* @param source A pointer to the source vector.
|
||||
|
@ -302,7 +301,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorDestroy(ZyanVector* vector);
|
|||
* @return A zyan status code.
|
||||
*
|
||||
* The memory for the vector is dynamically allocated by the default allocator using the default
|
||||
* growth factor of `2.0f` and the default shrink threshold of `0.25f`.
|
||||
* growth factor and the default shrink threshold.
|
||||
*
|
||||
* Finalization with `ZyanVectorDestroy` is required for all instances created by this function.
|
||||
*/
|
||||
|
@ -312,8 +311,8 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanVectorDuplicate(ZyanVector* dest
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanVector` instance by duplicating an existing vector and sets a
|
||||
* custom `allocator` and memory allocation/deallocation parameters.
|
||||
* Initializes a new `ZyanVector` instance by duplicating an existing vector and sets a
|
||||
* custom `allocator` and memory allocation/deallocation parameters.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanVector` instance.
|
||||
* @param source A pointer to the source vector.
|
||||
|
@ -322,22 +321,22 @@ ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus ZyanVectorDuplicate(ZyanVector* dest
|
|||
* This value is automatically adjusted to the size of the source
|
||||
* vector, if a smaller value was passed.
|
||||
* @param allocator A pointer to a `ZyanAllocator` instance.
|
||||
* @param growth_factor The growth factor (from `1.0f` to `x.xf`).
|
||||
* @param shrink_threshold The shrink threshold (from `0.0f` to `1.0f`).
|
||||
* @param growth_factor The growth factor.
|
||||
* @param shrink_threshold The shrink threshold.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*
|
||||
* A growth factor of `1.0f` disables overallocation and a shrink threshold of `0.0f` disables
|
||||
* A growth factor of `1` disables overallocation and a shrink threshold of `0` disables
|
||||
* dynamic shrinking.
|
||||
*
|
||||
* Finalization with `ZyanVectorDestroy` is required for all instances created by this function.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanVectorDuplicateEx(ZyanVector* destination, const ZyanVector* source,
|
||||
ZyanUSize capacity, ZyanAllocator* allocator, float growth_factor, float shrink_threshold);
|
||||
ZyanUSize capacity, ZyanAllocator* allocator, ZyanU8 growth_factor, ZyanU8 shrink_threshold);
|
||||
|
||||
/**
|
||||
* @brief Initializes a new `ZyanVector` instance by duplicating an existing vector and
|
||||
* configures it to use a custom user defined buffer with a fixed size.
|
||||
* Initializes a new `ZyanVector` instance by duplicating an existing vector and
|
||||
* configures it to use a custom user defined buffer with a fixed size.
|
||||
*
|
||||
* @param destination A pointer to the (uninitialized) destination `ZyanVector` instance.
|
||||
* @param source A pointer to the source vector.
|
||||
|
@ -359,13 +358,13 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorDuplicateCustomBuffer(ZyanVector* destination
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns a constant pointer to the element at the given `index`.
|
||||
* Returns a constant pointer to the element at the given `index`.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The element index.
|
||||
*
|
||||
* @return A constant pointer to the desired element in the vector or `ZYAN_NULL`, if an error
|
||||
* occured.
|
||||
* occurred.
|
||||
*
|
||||
* Note that the returned pointer might get invalid when the vector is resized by either a manual
|
||||
* call to the memory-management functions or implicitly by inserting or removing elements.
|
||||
|
@ -376,13 +375,13 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorDuplicateCustomBuffer(ZyanVector* destination
|
|||
ZYCORE_EXPORT const void* ZyanVectorGet(const ZyanVector* vector, ZyanUSize index);
|
||||
|
||||
/**
|
||||
* @brief Returns a mutable pointer to the element at the given `index`.
|
||||
* Returns a mutable pointer to the element at the given `index`.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The element index.
|
||||
*
|
||||
* @return A mutable pointer to the desired element in the vector or `ZYAN_NULL`, if an error
|
||||
* occured.
|
||||
* occurred.
|
||||
*
|
||||
* Note that the returned pointer might get invalid when the vector is resized by either a manual
|
||||
* call to the memory-management functions or implicitly by inserting or removing elements.
|
||||
|
@ -393,7 +392,7 @@ ZYCORE_EXPORT const void* ZyanVectorGet(const ZyanVector* vector, ZyanUSize inde
|
|||
ZYCORE_EXPORT void* ZyanVectorGetMutable(const ZyanVector* vector, ZyanUSize index);
|
||||
|
||||
/**
|
||||
* @brief Returns a constant pointer to the element at the given `index`.
|
||||
* Returns a constant pointer to the element at the given `index`.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The element index.
|
||||
|
@ -408,7 +407,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorGetPointer(const ZyanVector* vector, ZyanUSiz
|
|||
const void** value);
|
||||
|
||||
/**
|
||||
* @brief Returns a mutable pointer to the element at the given `index`.
|
||||
* Returns a mutable pointer to the element at the given `index`.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The element index.
|
||||
|
@ -423,7 +422,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorGetPointerMutable(const ZyanVector* vector, Z
|
|||
void** value);
|
||||
|
||||
/**
|
||||
* @brief Assigns a new value to the element at the given `index`.
|
||||
* Assigns a new value to the element at the given `index`.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The value index.
|
||||
|
@ -439,7 +438,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorSet(ZyanVector* vector, ZyanUSize index,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Adds a new `element` to the end of the vector.
|
||||
* Adds a new `element` to the end of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element A pointer to the element to add.
|
||||
|
@ -449,7 +448,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorSet(ZyanVector* vector, ZyanUSize index,
|
|||
ZYCORE_EXPORT ZyanStatus ZyanVectorPushBack(ZyanVector* vector, const void* element);
|
||||
|
||||
/**
|
||||
* @brief Inserts an `element` at the given `index` of the vector.
|
||||
* Inserts an `element` at the given `index` of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The insert index.
|
||||
|
@ -461,7 +460,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorInsert(ZyanVector* vector, ZyanUSize index,
|
|||
const void* element);
|
||||
|
||||
/**
|
||||
* @brief Inserts multiple `elements` at the given `index` of the vector.
|
||||
* Inserts multiple `elements` at the given `index` of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The insert index.
|
||||
|
@ -474,7 +473,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorInsertRange(ZyanVector* vector, ZyanUSize ind
|
|||
const void* elements, ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Constructs an `element` in-place at the end of the vector.
|
||||
* Constructs an `element` in-place at the end of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element Receives a pointer to the new element.
|
||||
|
@ -487,7 +486,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorEmplace(ZyanVector* vector, void** element,
|
|||
ZyanMemberFunction constructor);
|
||||
|
||||
/**
|
||||
* @brief Constructs an `element` in-place and inserts it at the given `index` of the vector.
|
||||
* Constructs an `element` in-place and inserts it at the given `index` of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The insert index.
|
||||
|
@ -505,7 +504,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorEmplaceEx(ZyanVector* vector, ZyanUSize index
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Swaps the element at `index_first` with the element at `index_second`.
|
||||
* Swaps the element at `index_first` with the element at `index_second`.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index_first The index of the first element.
|
||||
|
@ -524,7 +523,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorSwapElements(ZyanVector* vector, ZyanUSize in
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Deletes the element at the given `index` of the vector.
|
||||
* Deletes the element at the given `index` of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The element index.
|
||||
|
@ -534,7 +533,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorSwapElements(ZyanVector* vector, ZyanUSize in
|
|||
ZYCORE_EXPORT ZyanStatus ZyanVectorDelete(ZyanVector* vector, ZyanUSize index);
|
||||
|
||||
/**
|
||||
* @brief Deletes multiple elements from the given vector, starting at `index`.
|
||||
* Deletes multiple elements from the given vector, starting at `index`.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param index The index of the first element to delete.
|
||||
|
@ -542,11 +541,11 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorDelete(ZyanVector* vector, ZyanUSize index);
|
|||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanVectorDeleteRange(ZyanVector* vector, ZyanUSize index,
|
||||
ZYCORE_EXPORT ZyanStatus ZyanVectorDeleteRange(ZyanVector* vector, ZyanUSize index,
|
||||
ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Removes the last element of the vector.
|
||||
* Removes the last element of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
*
|
||||
|
@ -555,7 +554,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorDeleteRange(ZyanVector* vector, ZyanUSize ind
|
|||
ZYCORE_EXPORT ZyanStatus ZyanVectorPopBack(ZyanVector* vector);
|
||||
|
||||
/**
|
||||
* @brief Erases all elements of the given vector.
|
||||
* Erases all elements of the given vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
*
|
||||
|
@ -568,7 +567,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorClear(ZyanVector* vector);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Sequentially searches for the first occurrence of `element` in the given vector.
|
||||
* Sequentially searches for the first occurrence of `element` in the given vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element A pointer to the element to search for.
|
||||
|
@ -576,7 +575,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorClear(ZyanVector* vector);
|
|||
* @param comparison The comparison function to use.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE` if the element was found, `ZYAN_STATUS_FALSE` if not or a generic
|
||||
* zyan status code if an error occured.
|
||||
* zyan status code if an error occurred.
|
||||
*
|
||||
* The `found_index` is set to `-1`, if the element was not found.
|
||||
*/
|
||||
|
@ -584,7 +583,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorFind(const ZyanVector* vector, const void* el
|
|||
ZyanISize* found_index, ZyanEqualityComparison comparison);
|
||||
|
||||
/**
|
||||
* @brief Sequentially searches for the first occurrence of `element` in the given vector.
|
||||
* Sequentially searches for the first occurrence of `element` in the given vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element A pointer to the element to search for.
|
||||
|
@ -594,7 +593,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorFind(const ZyanVector* vector, const void* el
|
|||
* @param count The maximum number of elements to iterate, beginning from the start `index`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE` if the element was found, `ZYAN_STATUS_FALSE` if not or a generic
|
||||
* zyan status code if an error occured.
|
||||
* zyan status code if an error occurred.
|
||||
*
|
||||
* The `found_index` is set to `-1`, if the element was not found.
|
||||
*/
|
||||
|
@ -602,8 +601,8 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorFindEx(const ZyanVector* vector, const void*
|
|||
ZyanISize* found_index, ZyanEqualityComparison comparison, ZyanUSize index, ZyanUSize count);
|
||||
|
||||
/**
|
||||
* @brief Searches for the first occurrence of `element` in the given vector using a binary-
|
||||
* search algorithm.
|
||||
* Searches for the first occurrence of `element` in the given vector using a binary-
|
||||
* search algorithm.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element A pointer to the element to search for.
|
||||
|
@ -611,7 +610,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorFindEx(const ZyanVector* vector, const void*
|
|||
* @param comparison The comparison function to use.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE` if the element was found, `ZYAN_STATUS_FALSE` if not or a generic
|
||||
* zyan status code if an error occured.
|
||||
* zyan status code if an error occurred.
|
||||
*
|
||||
* If found, `found_index` contains the zero-based index of `element`. If not found, `found_index`
|
||||
* contains the index of the first entry larger than `element`.
|
||||
|
@ -622,8 +621,8 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorBinarySearch(const ZyanVector* vector, const
|
|||
ZyanUSize* found_index, ZyanComparison comparison);
|
||||
|
||||
/**
|
||||
* @brief Searches for the first occurrence of `element` in the given vector using a binary-
|
||||
* search algorithm.
|
||||
* Searches for the first occurrence of `element` in the given vector using a binary-
|
||||
* search algorithm.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param element A pointer to the element to search for.
|
||||
|
@ -633,7 +632,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorBinarySearch(const ZyanVector* vector, const
|
|||
* @param count The maximum number of elements to iterate, beginning from the start `index`.
|
||||
*
|
||||
* @return `ZYAN_STATUS_TRUE` if the element was found, `ZYAN_STATUS_FALSE` if not or a generic
|
||||
* zyan status code if an error occured.
|
||||
* zyan status code if an error occurred.
|
||||
*
|
||||
* If found, `found_index` contains the zero-based index of `element`. If not found, `found_index`
|
||||
* contains the index of the first entry larger than `element`.
|
||||
|
@ -648,7 +647,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorBinarySearchEx(const ZyanVector* vector, cons
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Resizes the given `ZyanVector` instance.
|
||||
* Resizes the given `ZyanVector` instance.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param size The new size of the vector.
|
||||
|
@ -658,7 +657,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorBinarySearchEx(const ZyanVector* vector, cons
|
|||
ZYCORE_EXPORT ZyanStatus ZyanVectorResize(ZyanVector* vector, ZyanUSize size);
|
||||
|
||||
/**
|
||||
* @brief Resizes the given `ZyanVector` instance.
|
||||
* Resizes the given `ZyanVector` instance.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param size The new size of the vector.
|
||||
|
@ -666,11 +665,11 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorResize(ZyanVector* vector, ZyanUSize size);
|
|||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYCORE_EXPORT ZyanStatus ZyanVectorResizeEx(ZyanVector* vector, ZyanUSize size,
|
||||
ZYCORE_EXPORT ZyanStatus ZyanVectorResizeEx(ZyanVector* vector, ZyanUSize size,
|
||||
const void* initializer);
|
||||
|
||||
/**
|
||||
* @brief Changes the capacity of the given `ZyanVector` instance.
|
||||
* Changes the capacity of the given `ZyanVector` instance.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param capacity The new minimum capacity of the vector.
|
||||
|
@ -680,7 +679,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorResizeEx(ZyanVector* vector, ZyanUSize size,
|
|||
ZYCORE_EXPORT ZyanStatus ZyanVectorReserve(ZyanVector* vector, ZyanUSize capacity);
|
||||
|
||||
/**
|
||||
* @brief Shrinks the capacity of the given vector to match it's size.
|
||||
* Shrinks the capacity of the given vector to match it's size.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
*
|
||||
|
@ -693,7 +692,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorShrinkToFit(ZyanVector* vector);
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the current capacity of the vector.
|
||||
* Returns the current capacity of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param capacity Receives the size of the vector.
|
||||
|
@ -703,7 +702,7 @@ ZYCORE_EXPORT ZyanStatus ZyanVectorShrinkToFit(ZyanVector* vector);
|
|||
ZYCORE_EXPORT ZyanStatus ZyanVectorGetCapacity(const ZyanVector* vector, ZyanUSize* capacity);
|
||||
|
||||
/**
|
||||
* @brief Returns the current size of the vector.
|
||||
* Returns the current size of the vector.
|
||||
*
|
||||
* @param vector A pointer to the `ZyanVector` instance.
|
||||
* @param size Receives the size of the vector.
|
||||
|
|
|
@ -26,13 +26,12 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Master include file, including everything else.
|
||||
* Master include file, including everything else.
|
||||
*/
|
||||
|
||||
#ifndef ZYCORE_H
|
||||
#define ZYCORE_H
|
||||
|
||||
#include "zydis/ZycoreExportConfig.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
|
||||
// TODO:
|
||||
|
@ -50,37 +49,37 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief A macro that defines the zycore version.
|
||||
* A macro that defines the zycore version.
|
||||
*/
|
||||
#define ZYCORE_VERSION (ZyanU64)0x0001000000000000
|
||||
#define ZYCORE_VERSION (ZyanU64)0x0001000100000000
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Helper macros */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Extracts the major-part of the zycore version.
|
||||
* Extracts the major-part of the zycore version.
|
||||
*
|
||||
* @param version The zycore version value
|
||||
*/
|
||||
#define ZYCORE_VERSION_MAJOR(version) (ZyanU16)((version & 0xFFFF000000000000) >> 48)
|
||||
|
||||
/**
|
||||
* @brief Extracts the minor-part of the zycore version.
|
||||
* Extracts the minor-part of the zycore version.
|
||||
*
|
||||
* @param version The zycore version value
|
||||
*/
|
||||
#define ZYCORE_VERSION_MINOR(version) (ZyanU16)((version & 0x0000FFFF00000000) >> 32)
|
||||
|
||||
/**
|
||||
* @brief Extracts the patch-part of the zycore version.
|
||||
* Extracts the patch-part of the zycore version.
|
||||
*
|
||||
* @param version The zycore version value
|
||||
*/
|
||||
#define ZYCORE_VERSION_PATCH(version) (ZyanU16)((version & 0x00000000FFFF0000) >> 16)
|
||||
|
||||
/**
|
||||
* @brief Extracts the build-part of the zycore version.
|
||||
* Extracts the build-part of the zycore version.
|
||||
*
|
||||
* @param version The zycore version value
|
||||
*/
|
||||
|
@ -93,7 +92,7 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Returns the zycore version.
|
||||
* Returns the zycore version.
|
||||
*
|
||||
* @return The zycore version.
|
||||
*
|
||||
|
|
|
@ -32,13 +32,13 @@
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Writes a terminating '\0' character at the end of the string data.
|
||||
* Writes a terminating '\0' character at the end of the string data.
|
||||
*/
|
||||
#define ZYCORE_STRING_NULLTERMINATE(string) \
|
||||
*(char*)((ZyanU8*)(string)->vector.data + (string)->vector.size - 1) = '\0';
|
||||
|
||||
/**
|
||||
* @brief Checks for a terminating '\0' character at the end of the string data.
|
||||
* Checks for a terminating '\0' character at the end of the string data.
|
||||
*/
|
||||
#define ZYCORE_STRING_ASSERT_NULLTERMINATION(string) \
|
||||
ZYAN_ASSERT(*(char*)((ZyanU8*)(string)->vector.data + (string)->vector.size - 1) == '\0');
|
||||
|
@ -62,7 +62,7 @@ ZyanStatus ZyanStringInit(ZyanString* string, ZyanUSize capacity)
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
ZyanStatus ZyanStringInitEx(ZyanString* string, ZyanUSize capacity, ZyanAllocator* allocator,
|
||||
float growth_factor, float shrink_threshold)
|
||||
ZyanU8 growth_factor, ZyanU8 shrink_threshold)
|
||||
{
|
||||
if (!string)
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ ZyanStatus ZyanStringInitCustomBuffer(ZyanString* string, char* buffer, ZyanUSiz
|
|||
}
|
||||
|
||||
string->flags = ZYAN_STRING_HAS_FIXED_CAPACITY;
|
||||
ZYAN_CHECK(ZyanVectorInitCustomBuffer(&string->vector, sizeof(char), (void*)buffer, capacity,
|
||||
ZYAN_CHECK(ZyanVectorInitCustomBuffer(&string->vector, sizeof(char), (void*)buffer, capacity,
|
||||
ZYAN_NULL));
|
||||
ZYAN_ASSERT(string->vector.capacity == capacity);
|
||||
// Some of the string code relies on `sizeof(char) == 1`
|
||||
|
@ -133,7 +133,7 @@ ZyanStatus ZyanStringDuplicate(ZyanString* destination, const ZyanStringView* so
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
ZyanStatus ZyanStringDuplicateEx(ZyanString* destination, const ZyanStringView* source,
|
||||
ZyanUSize capacity, ZyanAllocator* allocator, float growth_factor, float shrink_threshold)
|
||||
ZyanUSize capacity, ZyanAllocator* allocator, ZyanU8 growth_factor, ZyanU8 shrink_threshold)
|
||||
{
|
||||
if (!source || !source->string.vector.size)
|
||||
{
|
||||
|
@ -194,8 +194,8 @@ ZyanStatus ZyanStringConcat(ZyanString* destination, const ZyanStringView* s1,
|
|||
#endif // ZYAN_NO_LIBC
|
||||
|
||||
ZyanStatus ZyanStringConcatEx(ZyanString* destination, const ZyanStringView* s1,
|
||||
const ZyanStringView* s2, ZyanUSize capacity, ZyanAllocator* allocator, float growth_factor,
|
||||
float shrink_threshold)
|
||||
const ZyanStringView* s2, ZyanUSize capacity, ZyanAllocator* allocator, ZyanU8 growth_factor,
|
||||
ZyanU8 shrink_threshold)
|
||||
{
|
||||
if (!s1 || !s2 || !s1->string.vector.size || !s2->string.vector.size)
|
||||
{
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Functions for decoding instructions.
|
||||
* Functions for decoding instructions.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_DECODER_H
|
||||
|
@ -50,12 +50,12 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisDecoderMode` enum.
|
||||
* Defines the `ZydisDecoderMode` enum.
|
||||
*/
|
||||
typedef enum ZydisDecoderMode_
|
||||
{
|
||||
/**
|
||||
* @brief Enables minimal instruction decoding without semantic analysis.
|
||||
* Enables minimal instruction decoding without semantic analysis.
|
||||
*
|
||||
* This mode provides access to the mnemonic, the instruction-length, the effective
|
||||
* operand-size, the effective address-width, some attributes (e.g. `ZYDIS_ATTRIB_IS_RELATIVE`)
|
||||
|
@ -68,7 +68,7 @@ typedef enum ZydisDecoderMode_
|
|||
*/
|
||||
ZYDIS_DECODER_MODE_MINIMAL,
|
||||
/**
|
||||
* @brief Enables the `AMD`-branch mode.
|
||||
* Enables the `AMD`-branch mode.
|
||||
*
|
||||
* Intel ignores the operand-size override-prefix (`0x66`) for all branches with 32-bit
|
||||
* immediates and forces the operand-size of the instruction to 64-bit in 64-bit mode.
|
||||
|
@ -79,7 +79,7 @@ typedef enum ZydisDecoderMode_
|
|||
*/
|
||||
ZYDIS_DECODER_MODE_AMD_BRANCHES,
|
||||
/**
|
||||
* @brief Enables `KNC` compatibility-mode.
|
||||
* Enables `KNC` compatibility-mode.
|
||||
*
|
||||
* `KNC` and `KNL+` chips are sharing opcodes and encodings for some mask-related instructions.
|
||||
* Enable this mode to use the old `KNC` specifications (different mnemonics, operands, ..).
|
||||
|
@ -88,7 +88,7 @@ typedef enum ZydisDecoderMode_
|
|||
*/
|
||||
ZYDIS_DECODER_MODE_KNC,
|
||||
/**
|
||||
* @brief Enables the `MPX` mode.
|
||||
* Enables the `MPX` mode.
|
||||
*
|
||||
* The `MPX` isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||
*
|
||||
|
@ -96,7 +96,7 @@ typedef enum ZydisDecoderMode_
|
|||
*/
|
||||
ZYDIS_DECODER_MODE_MPX,
|
||||
/**
|
||||
* @brief Enables the `CET` mode.
|
||||
* Enables the `CET` mode.
|
||||
*
|
||||
* The `CET` isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||
*
|
||||
|
@ -104,7 +104,7 @@ typedef enum ZydisDecoderMode_
|
|||
*/
|
||||
ZYDIS_DECODER_MODE_CET,
|
||||
/**
|
||||
* @brief Enables the `LZCNT` mode.
|
||||
* Enables the `LZCNT` mode.
|
||||
*
|
||||
* The `LZCNT` isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||
*
|
||||
|
@ -112,7 +112,7 @@ typedef enum ZydisDecoderMode_
|
|||
*/
|
||||
ZYDIS_DECODER_MODE_LZCNT,
|
||||
/**
|
||||
* @brief Enables the `TZCNT` mode.
|
||||
* Enables the `TZCNT` mode.
|
||||
*
|
||||
* The `TZCNT` isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||
*
|
||||
|
@ -120,7 +120,7 @@ typedef enum ZydisDecoderMode_
|
|||
*/
|
||||
ZYDIS_DECODER_MODE_TZCNT,
|
||||
/**
|
||||
* @brief Enables the `WBNOINVD` mode.
|
||||
* Enables the `WBNOINVD` mode.
|
||||
*
|
||||
* The `WBINVD` instruction is interpreted as `WBNOINVD` on ICL chips, if a `F3` prefix is
|
||||
* used.
|
||||
|
@ -129,7 +129,7 @@ typedef enum ZydisDecoderMode_
|
|||
*/
|
||||
ZYDIS_DECODER_MODE_WBNOINVD,
|
||||
/**
|
||||
* @brief Enables the `CLDEMOTE` mode.
|
||||
* Enables the `CLDEMOTE` mode.
|
||||
*
|
||||
* The `CLDEMOTE` isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||
*
|
||||
|
@ -138,11 +138,11 @@ typedef enum ZydisDecoderMode_
|
|||
ZYDIS_DECODER_MODE_CLDEMOTE,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_DECODER_MODE_MAX_VALUE = ZYDIS_DECODER_MODE_CLDEMOTE,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_DECODER_MODE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_DECODER_MODE_MAX_VALUE)
|
||||
} ZydisDecoderMode;
|
||||
|
@ -152,7 +152,7 @@ typedef enum ZydisDecoderMode_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisDecoder` struct.
|
||||
* Defines the `ZydisDecoder` struct.
|
||||
*
|
||||
* All fields in this struct should be considered as "private". Any changes may lead to unexpected
|
||||
* behavior.
|
||||
|
@ -160,15 +160,15 @@ typedef enum ZydisDecoderMode_
|
|||
typedef struct ZydisDecoder_
|
||||
{
|
||||
/**
|
||||
* @brief The machine mode.
|
||||
* The machine mode.
|
||||
*/
|
||||
ZydisMachineMode machine_mode;
|
||||
/**
|
||||
* @brief The address width.
|
||||
* The address width.
|
||||
*/
|
||||
ZydisAddressWidth address_width;
|
||||
/**
|
||||
* @brief The decoder mode array.
|
||||
* The decoder mode array.
|
||||
*/
|
||||
ZyanBool decoder_mode[ZYDIS_DECODER_MODE_MAX_VALUE + 1];
|
||||
} ZydisDecoder;
|
||||
|
@ -181,12 +181,12 @@ typedef struct ZydisDecoder_
|
|||
|
||||
/**
|
||||
* @addtogroup decoder Decoder
|
||||
* @brief Functions allowing decoding of instruction bytes to a machine interpretable struct.
|
||||
* Functions allowing decoding of instruction bytes to a machine interpretable struct.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZydisDecoder` instance.
|
||||
* Initializes the given `ZydisDecoder` instance.
|
||||
*
|
||||
* @param decoder A pointer to the `ZydisDecoder` instance.
|
||||
* @param machine_mode The machine mode.
|
||||
|
@ -198,7 +198,7 @@ ZYDIS_EXPORT ZyanStatus ZydisDecoderInit(ZydisDecoder* decoder, ZydisMachineMode
|
|||
ZydisAddressWidth address_width);
|
||||
|
||||
/**
|
||||
* @brief Enables or disables the specified decoder-mode.
|
||||
* Enables or disables the specified decoder-mode.
|
||||
*
|
||||
* @param decoder A pointer to the `ZydisDecoder` instance.
|
||||
* @param mode The decoder mode.
|
||||
|
@ -210,11 +210,14 @@ ZYDIS_EXPORT ZyanStatus ZydisDecoderEnableMode(ZydisDecoder* decoder, ZydisDecod
|
|||
ZyanBool enabled);
|
||||
|
||||
/**
|
||||
* @brief Decodes the instruction in the given input `buffer`.
|
||||
* Decodes the instruction in the given input `buffer`.
|
||||
*
|
||||
* @param decoder A pointer to the `ZydisDecoder` instance.
|
||||
* @param buffer A pointer to the input buffer.
|
||||
* @param length The length of the input buffer.
|
||||
* @param length The length of the input buffer. Note that this can be bigger than the
|
||||
* actual size of the instruction -- you don't have to know the size up
|
||||
* front. This length is merely used to prevent Zydis from doing
|
||||
* out-of-bounds reads on your buffer.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct, that receives the
|
||||
* details about the decoded instruction.
|
||||
*
|
||||
|
|
|
@ -63,11 +63,7 @@
|
|||
/* Decoder tree */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
const ZydisDecoderTreeNode* ZydisDecoderTreeGetRootNode(void)
|
||||
{
|
||||
static const ZydisDecoderTreeNode root = { ZYDIS_NODETYPE_FILTER_OPCODE, 0x0000 };
|
||||
return &root;
|
||||
}
|
||||
const ZydisDecoderTreeNode zydis_decoder_tree_root = { ZYDIS_NODETYPE_FILTER_OPCODE, 0x0000 };
|
||||
|
||||
const ZydisDecoderTreeNode* ZydisDecoderTreeGetChildNode(const ZydisDecoderTreeNode* parent,
|
||||
ZyanU16 index)
|
||||
|
@ -81,7 +77,7 @@ const ZydisDecoderTreeNode* ZydisDecoderTreeGetChildNode(const ZydisDecoderTreeN
|
|||
ZYAN_ASSERT(index < 17);
|
||||
return &FILTERS_VEX[parent->value][index];
|
||||
case ZYDIS_NODETYPE_FILTER_EMVEX:
|
||||
ZYAN_ASSERT(index < 33);
|
||||
ZYAN_ASSERT(index < 49);
|
||||
return &FILTERS_EMVEX[parent->value][index];
|
||||
case ZYDIS_NODETYPE_FILTER_OPCODE:
|
||||
ZYAN_ASSERT(index < 256);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -62,13 +62,30 @@ void ZydisFormatterBufferInit(ZydisFormatterBuffer* buffer, char* user_buffer,
|
|||
ZYAN_ASSERT(user_buffer);
|
||||
ZYAN_ASSERT(length);
|
||||
|
||||
buffer->is_token_list = ZYAN_FALSE;
|
||||
buffer->string.flags = ZYAN_STRING_HAS_FIXED_CAPACITY;
|
||||
buffer->string.vector.allocator = ZYAN_NULL;
|
||||
buffer->string.vector.element_size = sizeof(char);
|
||||
buffer->string.vector.size = 1;
|
||||
buffer->string.vector.capacity = length;
|
||||
buffer->string.vector.data = user_buffer;
|
||||
buffer->is_token_list = ZYAN_FALSE;
|
||||
buffer->capacity = 0;
|
||||
buffer->string.flags = ZYAN_STRING_HAS_FIXED_CAPACITY;
|
||||
buffer->string.vector.allocator = ZYAN_NULL;
|
||||
#if defined(ZYAN_NO_LIBC) // no-libc correlates quite well with kernel environments
|
||||
// We can't use floats in kernel. Initialize them via memcpy hack.
|
||||
// Note: this is only required in the backported version for Zydis v3.0.
|
||||
// Newer version depend on a version of zycore that got rid of the floats.
|
||||
|
||||
ZYAN_STATIC_ASSERT(sizeof(buffer->string.vector.growth_factor) == 4);
|
||||
ZYAN_STATIC_ASSERT(sizeof(buffer->string.vector.shrink_threshold) == 4);
|
||||
|
||||
ZYAN_MEMCPY(&buffer->string.vector.growth_factor, "\x00\x00\x80\x3F", 4);
|
||||
ZYAN_MEMCPY(&buffer->string.vector.shrink_threshold, "\x00\x00\x00\x00", 4);
|
||||
#else
|
||||
buffer->string.vector.growth_factor = 1.0f;
|
||||
buffer->string.vector.shrink_threshold = 0.0f;
|
||||
#endif
|
||||
buffer->string.vector.destructor = ZYAN_NULL;
|
||||
buffer->string.vector.element_size = sizeof(char);
|
||||
buffer->string.vector.size = 1;
|
||||
buffer->string.vector.capacity = length;
|
||||
buffer->string.vector.data = user_buffer;
|
||||
|
||||
*user_buffer = '\0';
|
||||
}
|
||||
|
||||
|
@ -87,14 +104,30 @@ void ZydisFormatterBufferInitTokenized(ZydisFormatterBuffer* buffer,
|
|||
user_buffer = (ZyanU8*)user_buffer + sizeof(ZydisFormatterToken);
|
||||
length -= sizeof(ZydisFormatterToken);
|
||||
|
||||
buffer->is_token_list = ZYAN_TRUE;
|
||||
buffer->capacity = length;
|
||||
buffer->string.flags = ZYAN_STRING_HAS_FIXED_CAPACITY;
|
||||
buffer->string.vector.allocator = ZYAN_NULL;
|
||||
buffer->string.vector.element_size = sizeof(char);
|
||||
buffer->string.vector.size = 1;
|
||||
buffer->string.vector.capacity = length;
|
||||
buffer->string.vector.data = user_buffer;
|
||||
buffer->is_token_list = ZYAN_TRUE;
|
||||
buffer->capacity = length;
|
||||
buffer->string.flags = ZYAN_STRING_HAS_FIXED_CAPACITY;
|
||||
buffer->string.vector.allocator = ZYAN_NULL;
|
||||
#if defined(ZYAN_NO_LIBC) // no-libc correlates quite well with kernel environments
|
||||
// We can't use floats in kernel. Initialize them via memcpy hack.
|
||||
// Note: this is only required in the backported version for Zydis v3.0.
|
||||
// Newer version depend on a version of zycore that got rid of the floats.
|
||||
|
||||
ZYAN_STATIC_ASSERT(sizeof(buffer->string.vector.growth_factor) == 4);
|
||||
ZYAN_STATIC_ASSERT(sizeof(buffer->string.vector.shrink_threshold) == 4);
|
||||
|
||||
ZYAN_MEMCPY(&buffer->string.vector.growth_factor, "\x00\x00\x80\x3F", 4);
|
||||
ZYAN_MEMCPY(&buffer->string.vector.shrink_threshold, "\x00\x00\x00\x00", 4);
|
||||
#else
|
||||
buffer->string.vector.growth_factor = 1.0f;
|
||||
buffer->string.vector.shrink_threshold = 0.0f;
|
||||
#endif
|
||||
buffer->string.vector.destructor = ZYAN_NULL;
|
||||
buffer->string.vector.element_size = sizeof(char);
|
||||
buffer->string.vector.size = 1;
|
||||
buffer->string.vector.capacity = length;
|
||||
buffer->string.vector.data = user_buffer;
|
||||
|
||||
*(char*)user_buffer = '\0';
|
||||
}
|
||||
|
||||
|
@ -110,7 +143,7 @@ void ZydisFormatterBufferInitTokenized(ZydisFormatterBuffer* buffer,
|
|||
|
||||
ZyanStatus ZydisFormatterInit(ZydisFormatter* formatter, ZydisFormatterStyle style)
|
||||
{
|
||||
if (!formatter || (style > ZYDIS_FORMATTER_STYLE_MAX_VALUE))
|
||||
if (!formatter || ((ZyanUSize)style > ZYDIS_FORMATTER_STYLE_MAX_VALUE))
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
@ -147,6 +180,11 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
formatter->force_memory_segment = (value) ? ZYAN_TRUE : ZYAN_FALSE;
|
||||
break;
|
||||
}
|
||||
case ZYDIS_FORMATTER_PROP_FORCE_SCALE_ONE:
|
||||
{
|
||||
formatter->force_memory_scale = (value) ? ZYAN_TRUE : ZYAN_FALSE;
|
||||
break;
|
||||
}
|
||||
case ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_BRANCHES:
|
||||
{
|
||||
formatter->force_relative_branches = (value) ? ZYAN_TRUE : ZYAN_FALSE;
|
||||
|
@ -169,7 +207,7 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
}
|
||||
case ZYDIS_FORMATTER_PROP_ADDR_BASE:
|
||||
{
|
||||
if ((ZydisNumericBase)value > ZYDIS_NUMERIC_BASE_MAX_VALUE)
|
||||
if (value > ZYDIS_NUMERIC_BASE_MAX_VALUE)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
@ -178,7 +216,7 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
}
|
||||
case ZYDIS_FORMATTER_PROP_ADDR_SIGNEDNESS:
|
||||
{
|
||||
if ((ZydisSignedness)value > ZYDIS_SIGNEDNESS_MAX_VALUE)
|
||||
if (value > ZYDIS_SIGNEDNESS_MAX_VALUE)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
@ -187,17 +225,27 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
}
|
||||
case ZYDIS_FORMATTER_PROP_ADDR_PADDING_ABSOLUTE:
|
||||
{
|
||||
if (((ZydisPadding)value != ZYDIS_PADDING_AUTO) &&
|
||||
(value > 0xFF))
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
formatter->addr_padding_absolute = (ZydisPadding)value;
|
||||
break;
|
||||
}
|
||||
case ZYDIS_FORMATTER_PROP_ADDR_PADDING_RELATIVE:
|
||||
{
|
||||
if (((ZydisPadding)value != ZYDIS_PADDING_AUTO) &&
|
||||
(value > 0xFF))
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
formatter->addr_padding_relative = (ZydisPadding)value;
|
||||
break;
|
||||
}
|
||||
case ZYDIS_FORMATTER_PROP_DISP_BASE:
|
||||
{
|
||||
if ((ZydisNumericBase)value > ZYDIS_NUMERIC_BASE_MAX_VALUE)
|
||||
if (value > ZYDIS_NUMERIC_BASE_MAX_VALUE)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
@ -206,7 +254,7 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
}
|
||||
case ZYDIS_FORMATTER_PROP_DISP_SIGNEDNESS:
|
||||
{
|
||||
if ((ZydisSignedness)value > ZYDIS_SIGNEDNESS_MAX_VALUE)
|
||||
if (value > ZYDIS_SIGNEDNESS_MAX_VALUE)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
@ -217,18 +265,22 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
{
|
||||
if ((ZydisPadding)value == ZYDIS_PADDING_AUTO)
|
||||
{
|
||||
if (formatter->style > ZYDIS_FORMATTER_STYLE_MAX_VALUE)
|
||||
if ((ZyanUSize)formatter->style > ZYDIS_FORMATTER_STYLE_MAX_VALUE)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
formatter->disp_padding = FORMATTER_PRESETS[formatter->style]->disp_padding;
|
||||
}
|
||||
else if (value > 0xFF)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
formatter->disp_padding = (ZydisPadding)value;
|
||||
break;
|
||||
}
|
||||
case ZYDIS_FORMATTER_PROP_IMM_BASE:
|
||||
{
|
||||
if ((ZydisNumericBase)value > ZYDIS_NUMERIC_BASE_MAX_VALUE)
|
||||
if (value > ZYDIS_NUMERIC_BASE_MAX_VALUE)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
@ -237,7 +289,7 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
}
|
||||
case ZYDIS_FORMATTER_PROP_IMM_SIGNEDNESS:
|
||||
{
|
||||
if ((ZydisSignedness)value > ZYDIS_SIGNEDNESS_MAX_VALUE)
|
||||
if (value > ZYDIS_SIGNEDNESS_MAX_VALUE)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
@ -248,12 +300,16 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
{
|
||||
if ((ZydisPadding)value == ZYDIS_PADDING_AUTO)
|
||||
{
|
||||
if (formatter->style > ZYDIS_FORMATTER_STYLE_MAX_VALUE)
|
||||
if ((ZyanUSize)formatter->style > ZYDIS_FORMATTER_STYLE_MAX_VALUE)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
formatter->imm_padding = FORMATTER_PRESETS[formatter->style]->imm_padding;
|
||||
}
|
||||
else if (value > 0xFF)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
formatter->imm_padding = (ZydisPadding)value;
|
||||
break;
|
||||
}
|
||||
|
@ -344,7 +400,7 @@ ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter, ZydisFormatterPr
|
|||
ZyanStatus ZydisFormatterSetHook(ZydisFormatter* formatter, ZydisFormatterFunction type,
|
||||
const void** callback)
|
||||
{
|
||||
if (!formatter || !callback || (type > ZYDIS_FORMATTER_FUNC_MAX_VALUE))
|
||||
if (!formatter || !callback || ((ZyanUSize)type > ZYDIS_FORMATTER_FUNC_MAX_VALUE))
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Functions for formatting instructions to human-readable text.
|
||||
* Functions for formatting instructions to human-readable text.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_FORMATTER_H
|
||||
|
@ -47,9 +47,8 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Use this constant as value for `runtime_address` in `ZydisFormatterFormatInstruction`/
|
||||
* `ZydisFormatterFormatInstructionEx` or `ZydisFormatterFormatOperand`/
|
||||
* `ZydisFormatterFormatOperandEx` to print relative values for all addresses.
|
||||
* Use this constant as value for `runtime_address` in `ZydisFormatterFormatInstruction(Ex)`
|
||||
* or `ZydisFormatterFormatOperand(Ex)` to print relative values for all addresses.
|
||||
*/
|
||||
#define ZYDIS_RUNTIME_ADDRESS_NONE (ZyanU64)(-1)
|
||||
|
||||
|
@ -62,32 +61,32 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterStyle` enum.
|
||||
* Defines the `ZydisFormatterStyle` enum.
|
||||
*/
|
||||
typedef enum ZydisFormatterStyle_
|
||||
{
|
||||
/**
|
||||
* @brief Generates `AT&T`-style disassembly.
|
||||
* Generates `AT&T`-style disassembly.
|
||||
*/
|
||||
ZYDIS_FORMATTER_STYLE_ATT,
|
||||
/**
|
||||
* @brief Generates `Intel`-style disassembly.
|
||||
* Generates `Intel`-style disassembly.
|
||||
*/
|
||||
ZYDIS_FORMATTER_STYLE_INTEL,
|
||||
/**
|
||||
* @brief Generates `MASM`-style disassembly that is directly accepted as input for the
|
||||
* `MASM` assembler.
|
||||
* Generates `MASM`-style disassembly that is directly accepted as input for
|
||||
* the `MASM` assembler.
|
||||
*
|
||||
* The runtime-address is ignored in this mode.
|
||||
*/
|
||||
ZYDIS_FORMATTER_STYLE_INTEL_MASM,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_FORMATTER_STYLE_MAX_VALUE = ZYDIS_FORMATTER_STYLE_INTEL_MASM,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_FORMATTER_STYLE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_FORMATTER_STYLE_MAX_VALUE)
|
||||
} ZydisFormatterStyle;
|
||||
|
@ -97,7 +96,7 @@ typedef enum ZydisFormatterStyle_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterProperty` enum.
|
||||
* Defines the `ZydisFormatterProperty` enum.
|
||||
*/
|
||||
typedef enum ZydisFormatterProperty_
|
||||
{
|
||||
|
@ -106,22 +105,29 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Controls the printing of effective operand-size suffixes (`AT&T`) or operand-sizes
|
||||
* of memory operands (`INTEL`).
|
||||
* Controls the printing of effective operand-size suffixes (`AT&T`) or operand-sizes
|
||||
* of memory operands (`INTEL`).
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to force the formatter to always print the size, or `ZYAN_FALSE`
|
||||
* to only print it if needed.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_FORCE_SIZE,
|
||||
/**
|
||||
* @brief Controls the printing of segment prefixes.
|
||||
* Controls the printing of segment prefixes.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to force the formatter to always print the segment register of
|
||||
* memory-operands or `ZYAN_FALSE` to omit implicit `DS`/`SS` segments.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_FORCE_SEGMENT,
|
||||
/**
|
||||
* @brief Controls the printing of branch addresses.
|
||||
* Controls the printing of the scale-factor component for memory operands.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to force the formatter to always print the scale-factor component
|
||||
* of memory operands or `ZYAN_FALSE` to omit the scale factor for values of `1`.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_FORCE_SCALE_ONE,
|
||||
/**
|
||||
* Controls the printing of branch addresses.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to force the formatter to always print relative branch addresses
|
||||
* or `ZYAN_FALSE` to use absolute addresses, if a runtime-address different to
|
||||
|
@ -129,7 +135,7 @@ typedef enum ZydisFormatterProperty_
|
|||
*/
|
||||
ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_BRANCHES,
|
||||
/**
|
||||
* @brief Controls the printing of `EIP`/`RIP`-relative addresses.
|
||||
* Controls the printing of `EIP`/`RIP`-relative addresses.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to force the formatter to always print relative addresses for
|
||||
* `EIP`/`RIP`-relative operands or `ZYAN_FALSE` to use absolute addresses, if a runtime-
|
||||
|
@ -137,7 +143,7 @@ typedef enum ZydisFormatterProperty_
|
|||
*/
|
||||
ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_RIPREL,
|
||||
/**
|
||||
* @brief Controls the printing of branch-instructions sizes.
|
||||
* Controls the printing of branch-instructions sizes.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to print the size (`short`, `near`) of branch
|
||||
* instructions or `ZYAN_FALSE` to hide it.
|
||||
|
@ -147,7 +153,7 @@ typedef enum ZydisFormatterProperty_
|
|||
ZYDIS_FORMATTER_PROP_PRINT_BRANCH_SIZE,
|
||||
|
||||
/**
|
||||
* @brief Controls the printing of instruction prefixes.
|
||||
* Controls the printing of instruction prefixes.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to print all instruction-prefixes (even ignored or duplicate
|
||||
* ones) or `ZYAN_FALSE` to only print prefixes that are effectively used by the instruction.
|
||||
|
@ -159,16 +165,16 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Controls the base of address values.
|
||||
* Controls the base of address values.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_ADDR_BASE,
|
||||
/**
|
||||
* @brief Controls the signedness of relative addresses. Absolute addresses are always
|
||||
* unsigned.
|
||||
* Controls the signedness of relative addresses. Absolute addresses are
|
||||
* always unsigned.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_ADDR_SIGNEDNESS,
|
||||
/**
|
||||
* @brief Controls the padding of absolute address values.
|
||||
* Controls the padding of absolute address values.
|
||||
*
|
||||
* Pass `ZYDIS_PADDING_DISABLED` to disable padding, `ZYDIS_PADDING_AUTO` to padd all
|
||||
* addresses to the current stack width (hexadecimal only), or any other integer value for
|
||||
|
@ -176,7 +182,7 @@ typedef enum ZydisFormatterProperty_
|
|||
*/
|
||||
ZYDIS_FORMATTER_PROP_ADDR_PADDING_ABSOLUTE,
|
||||
/**
|
||||
* @brief Controls the padding of relative address values.
|
||||
* Controls the padding of relative address values.
|
||||
*
|
||||
* Pass `ZYDIS_PADDING_DISABLED` to disable padding, `ZYDIS_PADDING_AUTO` to padd all
|
||||
* addresses to the current stack width (hexadecimal only), or any other integer value for
|
||||
|
@ -187,15 +193,15 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Controls the base of displacement values.
|
||||
* Controls the base of displacement values.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_DISP_BASE,
|
||||
/**
|
||||
* @brief Controls the signedness of displacement values.
|
||||
* Controls the signedness of displacement values.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_DISP_SIGNEDNESS,
|
||||
/**
|
||||
* @brief Controls the padding of displacement values.
|
||||
* Controls the padding of displacement values.
|
||||
*
|
||||
* Pass `ZYDIS_PADDING_DISABLED` to disable padding, or any other integer value for custom
|
||||
* padding.
|
||||
|
@ -205,18 +211,18 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Controls the base of immediate values.
|
||||
* Controls the base of immediate values.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_IMM_BASE,
|
||||
/**
|
||||
* @brief Controls the signedness of immediate values.
|
||||
* Controls the signedness of immediate values.
|
||||
*
|
||||
* Pass `ZYDIS_SIGNEDNESS_AUTO` to automatically choose the most suitable mode based on the
|
||||
* operands `ZydisDecodedOperand.imm.is_signed` attribute.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_IMM_SIGNEDNESS,
|
||||
/**
|
||||
* @brief Controls the padding of immediate values.
|
||||
* Controls the padding of immediate values.
|
||||
*
|
||||
* Pass `ZYDIS_PADDING_DISABLED` to disable padding, `ZYDIS_PADDING_AUTO` to padd all
|
||||
* immediates to the operand-width (hexadecimal only), or any other integer value for custom
|
||||
|
@ -229,31 +235,31 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Controls the letter-case for prefixes.
|
||||
* Controls the letter-case for prefixes.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to format in uppercase or `ZYAN_FALSE` to format in lowercase.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_UPPERCASE_PREFIXES,
|
||||
/**
|
||||
* @brief Controls the letter-case for the mnemonic.
|
||||
* Controls the letter-case for the mnemonic.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to format in uppercase or `ZYAN_FALSE` to format in lowercase.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_UPPERCASE_MNEMONIC,
|
||||
/**
|
||||
* @brief Controls the letter-case for registers.
|
||||
* Controls the letter-case for registers.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to format in uppercase or `ZYAN_FALSE` to format in lowercase.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_UPPERCASE_REGISTERS,
|
||||
/**
|
||||
* @brief Controls the letter-case for typecasts.
|
||||
* Controls the letter-case for typecasts.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to format in uppercase or `ZYAN_FALSE` to format in lowercase.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_UPPERCASE_TYPECASTS,
|
||||
/**
|
||||
* @brief Controls the letter-case for decorators.
|
||||
* Controls the letter-case for decorators.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to format in uppercase or `ZYAN_FALSE` to format in lowercase.
|
||||
*/
|
||||
|
@ -264,7 +270,7 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Controls the prefix for decimal values.
|
||||
* Controls the prefix for decimal values.
|
||||
*
|
||||
* Pass a pointer to a null-terminated C-style string with a maximum length of 10 characters
|
||||
* to set a custom prefix, or `ZYAN_NULL` to disable it.
|
||||
|
@ -273,7 +279,7 @@ typedef enum ZydisFormatterProperty_
|
|||
*/
|
||||
ZYDIS_FORMATTER_PROP_DEC_PREFIX,
|
||||
/**
|
||||
* @brief Controls the suffix for decimal values.
|
||||
* Controls the suffix for decimal values.
|
||||
*
|
||||
* Pass a pointer to a null-terminated C-style string with a maximum length of 10 characters
|
||||
* to set a custom suffix, or `ZYAN_NULL` to disable it.
|
||||
|
@ -285,7 +291,7 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Controls the letter-case of hexadecimal values.
|
||||
* Controls the letter-case of hexadecimal values.
|
||||
*
|
||||
* Pass `ZYAN_TRUE` as value to format in uppercase and `ZYAN_FALSE` to format in lowercase.
|
||||
*
|
||||
|
@ -293,7 +299,7 @@ typedef enum ZydisFormatterProperty_
|
|||
*/
|
||||
ZYDIS_FORMATTER_PROP_HEX_UPPERCASE,
|
||||
/**
|
||||
* @brief Controls the prefix for hexadecimal values.
|
||||
* Controls the prefix for hexadecimal values.
|
||||
*
|
||||
* Pass a pointer to a null-terminated C-style string with a maximum length of 10 characters
|
||||
* to set a custom prefix, or `ZYAN_NULL` to disable it.
|
||||
|
@ -302,7 +308,7 @@ typedef enum ZydisFormatterProperty_
|
|||
*/
|
||||
ZYDIS_FORMATTER_PROP_HEX_PREFIX,
|
||||
/**
|
||||
* @brief Controls the suffix for hexadecimal values.
|
||||
* Controls the suffix for hexadecimal values.
|
||||
*
|
||||
* Pass a pointer to a null-terminated C-style string with a maximum length of 10 characters
|
||||
* to set a custom suffix, or `ZYAN_NULL` to disable it.
|
||||
|
@ -314,11 +320,11 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_MAX_VALUE = ZYDIS_FORMATTER_PROP_HEX_SUFFIX,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_FORMATTER_PROP_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_FORMATTER_PROP_MAX_VALUE)
|
||||
} ZydisFormatterProperty;
|
||||
|
@ -326,25 +332,25 @@ typedef enum ZydisFormatterProperty_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisNumericBase` enum.
|
||||
* Defines the `ZydisNumericBase` enum.
|
||||
*/
|
||||
typedef enum ZydisNumericBase_
|
||||
{
|
||||
/**
|
||||
* @brief Decimal system.
|
||||
* Decimal system.
|
||||
*/
|
||||
ZYDIS_NUMERIC_BASE_DEC,
|
||||
/**
|
||||
* @brief Hexadecimal system.
|
||||
* Hexadecimal system.
|
||||
*/
|
||||
ZYDIS_NUMERIC_BASE_HEX,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_NUMERIC_BASE_MAX_VALUE = ZYDIS_NUMERIC_BASE_HEX,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_NUMERIC_BASE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_NUMERIC_BASE_MAX_VALUE)
|
||||
} ZydisNumericBase;
|
||||
|
@ -352,30 +358,30 @@ typedef enum ZydisNumericBase_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisSignedness` enum.
|
||||
* Defines the `ZydisSignedness` enum.
|
||||
*/
|
||||
typedef enum ZydisSignedness_
|
||||
{
|
||||
/**
|
||||
* @brief Automatically choose the most suitable mode based on the operands
|
||||
* `ZydisDecodedOperand.imm.is_signed` attribute.
|
||||
* Automatically choose the most suitable mode based on the operands
|
||||
* ZydisDecodedOperand.imm.is_signed` attribute.
|
||||
*/
|
||||
ZYDIS_SIGNEDNESS_AUTO,
|
||||
/**
|
||||
* @brief Force signed values.
|
||||
* Force signed values.
|
||||
*/
|
||||
ZYDIS_SIGNEDNESS_SIGNED,
|
||||
/**
|
||||
* @brief Force unsigned values.
|
||||
* Force unsigned values.
|
||||
*/
|
||||
ZYDIS_SIGNEDNESS_UNSIGNED,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_SIGNEDNESS_MAX_VALUE = ZYDIS_SIGNEDNESS_UNSIGNED,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_SIGNEDNESS_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_SIGNEDNESS_MAX_VALUE)
|
||||
} ZydisSignedness;
|
||||
|
@ -383,26 +389,26 @@ typedef enum ZydisSignedness_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisPadding` enum.
|
||||
* Defines the `ZydisPadding` enum.
|
||||
*/
|
||||
typedef enum ZydisPadding_
|
||||
{
|
||||
/**
|
||||
* @brief Disables padding.
|
||||
* Disables padding.
|
||||
*/
|
||||
ZYDIS_PADDING_DISABLED = 0,
|
||||
/**
|
||||
* @brief Padds the value to the current stack-width for addresses, or to the operand-width
|
||||
* for immediate values (hexadecimal only).
|
||||
* Padds the value to the current stack-width for addresses, or to the
|
||||
* operand-width for immediate values (hexadecimal only).
|
||||
*/
|
||||
ZYDIS_PADDING_AUTO = (-1),
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_PADDING_MAX_VALUE = ZYDIS_PADDING_AUTO,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_PADDING_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_PADDING_MAX_VALUE)
|
||||
} ZydisPadding;
|
||||
|
@ -412,7 +418,7 @@ typedef enum ZydisPadding_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterFunction` enum.
|
||||
* Defines the `ZydisFormatterFunction` enum.
|
||||
*
|
||||
* Do NOT change the order of the values this enum or the function fields inside the
|
||||
* `ZydisFormatter` struct.
|
||||
|
@ -424,18 +430,18 @@ typedef enum ZydisFormatterFunction_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief This function is invoked before the formatter formats an instruction.
|
||||
* This function is invoked before the formatter formats an instruction.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRE_INSTRUCTION,
|
||||
/**
|
||||
* @brief This function is invoked after the formatter formatted an instruction.
|
||||
* This function is invoked after the formatter formatted an instruction.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_POST_INSTRUCTION,
|
||||
|
||||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief This function refers to the main formatting function.
|
||||
* This function refers to the main formatting function.
|
||||
*
|
||||
* Replacing this function allows for complete custom formatting, but indirectly disables all
|
||||
* other hooks except for `ZYDIS_FORMATTER_FUNC_PRE_INSTRUCTION` and
|
||||
|
@ -448,22 +454,22 @@ typedef enum ZydisFormatterFunction_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief This function is invoked before the formatter formats an operand.
|
||||
* This function is invoked before the formatter formats an operand.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRE_OPERAND,
|
||||
/**
|
||||
* @brief This function is invoked after the formatter formatted an operand.
|
||||
* This function is invoked after the formatter formatted an operand.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_POST_OPERAND,
|
||||
|
||||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief This function is invoked to format a register operand.
|
||||
* This function is invoked to format a register operand.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG,
|
||||
/**
|
||||
* @brief This function is invoked to format a memory operand.
|
||||
* This function is invoked to format a memory operand.
|
||||
*
|
||||
* Replacing this function might indirectly disable some specific calls to the
|
||||
* `ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST`, `ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT`,
|
||||
|
@ -471,11 +477,11 @@ typedef enum ZydisFormatterFunction_
|
|||
*/
|
||||
ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM,
|
||||
/**
|
||||
* @brief This function is invoked to format a pointer operand.
|
||||
* This function is invoked to format a pointer operand.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR,
|
||||
/**
|
||||
* @brief This function is invoked to format an immediate operand.
|
||||
* This function is invoked to format an immediate operand.
|
||||
*
|
||||
* Replacing this function might indirectly disable some specific calls to the
|
||||
* `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS`, `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL` and
|
||||
|
@ -488,18 +494,18 @@ typedef enum ZydisFormatterFunction_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief This function is invoked to print the instruction mnemonic.
|
||||
* This function is invoked to print the instruction mnemonic.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_MNEMONIC,
|
||||
|
||||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief This function is invoked to print a register.
|
||||
* This function is invoked to print a register.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_REGISTER,
|
||||
/**
|
||||
* @brief This function is invoked to print absolute addresses.
|
||||
* This function is invoked to print absolute addresses.
|
||||
*
|
||||
* Conditionally invoked, if a runtime-address different to `ZYDIS_RUNTIME_ADDRESS_NONE` was
|
||||
* passed:
|
||||
|
@ -511,14 +517,14 @@ typedef enum ZydisFormatterFunction_
|
|||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS,
|
||||
/**
|
||||
* @brief This function is invoked to print relative addresses.
|
||||
* This function is invoked to print relative addresses.
|
||||
*
|
||||
* Conditionally invoked, if `ZYDIS_RUNTIME_ADDRESS_NONE` was passed as runtime-address:
|
||||
* - `IMM` operands with relative address (e.g. `JMP`, `CALL`, ...)
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL,
|
||||
/**
|
||||
* @brief This function is invoked to print a memory displacement value.
|
||||
* This function is invoked to print a memory displacement value.
|
||||
*
|
||||
* If the memory displacement contains an address and a runtime-address different to
|
||||
* `ZYDIS_RUNTIME_ADDRESS_NONE` was passed, `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS` is called
|
||||
|
@ -526,7 +532,7 @@ typedef enum ZydisFormatterFunction_
|
|||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_DISP,
|
||||
/**
|
||||
* @brief This function is invoked to print an immediate value.
|
||||
* This function is invoked to print an immediate value.
|
||||
*
|
||||
* If the immediate contains an address and a runtime-address different to
|
||||
* `ZYDIS_RUNTIME_ADDRESS_NONE` was passed, `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS` is called
|
||||
|
@ -542,31 +548,31 @@ typedef enum ZydisFormatterFunction_
|
|||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief This function is invoked to print the size of a memory operand (`INTEL` only).
|
||||
* This function is invoked to print the size of a memory operand (`INTEL` only).
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST,
|
||||
/**
|
||||
* @brief This function is invoked to print the segment-register of a memory operand.
|
||||
* This function is invoked to print the segment-register of a memory operand.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT,
|
||||
/**
|
||||
* @brief This function is invoked to print the instruction prefixes.
|
||||
* This function is invoked to print the instruction prefixes.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_PREFIXES,
|
||||
/**
|
||||
* @brief This function is invoked after formatting an operand to print a `EVEX`/`MVEX`
|
||||
* decorator.
|
||||
* This function is invoked after formatting an operand to print a `EVEX`/`MVEX`
|
||||
* decorator.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR,
|
||||
|
||||
/* ---------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_MAX_VALUE = ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_FORMATTER_FUNC_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_FORMATTER_FUNC_MAX_VALUE)
|
||||
} ZydisFormatterFunction;
|
||||
|
@ -576,46 +582,46 @@ typedef enum ZydisFormatterFunction_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisDecorator` enum.
|
||||
* Defines the `ZydisDecorator` enum.
|
||||
*/
|
||||
typedef enum ZydisDecorator_
|
||||
{
|
||||
ZYDIS_DECORATOR_INVALID,
|
||||
/**
|
||||
* @brief The embedded-mask decorator.
|
||||
* The embedded-mask decorator.
|
||||
*/
|
||||
ZYDIS_DECORATOR_MASK,
|
||||
/**
|
||||
* @brief The broadcast decorator.
|
||||
* The broadcast decorator.
|
||||
*/
|
||||
ZYDIS_DECORATOR_BC,
|
||||
/**
|
||||
* @brief The rounding-control decorator.
|
||||
* The rounding-control decorator.
|
||||
*/
|
||||
ZYDIS_DECORATOR_RC,
|
||||
/**
|
||||
* @brief The suppress-all-exceptions decorator.
|
||||
* The suppress-all-exceptions decorator.
|
||||
*/
|
||||
ZYDIS_DECORATOR_SAE,
|
||||
/**
|
||||
* @brief The register-swizzle decorator.
|
||||
* The register-swizzle decorator.
|
||||
*/
|
||||
ZYDIS_DECORATOR_SWIZZLE,
|
||||
/**
|
||||
* @brief The conversion decorator.
|
||||
* The conversion decorator.
|
||||
*/
|
||||
ZYDIS_DECORATOR_CONVERSION,
|
||||
/**
|
||||
* @brief The eviction-hint decorator.
|
||||
* The eviction-hint decorator.
|
||||
*/
|
||||
ZYDIS_DECORATOR_EH,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_DECORATOR_MAX_VALUE = ZYDIS_DECORATOR_EH,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_DECORATOR_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_DECORATOR_MAX_VALUE)
|
||||
} ZydisDecorator;
|
||||
|
@ -627,24 +633,24 @@ typedef enum ZydisDecorator_
|
|||
typedef struct ZydisFormatter_ ZydisFormatter;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterContext` struct.
|
||||
* Defines the `ZydisFormatterContext` struct.
|
||||
*/
|
||||
typedef struct ZydisFormatterContext_
|
||||
{
|
||||
/**
|
||||
* @brief A pointer to the `ZydisDecodedInstruction` struct.
|
||||
* A pointer to the `ZydisDecodedInstruction` struct.
|
||||
*/
|
||||
const ZydisDecodedInstruction* instruction;
|
||||
/**
|
||||
* @brief A pointer to the `ZydisDecodedOperand` struct.
|
||||
* A pointer to the `ZydisDecodedOperand` struct.
|
||||
*/
|
||||
const ZydisDecodedOperand* operand;
|
||||
/**
|
||||
* @brief The runtime address of the instruction.
|
||||
* The runtime address of the instruction.
|
||||
*/
|
||||
ZyanU64 runtime_address;
|
||||
/**
|
||||
* @brief A pointer to user-defined data.
|
||||
* A pointer to user-defined data.
|
||||
*/
|
||||
void* user_data;
|
||||
} ZydisFormatterContext;
|
||||
|
@ -654,7 +660,7 @@ typedef struct ZydisFormatterContext_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterFunc` function prototype.
|
||||
* Defines the `ZydisFormatterFunc` function prototype.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
|
@ -697,7 +703,7 @@ typedef ZyanStatus (*ZydisFormatterFunc)(const ZydisFormatter* formatter,
|
|||
ZydisFormatterBuffer* buffer, ZydisFormatterContext* context);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterRegisterFunc` function prototype.
|
||||
* Defines the `ZydisFormatterRegisterFunc` function prototype.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
|
@ -714,7 +720,7 @@ typedef ZyanStatus (*ZydisFormatterRegisterFunc)(const ZydisFormatter* formatter
|
|||
ZydisFormatterBuffer* buffer, ZydisFormatterContext* context, ZydisRegister reg);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterDecoratorFunc` function prototype.
|
||||
* Defines the `ZydisFormatterDecoratorFunc` function prototype.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
|
@ -735,7 +741,7 @@ typedef ZyanStatus (*ZydisFormatterDecoratorFunc)(const ZydisFormatter* formatte
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatter` struct.
|
||||
* Defines the `ZydisFormatter` struct.
|
||||
*
|
||||
* All fields in this struct should be considered as "private". Any changes may lead to unexpected
|
||||
* behavior.
|
||||
|
@ -746,99 +752,103 @@ typedef ZyanStatus (*ZydisFormatterDecoratorFunc)(const ZydisFormatter* formatte
|
|||
struct ZydisFormatter_
|
||||
{
|
||||
/**
|
||||
* @brief The formatter style.
|
||||
* The formatter style.
|
||||
*/
|
||||
ZydisFormatterStyle style;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_PROP_FORCE_SIZE` property.
|
||||
* The `ZYDIS_FORMATTER_PROP_FORCE_SIZE` property.
|
||||
*/
|
||||
ZyanBool force_memory_size;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_PROP_FORCE_SEGMENT` property.
|
||||
* The `ZYDIS_FORMATTER_PROP_FORCE_SEGMENT` property.
|
||||
*/
|
||||
ZyanBool force_memory_segment;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_BRANCHES` property.
|
||||
* The `ZYDIS_FORMATTER_PROP_FORCE_SCALE_ONE` property.
|
||||
*/
|
||||
ZyanBool force_memory_scale;
|
||||
/**
|
||||
* The `ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_BRANCHES` property.
|
||||
*/
|
||||
ZyanBool force_relative_branches;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_RIPREL` property.
|
||||
* The `ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_RIPREL` property.
|
||||
*/
|
||||
ZyanBool force_relative_riprel;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_PROP_PRINT_BRANCH_SIZE` property.
|
||||
* The `ZYDIS_FORMATTER_PROP_PRINT_BRANCH_SIZE` property.
|
||||
*/
|
||||
ZyanBool print_branch_size;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_DETAILED_PREFIXES` property.
|
||||
* The `ZYDIS_FORMATTER_DETAILED_PREFIXES` property.
|
||||
*/
|
||||
ZyanBool detailed_prefixes;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_ADDR_BASE` property.
|
||||
* The `ZYDIS_FORMATTER_ADDR_BASE` property.
|
||||
*/
|
||||
ZydisNumericBase addr_base;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_ADDR_SIGNEDNESS` property.
|
||||
* The `ZYDIS_FORMATTER_ADDR_SIGNEDNESS` property.
|
||||
*/
|
||||
ZydisSignedness addr_signedness;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_ADDR_PADDING_ABSOLUTE` property.
|
||||
* The `ZYDIS_FORMATTER_ADDR_PADDING_ABSOLUTE` property.
|
||||
*/
|
||||
ZydisPadding addr_padding_absolute;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_ADDR_PADDING_RELATIVE` property.
|
||||
* The `ZYDIS_FORMATTER_ADDR_PADDING_RELATIVE` property.
|
||||
*/
|
||||
ZydisPadding addr_padding_relative;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_DISP_BASE` property.
|
||||
* The `ZYDIS_FORMATTER_DISP_BASE` property.
|
||||
*/
|
||||
ZydisNumericBase disp_base;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_DISP_SIGNEDNESS` property.
|
||||
* The `ZYDIS_FORMATTER_DISP_SIGNEDNESS` property.
|
||||
*/
|
||||
ZydisSignedness disp_signedness;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_DISP_PADDING` property.
|
||||
* The `ZYDIS_FORMATTER_DISP_PADDING` property.
|
||||
*/
|
||||
ZydisPadding disp_padding;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_IMM_BASE` property.
|
||||
* The `ZYDIS_FORMATTER_IMM_BASE` property.
|
||||
*/
|
||||
ZydisNumericBase imm_base;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_IMM_SIGNEDNESS` property.
|
||||
* The `ZYDIS_FORMATTER_IMM_SIGNEDNESS` property.
|
||||
*/
|
||||
ZydisSignedness imm_signedness;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_IMM_PADDING` property.
|
||||
* The `ZYDIS_FORMATTER_IMM_PADDING` property.
|
||||
*/
|
||||
ZydisPadding imm_padding;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_UPPERCASE_PREFIXES` property.
|
||||
* The `ZYDIS_FORMATTER_UPPERCASE_PREFIXES` property.
|
||||
*/
|
||||
ZyanI32 case_prefixes;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_UPPERCASE_MNEMONIC` property.
|
||||
* The `ZYDIS_FORMATTER_UPPERCASE_MNEMONIC` property.
|
||||
*/
|
||||
ZyanI32 case_mnemonic;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_UPPERCASE_REGISTERS` property.
|
||||
* The `ZYDIS_FORMATTER_UPPERCASE_REGISTERS` property.
|
||||
*/
|
||||
ZyanI32 case_registers;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_UPPERCASE_TYPECASTS` property.
|
||||
* The `ZYDIS_FORMATTER_UPPERCASE_TYPECASTS` property.
|
||||
*/
|
||||
ZyanI32 case_typecasts;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_UPPERCASE_DECORATORS` property.
|
||||
* The `ZYDIS_FORMATTER_UPPERCASE_DECORATORS` property.
|
||||
*/
|
||||
ZyanI32 case_decorators;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_HEX_UPPERCASE` property.
|
||||
* The `ZYDIS_FORMATTER_HEX_UPPERCASE` property.
|
||||
*/
|
||||
ZyanBool hex_uppercase;
|
||||
/**
|
||||
* @brief The number formats for all numeric bases.
|
||||
* The number formats for all numeric bases.
|
||||
*
|
||||
* Index 0 = prefix
|
||||
* Index 1 = suffix
|
||||
|
@ -846,92 +856,92 @@ struct ZydisFormatter_
|
|||
struct
|
||||
{
|
||||
/**
|
||||
* @brief A pointer to the `ZyanStringView` to use as prefix/suffix.
|
||||
* A pointer to the `ZyanStringView` to use as prefix/suffix.
|
||||
*/
|
||||
const ZyanStringView* string;
|
||||
/**
|
||||
* @brief The `ZyanStringView` to use as prefix/suffix
|
||||
* The `ZyanStringView` to use as prefix/suffix
|
||||
*/
|
||||
ZyanStringView string_data;
|
||||
/**
|
||||
* @brief The actual string data.
|
||||
* The actual string data.
|
||||
*/
|
||||
char buffer[11];
|
||||
} number_format[ZYDIS_NUMERIC_BASE_MAX_VALUE + 1][2];
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRE_INSTRUCTION` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRE_INSTRUCTION` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_pre_instruction;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_POST_INSTRUCTION` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_POST_INSTRUCTION` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_post_instruction;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_FORMAT_INSTRUCTION` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_FORMAT_INSTRUCTION` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_format_instruction;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRE_OPERAND` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRE_OPERAND` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_pre_operand;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_POST_OPERAND` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_POST_OPERAND` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_post_operand;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_format_operand_reg;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_format_operand_mem;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_format_operand_ptr;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_format_operand_imm;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_MNEMONIC function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_MNEMONIC function.
|
||||
*/
|
||||
ZydisFormatterFunc func_print_mnemonic;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_REGISTER` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_REGISTER` function.
|
||||
*/
|
||||
ZydisFormatterRegisterFunc func_print_register;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_print_address_abs;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_print_address_rel;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_DISP` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_DISP` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_print_disp;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_IMM` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_IMM` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_print_imm;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_print_typecast;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_print_segment;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_PREFIXES` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_PREFIXES` function.
|
||||
*/
|
||||
ZydisFormatterFunc func_print_prefixes;
|
||||
/**
|
||||
* @brief The `ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR` function.
|
||||
* The `ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR` function.
|
||||
*/
|
||||
ZydisFormatterDecoratorFunc func_print_decorator;
|
||||
};
|
||||
|
@ -944,7 +954,7 @@ struct ZydisFormatter_
|
|||
|
||||
/**
|
||||
* @addtogroup formatter Formatter
|
||||
* @brief Functions allowing formatting of previously decoded instructions to human readable text.
|
||||
* Functions allowing formatting of previously decoded instructions to human readable text.
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -953,7 +963,7 @@ struct ZydisFormatter_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Initializes the given `ZydisFormatter` instance.
|
||||
* Initializes the given `ZydisFormatter` instance.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param style The base formatter style (either `AT&T` or `Intel` style).
|
||||
|
@ -967,7 +977,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterInit(ZydisFormatter* formatter, ZydisForma
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Changes the value of the specified formatter `property`.
|
||||
* Changes the value of the specified formatter `property`.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param property The id of the formatter-property.
|
||||
|
@ -982,8 +992,8 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterSetProperty(ZydisFormatter* formatter,
|
|||
ZydisFormatterProperty property, ZyanUPointer value);
|
||||
|
||||
/**
|
||||
* @brief Replaces a formatter function with a custom callback and/or retrieves the currently
|
||||
* used function.
|
||||
* Replaces a formatter function with a custom callback and/or retrieves the currently
|
||||
* used function.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param type The formatter function-type.
|
||||
|
@ -1006,7 +1016,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterSetHook(ZydisFormatter* formatter,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Formats the given instruction and writes it into the output buffer.
|
||||
* Formats the given instruction and writes it into the output buffer.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
|
@ -1022,7 +1032,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatInstruction(const ZydisFormatter* fo
|
|||
ZyanU64 runtime_address);
|
||||
|
||||
/**
|
||||
* @brief Formats the given instruction and writes it into the output buffer.
|
||||
* Formats the given instruction and writes it into the output buffer.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
|
@ -1040,7 +1050,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatInstructionEx(const ZydisFormatter*
|
|||
ZyanU64 runtime_address, void* user_data);
|
||||
|
||||
/**
|
||||
* @brief Formats the given operand and writes it into the output buffer.
|
||||
* Formats the given operand and writes it into the output buffer.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
|
@ -1060,7 +1070,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatOperand(const ZydisFormatter* format
|
|||
ZyanU64 runtime_address);
|
||||
|
||||
/**
|
||||
* @brief Formats the given operand and writes it into the output buffer.
|
||||
* Formats the given operand and writes it into the output buffer.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
|
@ -1086,7 +1096,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatOperandEx(const ZydisFormatter* form
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Tokenizes the given instruction and writes it into the output buffer.
|
||||
* Tokenizes the given instruction and writes it into the output buffer.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
|
@ -1103,7 +1113,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenizeInstruction(const ZydisFormatter*
|
|||
ZyanU64 runtime_address, ZydisFormatterTokenConst** token);
|
||||
|
||||
/**
|
||||
* @brief Tokenizes the given instruction and writes it into the output buffer.
|
||||
* Tokenizes the given instruction and writes it into the output buffer.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
|
@ -1122,7 +1132,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenizeInstructionEx(const ZydisFormatter
|
|||
ZyanU64 runtime_address, ZydisFormatterTokenConst** token, void* user_data);
|
||||
|
||||
/**
|
||||
* @brief Tokenizes the given operand and writes it into the output buffer.
|
||||
* Tokenizes the given operand and writes it into the output buffer.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
|
@ -1143,7 +1153,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenizeOperand(const ZydisFormatter* form
|
|||
ZyanU64 runtime_address, ZydisFormatterTokenConst** token);
|
||||
|
||||
/**
|
||||
* @brief Tokenizes the given operand and writes it into the output buffer.
|
||||
* Tokenizes the given operand and writes it into the output buffer.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
|
|
|
@ -165,8 +165,18 @@ ZyanStatus ZydisFormatterATTFormatInstruction(const ZydisFormatter* formatter,
|
|||
}
|
||||
} else
|
||||
{
|
||||
if ((i == (context->instruction->operand_count - 1)) ||
|
||||
(context->instruction->operands[i + 1].type == ZYDIS_OPERAND_TYPE_IMMEDIATE))
|
||||
ZyanBool decorate_operand = ZYAN_FALSE;
|
||||
if (i == (context->instruction->operand_count - 1))
|
||||
{
|
||||
decorate_operand = operand->type != ZYDIS_OPERAND_TYPE_IMMEDIATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
decorate_operand =
|
||||
(context->instruction->operands[i + 1].type == ZYDIS_OPERAND_TYPE_IMMEDIATE) ||
|
||||
(context->instruction->operands[i + 1].visibility == ZYDIS_OPERAND_VISIBILITY_HIDDEN);
|
||||
}
|
||||
if (decorate_operand)
|
||||
{
|
||||
if (context->instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX)
|
||||
{
|
||||
|
@ -211,32 +221,39 @@ ZyanStatus ZydisFormatterATTFormatOperandMEM(const ZydisFormatter* formatter,
|
|||
ZYAN_CHECK(formatter->func_print_address_abs(formatter, buffer, context));
|
||||
} else
|
||||
{
|
||||
const ZyanBool should_print_reg = context->operand->mem.base != ZYDIS_REGISTER_NONE;
|
||||
const ZyanBool should_print_idx = context->operand->mem.index != ZYDIS_REGISTER_NONE;
|
||||
const ZyanBool neither_reg_nor_idx = !should_print_reg && !should_print_idx;
|
||||
|
||||
// Regular memory operand
|
||||
if (context->operand->mem.disp.has_displacement && context->operand->mem.disp.value)
|
||||
if (neither_reg_nor_idx)
|
||||
{
|
||||
ZYAN_CHECK(formatter->func_print_address_abs(formatter, buffer, context));
|
||||
} else if (context->operand->mem.disp.has_displacement && context->operand->mem.disp.value)
|
||||
{
|
||||
ZYAN_CHECK(formatter->func_print_disp(formatter, buffer, context));
|
||||
}
|
||||
|
||||
if ((context->operand->mem.base == ZYDIS_REGISTER_NONE) &&
|
||||
(context->operand->mem.index == ZYDIS_REGISTER_NONE))
|
||||
if (neither_reg_nor_idx)
|
||||
{
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ZYDIS_BUFFER_APPEND(buffer, MEMORY_BEGIN_ATT);
|
||||
|
||||
if (context->operand->mem.base != ZYDIS_REGISTER_NONE)
|
||||
if (should_print_reg)
|
||||
{
|
||||
ZYAN_CHECK(formatter->func_print_register(formatter, buffer, context,
|
||||
context->operand->mem.base));
|
||||
}
|
||||
if ((context->operand->mem.index != ZYDIS_REGISTER_NONE) &&
|
||||
(context->operand->mem.type != ZYDIS_MEMOP_TYPE_MIB))
|
||||
if (should_print_idx)
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND(buffer, DELIM_MEMORY);
|
||||
ZYAN_CHECK(formatter->func_print_register(formatter, buffer, context,
|
||||
context->operand->mem.index));
|
||||
if (context->operand->mem.scale)
|
||||
if (context->operand->mem.scale &&
|
||||
(context->operand->mem.type != ZYDIS_MEMOP_TYPE_MIB) &&
|
||||
((context->operand->mem.scale > 1) || formatter->force_memory_scale))
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_DELIMITER);
|
||||
ZYDIS_BUFFER_APPEND(buffer, DELIM_MEMORY);
|
||||
|
@ -349,6 +366,22 @@ ZyanStatus ZydisFormatterATTPrintRegister(const ZydisFormatter* formatter,
|
|||
return ZydisStringAppendShortCase(&buffer->string, str, formatter->case_registers);
|
||||
}
|
||||
|
||||
ZyanStatus ZydisFormatterATTPrintAddressABS(const ZydisFormatter* formatter,
|
||||
ZydisFormatterBuffer* buffer, ZydisFormatterContext* context)
|
||||
{
|
||||
ZYAN_ASSERT(formatter);
|
||||
ZYAN_ASSERT(buffer);
|
||||
ZYAN_ASSERT(context);
|
||||
|
||||
if ((context->instruction->meta.branch_type != ZYDIS_BRANCH_TYPE_NONE) &&
|
||||
(context->instruction->operands[0].type == ZYDIS_OPERAND_TYPE_MEMORY))
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND(buffer, MUL);
|
||||
}
|
||||
|
||||
return ZydisFormatterBasePrintAddressABS(formatter, buffer, context);
|
||||
}
|
||||
|
||||
ZyanStatus ZydisFormatterATTPrintDISP(const ZydisFormatter* formatter,
|
||||
ZydisFormatterBuffer* buffer, ZydisFormatterContext* context)
|
||||
{
|
||||
|
|
|
@ -156,9 +156,23 @@ ZyanStatus ZydisFormatterBaseFormatOperandPTR(const ZydisFormatter* formatter,
|
|||
ZYDIS_STRING_APPEND_NUM_U(formatter, formatter->addr_base, &buffer->string,
|
||||
context->operand->ptr.segment, 4);
|
||||
ZYDIS_BUFFER_APPEND(buffer, DELIM_SEGMENT);
|
||||
|
||||
ZyanU8 padding;
|
||||
switch (context->instruction->operand_width)
|
||||
{
|
||||
case 16:
|
||||
padding = 4;
|
||||
break;
|
||||
case 32:
|
||||
padding = 8;
|
||||
break;
|
||||
default:
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_IMMEDIATE);
|
||||
ZYDIS_STRING_APPEND_NUM_U(formatter, formatter->addr_base, &buffer->string,
|
||||
context->operand->ptr.offset , 8);
|
||||
context->operand->ptr.offset , padding);
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -515,7 +529,16 @@ ZyanStatus ZydisFormatterBasePrintPrefixes(const ZydisFormatter* formatter,
|
|||
if (context->instruction->attributes & ZYDIS_ATTRIB_HAS_LOCK)
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, PREF_LOCK, formatter->case_prefixes);
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (context->instruction->attributes & ZYDIS_ATTRIB_HAS_BND)
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, PREF_BND, formatter->case_prefixes);
|
||||
}
|
||||
|
||||
if (context->instruction->attributes & ZYDIS_ATTRIB_HAS_NOTRACK)
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, PREF_NOTRACK, formatter->case_prefixes);
|
||||
}
|
||||
|
||||
if (context->instruction->attributes & ZYDIS_ATTRIB_HAS_REP)
|
||||
|
@ -534,12 +557,6 @@ ZyanStatus ZydisFormatterBasePrintPrefixes(const ZydisFormatter* formatter,
|
|||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (context->instruction->attributes & ZYDIS_ATTRIB_HAS_BND)
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, PREF_BND, formatter->case_prefixes);
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -579,7 +596,8 @@ ZyanStatus ZydisFormatterBasePrintDecorator(const ZydisFormatter* formatter,
|
|||
|
||||
// Only print the zeroing decorator, if the instruction is not a "zeroing masking only"
|
||||
// instruction (e.g. `vcmpsd`)
|
||||
if ((context->instruction->avx.mask.mode == ZYDIS_MASK_MODE_ZEROING) &&
|
||||
if ((context->instruction->avx.mask.mode == ZYDIS_MASK_MODE_ZEROING ||
|
||||
context->instruction->avx.mask.mode == ZYDIS_MASK_MODE_CONTROL_ZEROING) &&
|
||||
(context->instruction->raw.evex.z))
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, DECO_ZERO, formatter->case_decorators);
|
||||
|
@ -608,12 +626,21 @@ ZyanStatus ZydisFormatterBasePrintDecorator(const ZydisFormatter* formatter,
|
|||
case ZYDIS_BROADCAST_MODE_1_TO_16:
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, DECO_1TO16, formatter->case_decorators);
|
||||
break;
|
||||
case ZYDIS_BROADCAST_MODE_1_TO_32:
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, DECO_1TO32, formatter->case_decorators);
|
||||
break;
|
||||
case ZYDIS_BROADCAST_MODE_1_TO_64:
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, DECO_1TO64, formatter->case_decorators);
|
||||
break;
|
||||
case ZYDIS_BROADCAST_MODE_4_TO_8:
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, DECO_4TO8, formatter->case_decorators);
|
||||
break;
|
||||
case ZYDIS_BROADCAST_MODE_4_TO_16:
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, DECO_4TO16, formatter->case_decorators);
|
||||
break;
|
||||
case ZYDIS_BROADCAST_MODE_8_TO_16:
|
||||
ZYDIS_BUFFER_APPEND_CASE(buffer, DECO_8TO16, formatter->case_decorators);
|
||||
break;
|
||||
default:
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implements the `ZydisFormatterToken` type and provides functions to use it.
|
||||
* Implements the `ZydisFormatterToken` type and provides functions to use it.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_FORMATTER_TOKEN_H
|
||||
|
@ -56,64 +56,64 @@ typedef ZyanU8 ZydisTokenType;
|
|||
|
||||
#define ZYDIS_TOKEN_INVALID 0x00
|
||||
/**
|
||||
* @brief A whitespace character.
|
||||
* A whitespace character.
|
||||
*/
|
||||
#define ZYDIS_TOKEN_WHITESPACE 0x01
|
||||
/**
|
||||
* @brief A delimiter character (like `','`, `':'`, `'+'`, `'-'`, `'*'`).
|
||||
* A delimiter character (like `','`, `':'`, `'+'`, `'-'`, `'*'`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_DELIMITER 0x02
|
||||
/**
|
||||
* @brief An opening parenthesis character (like `'('`, `'['`, `'{'`).
|
||||
* An opening parenthesis character (like `'('`, `'['`, `'{'`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_PARENTHESIS_OPEN 0x03
|
||||
/**
|
||||
* @brief A closing parenthesis character (like `')'`, `']'`, `'}'`).
|
||||
* A closing parenthesis character (like `')'`, `']'`, `'}'`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_PARENTHESIS_CLOSE 0x04
|
||||
/**
|
||||
* @brief A prefix literal (like `"LOCK"`, `"REP"`).
|
||||
* A prefix literal (like `"LOCK"`, `"REP"`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_PREFIX 0x05
|
||||
/**
|
||||
* @brief A mnemonic literal (like `"MOV"`, `"VCMPPSD"`, `"LCALL"`).
|
||||
* A mnemonic literal (like `"MOV"`, `"VCMPPSD"`, `"LCALL"`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_MNEMONIC 0x06
|
||||
/**
|
||||
* @brief A register literal (like `"RAX"`, `"DS"`, `"%ECX"`).
|
||||
* A register literal (like `"RAX"`, `"DS"`, `"%ECX"`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_REGISTER 0x07
|
||||
/**
|
||||
* @brief An absolute address literal (like `0x00400000`).
|
||||
* An absolute address literal (like `0x00400000`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_ADDRESS_ABS 0x08
|
||||
/**
|
||||
* @brief A relative address literal (like `-0x100`).
|
||||
* A relative address literal (like `-0x100`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_ADDRESS_REL 0x09
|
||||
/**
|
||||
* @brief A displacement literal (like `0xFFFFFFFF`, `-0x100`, `+0x1234`).
|
||||
* A displacement literal (like `0xFFFFFFFF`, `-0x100`, `+0x1234`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_DISPLACEMENT 0x0A
|
||||
/**
|
||||
* @brief An immediate literal (like `0xC0`, `-0x1234`, `$0x0000`).
|
||||
* An immediate literal (like `0xC0`, `-0x1234`, `$0x0000`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_IMMEDIATE 0x0B
|
||||
/**
|
||||
* @brief A typecast literal (like `DWORD PTR`).
|
||||
* A typecast literal (like `DWORD PTR`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_TYPECAST 0x0C
|
||||
/**
|
||||
* @brief A decorator literal (like `"Z"`, `"1TO4"`).
|
||||
* A decorator literal (like `"Z"`, `"1TO4"`).
|
||||
*/
|
||||
#define ZYDIS_TOKEN_DECORATOR 0x0D
|
||||
/**
|
||||
* @brief A symbol literal.
|
||||
* A symbol literal.
|
||||
*/
|
||||
#define ZYDIS_TOKEN_SYMBOL 0x0E
|
||||
|
||||
/**
|
||||
* @brief The base for user-defined token types.
|
||||
* The base for user-defined token types.
|
||||
*/
|
||||
#define ZYDIS_TOKEN_USER 0x80
|
||||
|
||||
|
@ -130,7 +130,7 @@ typedef ZyanU8 ZydisTokenType;
|
|||
#pragma pack(push, 1)
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterToken` struct.
|
||||
* Defines the `ZydisFormatterToken` struct.
|
||||
*
|
||||
* All fields in this struct should be considered as "private". Any changes may lead to unexpected
|
||||
* behavior.
|
||||
|
@ -138,11 +138,11 @@ typedef ZyanU8 ZydisTokenType;
|
|||
typedef struct ZydisFormatterToken_
|
||||
{
|
||||
/**
|
||||
* @brief The token type.
|
||||
* The token type.
|
||||
*/
|
||||
ZydisTokenType type;
|
||||
/**
|
||||
* @brief An offset to the next token, or `0`.
|
||||
* An offset to the next token, or `0`.
|
||||
*/
|
||||
ZyanU8 next;
|
||||
} ZydisFormatterToken;
|
||||
|
@ -150,7 +150,7 @@ typedef struct ZydisFormatterToken_
|
|||
#pragma pack(pop)
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterTokenConst` data-type.
|
||||
* Defines the `ZydisFormatterTokenConst` data-type.
|
||||
*/
|
||||
typedef const ZydisFormatterToken ZydisFormatterTokenConst;
|
||||
|
||||
|
@ -159,25 +159,25 @@ typedef const ZydisFormatterToken ZydisFormatterTokenConst;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFormatterBuffer` struct.
|
||||
* Defines the `ZydisFormatterBuffer` struct.
|
||||
*
|
||||
* All fields in this struct should be considered as "private". Any changes may lead to unexpected
|
||||
* behavior.
|
||||
* All fields in this struct should be considered as "private". Any changes may
|
||||
* lead to unexpected behavior.
|
||||
*/
|
||||
typedef struct ZydisFormatterBuffer_
|
||||
{
|
||||
/**
|
||||
* @brief `ZYAN_TRUE`, if the buffer contains a token stream or `ZYAN_FALSE, if it contains
|
||||
* a simple string.
|
||||
* `ZYAN_TRUE`, if the buffer contains a token stream or `ZYAN_FALSE, if it
|
||||
* contains a simple string.
|
||||
*/
|
||||
ZyanBool is_token_list;
|
||||
/**
|
||||
* @brief The remaining capacity of the buffer.
|
||||
* The remaining capacity of the buffer.
|
||||
*/
|
||||
ZyanUSize capacity;
|
||||
/**
|
||||
* @brief The `ZyanString` instance that refers to the literal value of the most recently
|
||||
* added token.
|
||||
* The `ZyanString` instance that refers to the literal value of the most
|
||||
* recently added token.
|
||||
*/
|
||||
ZyanString string;
|
||||
} ZydisFormatterBuffer;
|
||||
|
@ -193,7 +193,7 @@ typedef struct ZydisFormatterBuffer_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the `type` and the string `value` of the given `token`.
|
||||
* Returns the `type` and the string `value` of the given `token`.
|
||||
*
|
||||
* @param token A pointer to the `ZydisFormatterToken` struct.
|
||||
* @param type Receives the token type.
|
||||
|
@ -205,10 +205,10 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenGetValue(const ZydisFormatterToken* t
|
|||
ZydisTokenType* type, ZyanConstCharPointer* value);
|
||||
|
||||
/**
|
||||
* @brief Obtains the next `token` linked to the passed one.
|
||||
* Obtains the next `token` linked to the passed one.
|
||||
*
|
||||
* @param token Receives a pointer to the next `ZydisFormatterToken` struct linked to the
|
||||
* passed one.
|
||||
* @param token Receives a pointer to the next `ZydisFormatterToken` struct
|
||||
* linked to the passed one.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
|
@ -219,7 +219,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenNext(ZydisFormatterTokenConst** token
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the current (most recently added) token.
|
||||
* Returns the current (most recently added) token.
|
||||
*
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param token Receives a pointer to the current token.
|
||||
|
@ -233,7 +233,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterBufferGetToken(const ZydisFormatterBuffer*
|
|||
ZydisFormatterTokenConst** token);
|
||||
|
||||
/**
|
||||
* @brief Returns the `ZyanString` instance associated with the given buffer.
|
||||
* Returns the `ZyanString` instance associated with the given buffer.
|
||||
*
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param string Receives a pointer to the `ZyanString` instance associated with the given
|
||||
|
@ -251,7 +251,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterBufferGetString(ZydisFormatterBuffer* buff
|
|||
ZyanString** string);
|
||||
|
||||
/**
|
||||
* @brief Appends a new token to the `buffer`.
|
||||
* Appends a new token to the `buffer`.
|
||||
*
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param type The type of the new token.
|
||||
|
@ -265,7 +265,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterBufferAppend(ZydisFormatterBuffer* buffer,
|
|||
ZydisTokenType type);
|
||||
|
||||
/**
|
||||
* @brief Returns a snapshot of the buffer-state.
|
||||
* Returns a snapshot of the buffer-state.
|
||||
*
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param state Receives a snapshot of the buffer-state.
|
||||
|
@ -279,7 +279,7 @@ ZYDIS_EXPORT ZyanStatus ZydisFormatterBufferRemember(const ZydisFormatterBuffer*
|
|||
ZyanUPointer* state);
|
||||
|
||||
/**
|
||||
* @brief Restores a previously saved buffer-state.
|
||||
* Restores a previously saved buffer-state.
|
||||
*
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param state The buffer-state to restore.
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "zydis/Zydis/Internal/FormatterIntel.h"
|
||||
#include "zydis/Zydis/Utils.h"
|
||||
#include "zydis/Zycore/Format.h"
|
||||
|
||||
/* ============================================================================================== */
|
||||
/* Constants */
|
||||
|
@ -162,8 +163,18 @@ ZyanStatus ZydisFormatterIntelFormatInstruction(const ZydisFormatter* formatter,
|
|||
}
|
||||
} else
|
||||
{
|
||||
if ((i == (context->instruction->operand_count - 1)) ||
|
||||
(context->instruction->operands[i + 1].type == ZYDIS_OPERAND_TYPE_IMMEDIATE))
|
||||
ZyanBool decorate_operand = ZYAN_FALSE;
|
||||
if (i == (context->instruction->operand_count - 1))
|
||||
{
|
||||
decorate_operand = operand->type != ZYDIS_OPERAND_TYPE_IMMEDIATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
decorate_operand =
|
||||
(context->instruction->operands[i + 1].type == ZYDIS_OPERAND_TYPE_IMMEDIATE) ||
|
||||
(context->instruction->operands[i + 1].visibility == ZYDIS_OPERAND_VISIBILITY_HIDDEN);
|
||||
}
|
||||
if (decorate_operand)
|
||||
{
|
||||
if (context->instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX)
|
||||
{
|
||||
|
@ -210,14 +221,17 @@ ZyanStatus ZydisFormatterIntelFormatOperandMEM(const ZydisFormatter* formatter,
|
|||
ZYAN_CHECK(formatter->func_print_address_abs(formatter, buffer, context));
|
||||
} else
|
||||
{
|
||||
const ZyanBool should_print_reg = context->operand->mem.base != ZYDIS_REGISTER_NONE;
|
||||
const ZyanBool should_print_idx = context->operand->mem.index != ZYDIS_REGISTER_NONE;
|
||||
const ZyanBool neither_reg_nor_idx = !should_print_reg && !should_print_idx;
|
||||
|
||||
// Regular memory operand
|
||||
if (context->operand->mem.base != ZYDIS_REGISTER_NONE)
|
||||
if (should_print_reg)
|
||||
{
|
||||
ZYAN_CHECK(formatter->func_print_register(formatter, buffer, context,
|
||||
context->operand->mem.base));
|
||||
}
|
||||
if ((context->operand->mem.index != ZYDIS_REGISTER_NONE) &&
|
||||
(context->operand->mem.type != ZYDIS_MEMOP_TYPE_MIB))
|
||||
if (should_print_idx)
|
||||
{
|
||||
if (context->operand->mem.base != ZYDIS_REGISTER_NONE)
|
||||
{
|
||||
|
@ -225,7 +239,9 @@ ZyanStatus ZydisFormatterIntelFormatOperandMEM(const ZydisFormatter* formatter,
|
|||
}
|
||||
ZYAN_CHECK(formatter->func_print_register(formatter, buffer, context,
|
||||
context->operand->mem.index));
|
||||
if (context->operand->mem.scale)
|
||||
if (context->operand->mem.scale &&
|
||||
(context->operand->mem.type != ZYDIS_MEMOP_TYPE_MIB) &&
|
||||
((context->operand->mem.scale > 1) || formatter->force_memory_scale))
|
||||
{
|
||||
ZYDIS_BUFFER_APPEND(buffer, MUL);
|
||||
ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_IMMEDIATE);
|
||||
|
@ -233,7 +249,10 @@ ZyanStatus ZydisFormatterIntelFormatOperandMEM(const ZydisFormatter* formatter,
|
|||
ZYAN_NULL, ZYAN_NULL));
|
||||
}
|
||||
}
|
||||
if (context->operand->mem.disp.has_displacement && context->operand->mem.disp.value)
|
||||
if (neither_reg_nor_idx)
|
||||
{
|
||||
ZYAN_CHECK(formatter->func_print_address_abs(formatter, buffer, context));
|
||||
} else if (context->operand->mem.disp.has_displacement && context->operand->mem.disp.value)
|
||||
{
|
||||
ZYAN_CHECK(formatter->func_print_disp(formatter, buffer, context));
|
||||
}
|
||||
|
@ -324,7 +343,7 @@ ZyanStatus ZydisFormatterIntelPrintDISP(const ZydisFormatter* formatter,
|
|||
}
|
||||
ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_DISPLACEMENT);
|
||||
ZYDIS_STRING_APPEND_NUM_U(formatter, formatter->disp_base, &buffer->string,
|
||||
-context->operand->mem.disp.value, formatter->disp_padding);
|
||||
ZyanAbsI64(context->operand->mem.disp.value), formatter->disp_padding);
|
||||
break;
|
||||
}
|
||||
ZYAN_FALLTHROUGH;
|
||||
|
|
|
@ -1,77 +1,78 @@
|
|||
#ifndef ZYDIS_MINIMAL_MODE
|
||||
static const ZydisAccessedFlags ACCESSED_FLAGS[] =
|
||||
{
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_1, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_1, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_1, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE } }
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED }, 0x0, 0x0, 0x0, 0xF },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED }, 0x0, 0x0, 0x0, 0xF },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED }, 0x0, 0x0, 0x0, 0xF },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED }, 0x0, 0x0, 0x0, 0xF },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x40000, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_1, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x40000, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x1000, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x800, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x800, 0x800, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x400, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x1400, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x400, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_1, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x400, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x1000, 0x80200, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x30200, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x21800, 0x74300, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x21000, 0xF4300, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x80, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x880, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x40, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED }, 0x40, 0x0, 0x0, 0xF },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x8C0, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x40, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x4, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED }, 0x4, 0x0, 0x0, 0xF },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D4, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x1, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED }, 0x1, 0x0, 0x0, 0xF },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x41, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED }, 0x41, 0x0, 0x0, 0xF },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0xD5, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x3F5FD5, 0x0, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x1, 0x1, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x1, 0x801, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x11, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x1, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x1, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x1, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x801, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x41, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x440, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0xD5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x400, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x25000, 0x3F5FD5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x21000, 0x3D5FD5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_TESTED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x121000, 0x2D5FD5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x3F5FD5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x3D5FD5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x3F5FD5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x2 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x10, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x895, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x1, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_SET_0, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_SET_1, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x1, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_MODIFIED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 },
|
||||
{ { ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_UNDEFINED, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE, ZYDIS_CPUFLAG_ACTION_NONE }, 0x0, 0x8D5, 0x0, 0x0 }
|
||||
};
|
||||
#endif
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @brief Defines the `ZydisISAExt` enum.
|
||||
* Defines the `ZydisISAExt` enum.
|
||||
*/
|
||||
typedef enum ZydisISAExt_
|
||||
{
|
||||
|
@ -7,12 +7,18 @@ typedef enum ZydisISAExt_
|
|||
ZYDIS_ISA_EXT_ADOX_ADCX,
|
||||
ZYDIS_ISA_EXT_AES,
|
||||
ZYDIS_ISA_EXT_AMD3DNOW,
|
||||
ZYDIS_ISA_EXT_AMD3DNOW_PREFETCH,
|
||||
ZYDIS_ISA_EXT_AMD_INVLPGB,
|
||||
ZYDIS_ISA_EXT_AMX_BF16,
|
||||
ZYDIS_ISA_EXT_AMX_INT8,
|
||||
ZYDIS_ISA_EXT_AMX_TILE,
|
||||
ZYDIS_ISA_EXT_AVX,
|
||||
ZYDIS_ISA_EXT_AVX2,
|
||||
ZYDIS_ISA_EXT_AVX2GATHER,
|
||||
ZYDIS_ISA_EXT_AVX512EVEX,
|
||||
ZYDIS_ISA_EXT_AVX512VEX,
|
||||
ZYDIS_ISA_EXT_AVXAES,
|
||||
ZYDIS_ISA_EXT_AVX_VNNI,
|
||||
ZYDIS_ISA_EXT_BASE,
|
||||
ZYDIS_ISA_EXT_BMI1,
|
||||
ZYDIS_ISA_EXT_BMI2,
|
||||
|
@ -27,12 +33,16 @@ typedef enum ZydisISAExt_
|
|||
ZYDIS_ISA_EXT_FMA,
|
||||
ZYDIS_ISA_EXT_FMA4,
|
||||
ZYDIS_ISA_EXT_GFNI,
|
||||
ZYDIS_ISA_EXT_HRESET,
|
||||
ZYDIS_ISA_EXT_INVPCID,
|
||||
ZYDIS_ISA_EXT_KEYLOCKER,
|
||||
ZYDIS_ISA_EXT_KEYLOCKER_WIDE,
|
||||
ZYDIS_ISA_EXT_KNC,
|
||||
ZYDIS_ISA_EXT_KNCE,
|
||||
ZYDIS_ISA_EXT_KNCV,
|
||||
ZYDIS_ISA_EXT_LONGMODE,
|
||||
ZYDIS_ISA_EXT_LZCNT,
|
||||
ZYDIS_ISA_EXT_MCOMMIT,
|
||||
ZYDIS_ISA_EXT_MMX,
|
||||
ZYDIS_ISA_EXT_MONITOR,
|
||||
ZYDIS_ISA_EXT_MONITORX,
|
||||
|
@ -53,11 +63,13 @@ typedef enum ZydisISAExt_
|
|||
ZYDIS_ISA_EXT_RDTSCP,
|
||||
ZYDIS_ISA_EXT_RDWRFSGS,
|
||||
ZYDIS_ISA_EXT_RTM,
|
||||
ZYDIS_ISA_EXT_SERIALIZE,
|
||||
ZYDIS_ISA_EXT_SGX,
|
||||
ZYDIS_ISA_EXT_SGX_ENCLV,
|
||||
ZYDIS_ISA_EXT_SHA,
|
||||
ZYDIS_ISA_EXT_SMAP,
|
||||
ZYDIS_ISA_EXT_SMX,
|
||||
ZYDIS_ISA_EXT_SNP,
|
||||
ZYDIS_ISA_EXT_SSE,
|
||||
ZYDIS_ISA_EXT_SSE2,
|
||||
ZYDIS_ISA_EXT_SSE3,
|
||||
|
@ -66,6 +78,9 @@ typedef enum ZydisISAExt_
|
|||
ZYDIS_ISA_EXT_SSSE3,
|
||||
ZYDIS_ISA_EXT_SVM,
|
||||
ZYDIS_ISA_EXT_TBM,
|
||||
ZYDIS_ISA_EXT_TDX,
|
||||
ZYDIS_ISA_EXT_TSX_LDTRK,
|
||||
ZYDIS_ISA_EXT_UINTR,
|
||||
ZYDIS_ISA_EXT_VAES,
|
||||
ZYDIS_ISA_EXT_VMFUNC,
|
||||
ZYDIS_ISA_EXT_VPCLMULQDQ,
|
||||
|
@ -79,11 +94,11 @@ typedef enum ZydisISAExt_
|
|||
ZYDIS_ISA_EXT_XSAVES,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_ISA_EXT_MAX_VALUE = ZYDIS_ISA_EXT_XSAVES,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_ISA_EXT_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_ISA_EXT_MAX_VALUE)
|
||||
} ZydisISAExt;
|
||||
|
|
|
@ -4,12 +4,18 @@ static const char* STR_ISAEXT[] =
|
|||
"ADOX_ADCX",
|
||||
"AES",
|
||||
"AMD3DNOW",
|
||||
"AMD3DNOW_PREFETCH",
|
||||
"AMD_INVLPGB",
|
||||
"AMX_BF16",
|
||||
"AMX_INT8",
|
||||
"AMX_TILE",
|
||||
"AVX",
|
||||
"AVX2",
|
||||
"AVX2GATHER",
|
||||
"AVX512EVEX",
|
||||
"AVX512VEX",
|
||||
"AVXAES",
|
||||
"AVX_VNNI",
|
||||
"BASE",
|
||||
"BMI1",
|
||||
"BMI2",
|
||||
|
@ -24,12 +30,16 @@ static const char* STR_ISAEXT[] =
|
|||
"FMA",
|
||||
"FMA4",
|
||||
"GFNI",
|
||||
"HRESET",
|
||||
"INVPCID",
|
||||
"KEYLOCKER",
|
||||
"KEYLOCKER_WIDE",
|
||||
"KNC",
|
||||
"KNCE",
|
||||
"KNCV",
|
||||
"LONGMODE",
|
||||
"LZCNT",
|
||||
"MCOMMIT",
|
||||
"MMX",
|
||||
"MONITOR",
|
||||
"MONITORX",
|
||||
|
@ -50,11 +60,13 @@ static const char* STR_ISAEXT[] =
|
|||
"RDTSCP",
|
||||
"RDWRFSGS",
|
||||
"RTM",
|
||||
"SERIALIZE",
|
||||
"SGX",
|
||||
"SGX_ENCLV",
|
||||
"SHA",
|
||||
"SMAP",
|
||||
"SMX",
|
||||
"SNP",
|
||||
"SSE",
|
||||
"SSE2",
|
||||
"SSE3",
|
||||
|
@ -63,6 +75,9 @@ static const char* STR_ISAEXT[] =
|
|||
"SSSE3",
|
||||
"SVM",
|
||||
"TBM",
|
||||
"TDX",
|
||||
"TSX_LDTRK",
|
||||
"UINTR",
|
||||
"VAES",
|
||||
"VMFUNC",
|
||||
"VPCLMULQDQ",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @brief Defines the `ZydisISASet` enum.
|
||||
* Defines the `ZydisISASet` enum.
|
||||
*/
|
||||
typedef enum ZydisISASet_
|
||||
{
|
||||
|
@ -8,6 +8,9 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_AES,
|
||||
ZYDIS_ISA_SET_AMD,
|
||||
ZYDIS_ISA_SET_AMD3DNOW,
|
||||
ZYDIS_ISA_SET_AMX_BF16,
|
||||
ZYDIS_ISA_SET_AMX_INT8,
|
||||
ZYDIS_ISA_SET_AMX_TILE,
|
||||
ZYDIS_ISA_SET_AVX,
|
||||
ZYDIS_ISA_SET_AVX2,
|
||||
ZYDIS_ISA_SET_AVX2GATHER,
|
||||
|
@ -43,6 +46,11 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_AVX512_BITALG_128,
|
||||
ZYDIS_ISA_SET_AVX512_BITALG_256,
|
||||
ZYDIS_ISA_SET_AVX512_BITALG_512,
|
||||
ZYDIS_ISA_SET_AVX512_FP16_128,
|
||||
ZYDIS_ISA_SET_AVX512_FP16_128N,
|
||||
ZYDIS_ISA_SET_AVX512_FP16_256,
|
||||
ZYDIS_ISA_SET_AVX512_FP16_512,
|
||||
ZYDIS_ISA_SET_AVX512_FP16_SCALAR,
|
||||
ZYDIS_ISA_SET_AVX512_GFNI_128,
|
||||
ZYDIS_ISA_SET_AVX512_GFNI_256,
|
||||
ZYDIS_ISA_SET_AVX512_GFNI_512,
|
||||
|
@ -72,6 +80,7 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_AVX512_VPOPCNTDQ_512,
|
||||
ZYDIS_ISA_SET_AVXAES,
|
||||
ZYDIS_ISA_SET_AVX_GFNI,
|
||||
ZYDIS_ISA_SET_AVX_VNNI,
|
||||
ZYDIS_ISA_SET_BMI1,
|
||||
ZYDIS_ISA_SET_BMI2,
|
||||
ZYDIS_ISA_SET_CET,
|
||||
|
@ -91,6 +100,7 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_FXSAVE,
|
||||
ZYDIS_ISA_SET_FXSAVE64,
|
||||
ZYDIS_ISA_SET_GFNI,
|
||||
ZYDIS_ISA_SET_HRESET,
|
||||
ZYDIS_ISA_SET_I186,
|
||||
ZYDIS_ISA_SET_I286PROTECTED,
|
||||
ZYDIS_ISA_SET_I286REAL,
|
||||
|
@ -99,6 +109,8 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_I486REAL,
|
||||
ZYDIS_ISA_SET_I86,
|
||||
ZYDIS_ISA_SET_INVPCID,
|
||||
ZYDIS_ISA_SET_KEYLOCKER,
|
||||
ZYDIS_ISA_SET_KEYLOCKER_WIDE,
|
||||
ZYDIS_ISA_SET_KNCE,
|
||||
ZYDIS_ISA_SET_KNCJKBR,
|
||||
ZYDIS_ISA_SET_KNCSTREAM,
|
||||
|
@ -107,7 +119,9 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_KNC_PF_HINT,
|
||||
ZYDIS_ISA_SET_LAHF,
|
||||
ZYDIS_ISA_SET_LONGMODE,
|
||||
ZYDIS_ISA_SET_LWP,
|
||||
ZYDIS_ISA_SET_LZCNT,
|
||||
ZYDIS_ISA_SET_MCOMMIT,
|
||||
ZYDIS_ISA_SET_MONITOR,
|
||||
ZYDIS_ISA_SET_MONITORX,
|
||||
ZYDIS_ISA_SET_MOVBE,
|
||||
|
@ -136,6 +150,7 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_RDTSCP,
|
||||
ZYDIS_ISA_SET_RDWRFSGS,
|
||||
ZYDIS_ISA_SET_RTM,
|
||||
ZYDIS_ISA_SET_SERIALIZE,
|
||||
ZYDIS_ISA_SET_SGX,
|
||||
ZYDIS_ISA_SET_SGX_ENCLV,
|
||||
ZYDIS_ISA_SET_SHA,
|
||||
|
@ -155,6 +170,9 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_SSSE3MMX,
|
||||
ZYDIS_ISA_SET_SVM,
|
||||
ZYDIS_ISA_SET_TBM,
|
||||
ZYDIS_ISA_SET_TDX,
|
||||
ZYDIS_ISA_SET_TSX_LDTRK,
|
||||
ZYDIS_ISA_SET_UINTR,
|
||||
ZYDIS_ISA_SET_VAES,
|
||||
ZYDIS_ISA_SET_VMFUNC,
|
||||
ZYDIS_ISA_SET_VPCLMULQDQ,
|
||||
|
@ -168,11 +186,11 @@ typedef enum ZydisISASet_
|
|||
ZYDIS_ISA_SET_XSAVES,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_ISA_SET_MAX_VALUE = ZYDIS_ISA_SET_XSAVES,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_ISA_SET_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_ISA_SET_MAX_VALUE)
|
||||
} ZydisISASet;
|
||||
|
|
|
@ -5,6 +5,9 @@ static const char* STR_ISASET[] =
|
|||
"AES",
|
||||
"AMD",
|
||||
"AMD3DNOW",
|
||||
"AMX_BF16",
|
||||
"AMX_INT8",
|
||||
"AMX_TILE",
|
||||
"AVX",
|
||||
"AVX2",
|
||||
"AVX2GATHER",
|
||||
|
@ -40,6 +43,11 @@ static const char* STR_ISASET[] =
|
|||
"AVX512_BITALG_128",
|
||||
"AVX512_BITALG_256",
|
||||
"AVX512_BITALG_512",
|
||||
"AVX512_FP16_128",
|
||||
"AVX512_FP16_128N",
|
||||
"AVX512_FP16_256",
|
||||
"AVX512_FP16_512",
|
||||
"AVX512_FP16_SCALAR",
|
||||
"AVX512_GFNI_128",
|
||||
"AVX512_GFNI_256",
|
||||
"AVX512_GFNI_512",
|
||||
|
@ -69,6 +77,7 @@ static const char* STR_ISASET[] =
|
|||
"AVX512_VPOPCNTDQ_512",
|
||||
"AVXAES",
|
||||
"AVX_GFNI",
|
||||
"AVX_VNNI",
|
||||
"BMI1",
|
||||
"BMI2",
|
||||
"CET",
|
||||
|
@ -88,6 +97,7 @@ static const char* STR_ISASET[] =
|
|||
"FXSAVE",
|
||||
"FXSAVE64",
|
||||
"GFNI",
|
||||
"HRESET",
|
||||
"I186",
|
||||
"I286PROTECTED",
|
||||
"I286REAL",
|
||||
|
@ -96,6 +106,8 @@ static const char* STR_ISASET[] =
|
|||
"I486REAL",
|
||||
"I86",
|
||||
"INVPCID",
|
||||
"KEYLOCKER",
|
||||
"KEYLOCKER_WIDE",
|
||||
"KNCE",
|
||||
"KNCJKBR",
|
||||
"KNCSTREAM",
|
||||
|
@ -104,7 +116,9 @@ static const char* STR_ISASET[] =
|
|||
"KNC_PF_HINT",
|
||||
"LAHF",
|
||||
"LONGMODE",
|
||||
"LWP",
|
||||
"LZCNT",
|
||||
"MCOMMIT",
|
||||
"MONITOR",
|
||||
"MONITORX",
|
||||
"MOVBE",
|
||||
|
@ -133,6 +147,7 @@ static const char* STR_ISASET[] =
|
|||
"RDTSCP",
|
||||
"RDWRFSGS",
|
||||
"RTM",
|
||||
"SERIALIZE",
|
||||
"SGX",
|
||||
"SGX_ENCLV",
|
||||
"SHA",
|
||||
|
@ -152,6 +167,9 @@ static const char* STR_ISASET[] =
|
|||
"SSSE3MMX",
|
||||
"SVM",
|
||||
"TBM",
|
||||
"TDX",
|
||||
"TSX_LDTRK",
|
||||
"UINTR",
|
||||
"VAES",
|
||||
"VMFUNC",
|
||||
"VPCLMULQDQ",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @brief Defines the `ZydisInstructionCategory` enum.
|
||||
* Defines the `ZydisInstructionCategory` enum.
|
||||
*/
|
||||
typedef enum ZydisInstructionCategory_
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ typedef enum ZydisInstructionCategory_
|
|||
ZYDIS_CATEGORY_ADOX_ADCX,
|
||||
ZYDIS_CATEGORY_AES,
|
||||
ZYDIS_CATEGORY_AMD3DNOW,
|
||||
ZYDIS_CATEGORY_AMX_TILE,
|
||||
ZYDIS_CATEGORY_AVX,
|
||||
ZYDIS_CATEGORY_AVX2,
|
||||
ZYDIS_CATEGORY_AVX2GATHER,
|
||||
|
@ -40,16 +41,21 @@ typedef enum ZydisInstructionCategory_
|
|||
ZYDIS_CATEGORY_FCMOV,
|
||||
ZYDIS_CATEGORY_FLAGOP,
|
||||
ZYDIS_CATEGORY_FMA4,
|
||||
ZYDIS_CATEGORY_FP16,
|
||||
ZYDIS_CATEGORY_GATHER,
|
||||
ZYDIS_CATEGORY_GFNI,
|
||||
ZYDIS_CATEGORY_HRESET,
|
||||
ZYDIS_CATEGORY_IFMA,
|
||||
ZYDIS_CATEGORY_INTERRUPT,
|
||||
ZYDIS_CATEGORY_IO,
|
||||
ZYDIS_CATEGORY_IOSTRINGOP,
|
||||
ZYDIS_CATEGORY_KEYLOCKER,
|
||||
ZYDIS_CATEGORY_KEYLOCKER_WIDE,
|
||||
ZYDIS_CATEGORY_KMASK,
|
||||
ZYDIS_CATEGORY_KNC,
|
||||
ZYDIS_CATEGORY_KNCMASK,
|
||||
ZYDIS_CATEGORY_KNCSCALAR,
|
||||
ZYDIS_CATEGORY_LEGACY,
|
||||
ZYDIS_CATEGORY_LOGICAL,
|
||||
ZYDIS_CATEGORY_LOGICAL_FP,
|
||||
ZYDIS_CATEGORY_LZCNT,
|
||||
|
@ -77,6 +83,7 @@ typedef enum ZydisInstructionCategory_
|
|||
ZYDIS_CATEGORY_SCATTER,
|
||||
ZYDIS_CATEGORY_SEGOP,
|
||||
ZYDIS_CATEGORY_SEMAPHORE,
|
||||
ZYDIS_CATEGORY_SERIALIZE,
|
||||
ZYDIS_CATEGORY_SETCC,
|
||||
ZYDIS_CATEGORY_SGX,
|
||||
ZYDIS_CATEGORY_SHA,
|
||||
|
@ -89,10 +96,13 @@ typedef enum ZydisInstructionCategory_
|
|||
ZYDIS_CATEGORY_SYSRET,
|
||||
ZYDIS_CATEGORY_SYSTEM,
|
||||
ZYDIS_CATEGORY_TBM,
|
||||
ZYDIS_CATEGORY_TSX_LDTRK,
|
||||
ZYDIS_CATEGORY_UFMA,
|
||||
ZYDIS_CATEGORY_UINTR,
|
||||
ZYDIS_CATEGORY_UNCOND_BR,
|
||||
ZYDIS_CATEGORY_VAES,
|
||||
ZYDIS_CATEGORY_VBMI2,
|
||||
ZYDIS_CATEGORY_VEX,
|
||||
ZYDIS_CATEGORY_VFMA,
|
||||
ZYDIS_CATEGORY_VPCLMULQDQ,
|
||||
ZYDIS_CATEGORY_VTX,
|
||||
|
@ -104,11 +114,11 @@ typedef enum ZydisInstructionCategory_
|
|||
ZYDIS_CATEGORY_XSAVEOPT,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_CATEGORY_MAX_VALUE = ZYDIS_CATEGORY_XSAVEOPT,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_CATEGORY_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_CATEGORY_MAX_VALUE)
|
||||
} ZydisInstructionCategory;
|
||||
|
|
|
@ -4,6 +4,7 @@ static const char* STR_INSTRUCTIONCATEGORY[] =
|
|||
"ADOX_ADCX",
|
||||
"AES",
|
||||
"AMD3DNOW",
|
||||
"AMX_TILE",
|
||||
"AVX",
|
||||
"AVX2",
|
||||
"AVX2GATHER",
|
||||
|
@ -37,16 +38,21 @@ static const char* STR_INSTRUCTIONCATEGORY[] =
|
|||
"FCMOV",
|
||||
"FLAGOP",
|
||||
"FMA4",
|
||||
"FP16",
|
||||
"GATHER",
|
||||
"GFNI",
|
||||
"HRESET",
|
||||
"IFMA",
|
||||
"INTERRUPT",
|
||||
"IO",
|
||||
"IOSTRINGOP",
|
||||
"KEYLOCKER",
|
||||
"KEYLOCKER_WIDE",
|
||||
"KMASK",
|
||||
"KNC",
|
||||
"KNCMASK",
|
||||
"KNCSCALAR",
|
||||
"LEGACY",
|
||||
"LOGICAL",
|
||||
"LOGICAL_FP",
|
||||
"LZCNT",
|
||||
|
@ -74,6 +80,7 @@ static const char* STR_INSTRUCTIONCATEGORY[] =
|
|||
"SCATTER",
|
||||
"SEGOP",
|
||||
"SEMAPHORE",
|
||||
"SERIALIZE",
|
||||
"SETCC",
|
||||
"SGX",
|
||||
"SHA",
|
||||
|
@ -86,10 +93,13 @@ static const char* STR_INSTRUCTIONCATEGORY[] =
|
|||
"SYSRET",
|
||||
"SYSTEM",
|
||||
"TBM",
|
||||
"TSX_LDTRK",
|
||||
"UFMA",
|
||||
"UINTR",
|
||||
"UNCOND_BR",
|
||||
"VAES",
|
||||
"VBMI2",
|
||||
"VEX",
|
||||
"VFMA",
|
||||
"VPCLMULQDQ",
|
||||
"VTX",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @brief Defines the `ZydisMnemonic` enum.
|
||||
* Defines the `ZydisMnemonic` enum.
|
||||
*/
|
||||
typedef enum ZydisMnemonic_
|
||||
{
|
||||
|
@ -19,9 +19,17 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_ADDSUBPS,
|
||||
ZYDIS_MNEMONIC_ADOX,
|
||||
ZYDIS_MNEMONIC_AESDEC,
|
||||
ZYDIS_MNEMONIC_AESDEC128KL,
|
||||
ZYDIS_MNEMONIC_AESDEC256KL,
|
||||
ZYDIS_MNEMONIC_AESDECLAST,
|
||||
ZYDIS_MNEMONIC_AESDECWIDE128KL,
|
||||
ZYDIS_MNEMONIC_AESDECWIDE256KL,
|
||||
ZYDIS_MNEMONIC_AESENC,
|
||||
ZYDIS_MNEMONIC_AESENC128KL,
|
||||
ZYDIS_MNEMONIC_AESENC256KL,
|
||||
ZYDIS_MNEMONIC_AESENCLAST,
|
||||
ZYDIS_MNEMONIC_AESENCWIDE128KL,
|
||||
ZYDIS_MNEMONIC_AESENCWIDE256KL,
|
||||
ZYDIS_MNEMONIC_AESIMC,
|
||||
ZYDIS_MNEMONIC_AESKEYGENASSIST,
|
||||
ZYDIS_MNEMONIC_AND,
|
||||
|
@ -78,6 +86,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_CLI,
|
||||
ZYDIS_MNEMONIC_CLRSSBSY,
|
||||
ZYDIS_MNEMONIC_CLTS,
|
||||
ZYDIS_MNEMONIC_CLUI,
|
||||
ZYDIS_MNEMONIC_CLWB,
|
||||
ZYDIS_MNEMONIC_CLZERO,
|
||||
ZYDIS_MNEMONIC_CMC,
|
||||
|
@ -152,6 +161,8 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_ENCLS,
|
||||
ZYDIS_MNEMONIC_ENCLU,
|
||||
ZYDIS_MNEMONIC_ENCLV,
|
||||
ZYDIS_MNEMONIC_ENCODEKEY128,
|
||||
ZYDIS_MNEMONIC_ENCODEKEY256,
|
||||
ZYDIS_MNEMONIC_ENDBR32,
|
||||
ZYDIS_MNEMONIC_ENDBR64,
|
||||
ZYDIS_MNEMONIC_ENQCMD,
|
||||
|
@ -263,6 +274,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_HADDPD,
|
||||
ZYDIS_MNEMONIC_HADDPS,
|
||||
ZYDIS_MNEMONIC_HLT,
|
||||
ZYDIS_MNEMONIC_HRESET,
|
||||
ZYDIS_MNEMONIC_HSUBPD,
|
||||
ZYDIS_MNEMONIC_HSUBPS,
|
||||
ZYDIS_MNEMONIC_IDIV,
|
||||
|
@ -284,6 +296,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_INVEPT,
|
||||
ZYDIS_MNEMONIC_INVLPG,
|
||||
ZYDIS_MNEMONIC_INVLPGA,
|
||||
ZYDIS_MNEMONIC_INVLPGB,
|
||||
ZYDIS_MNEMONIC_INVPCID,
|
||||
ZYDIS_MNEMONIC_INVVPID,
|
||||
ZYDIS_MNEMONIC_IRET,
|
||||
|
@ -381,6 +394,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_LDDQU,
|
||||
ZYDIS_MNEMONIC_LDMXCSR,
|
||||
ZYDIS_MNEMONIC_LDS,
|
||||
ZYDIS_MNEMONIC_LDTILECFG,
|
||||
ZYDIS_MNEMONIC_LEA,
|
||||
ZYDIS_MNEMONIC_LEAVE,
|
||||
ZYDIS_MNEMONIC_LES,
|
||||
|
@ -392,6 +406,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_LLDT,
|
||||
ZYDIS_MNEMONIC_LLWPCB,
|
||||
ZYDIS_MNEMONIC_LMSW,
|
||||
ZYDIS_MNEMONIC_LOADIWKEY,
|
||||
ZYDIS_MNEMONIC_LODSB,
|
||||
ZYDIS_MNEMONIC_LODSD,
|
||||
ZYDIS_MNEMONIC_LODSQ,
|
||||
|
@ -411,6 +426,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_MAXPS,
|
||||
ZYDIS_MNEMONIC_MAXSD,
|
||||
ZYDIS_MNEMONIC_MAXSS,
|
||||
ZYDIS_MNEMONIC_MCOMMIT,
|
||||
ZYDIS_MNEMONIC_MFENCE,
|
||||
ZYDIS_MNEMONIC_MINPD,
|
||||
ZYDIS_MNEMONIC_MINPS,
|
||||
|
@ -618,6 +634,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_PSLLDQ,
|
||||
ZYDIS_MNEMONIC_PSLLQ,
|
||||
ZYDIS_MNEMONIC_PSLLW,
|
||||
ZYDIS_MNEMONIC_PSMASH,
|
||||
ZYDIS_MNEMONIC_PSRAD,
|
||||
ZYDIS_MNEMONIC_PSRAW,
|
||||
ZYDIS_MNEMONIC_PSRLD,
|
||||
|
@ -649,6 +666,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_PUSHF,
|
||||
ZYDIS_MNEMONIC_PUSHFD,
|
||||
ZYDIS_MNEMONIC_PUSHFQ,
|
||||
ZYDIS_MNEMONIC_PVALIDATE,
|
||||
ZYDIS_MNEMONIC_PXOR,
|
||||
ZYDIS_MNEMONIC_RCL,
|
||||
ZYDIS_MNEMONIC_RCPPS,
|
||||
|
@ -668,6 +686,8 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_RDTSC,
|
||||
ZYDIS_MNEMONIC_RDTSCP,
|
||||
ZYDIS_MNEMONIC_RET,
|
||||
ZYDIS_MNEMONIC_RMPADJUST,
|
||||
ZYDIS_MNEMONIC_RMPUPDATE,
|
||||
ZYDIS_MNEMONIC_ROL,
|
||||
ZYDIS_MNEMONIC_ROR,
|
||||
ZYDIS_MNEMONIC_RORX,
|
||||
|
@ -689,6 +709,11 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_SCASD,
|
||||
ZYDIS_MNEMONIC_SCASQ,
|
||||
ZYDIS_MNEMONIC_SCASW,
|
||||
ZYDIS_MNEMONIC_SEAMCALL,
|
||||
ZYDIS_MNEMONIC_SEAMOPS,
|
||||
ZYDIS_MNEMONIC_SEAMRET,
|
||||
ZYDIS_MNEMONIC_SENDUIPI,
|
||||
ZYDIS_MNEMONIC_SERIALIZE,
|
||||
ZYDIS_MNEMONIC_SETB,
|
||||
ZYDIS_MNEMONIC_SETBE,
|
||||
ZYDIS_MNEMONIC_SETL,
|
||||
|
@ -744,6 +769,8 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_STOSQ,
|
||||
ZYDIS_MNEMONIC_STOSW,
|
||||
ZYDIS_MNEMONIC_STR,
|
||||
ZYDIS_MNEMONIC_STTILECFG,
|
||||
ZYDIS_MNEMONIC_STUI,
|
||||
ZYDIS_MNEMONIC_SUB,
|
||||
ZYDIS_MNEMONIC_SUBPD,
|
||||
ZYDIS_MNEMONIC_SUBPS,
|
||||
|
@ -755,7 +782,20 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_SYSEXIT,
|
||||
ZYDIS_MNEMONIC_SYSRET,
|
||||
ZYDIS_MNEMONIC_T1MSKC,
|
||||
ZYDIS_MNEMONIC_TDCALL,
|
||||
ZYDIS_MNEMONIC_TDPBF16PS,
|
||||
ZYDIS_MNEMONIC_TDPBSSD,
|
||||
ZYDIS_MNEMONIC_TDPBSUD,
|
||||
ZYDIS_MNEMONIC_TDPBUSD,
|
||||
ZYDIS_MNEMONIC_TDPBUUD,
|
||||
ZYDIS_MNEMONIC_TEST,
|
||||
ZYDIS_MNEMONIC_TESTUI,
|
||||
ZYDIS_MNEMONIC_TILELOADD,
|
||||
ZYDIS_MNEMONIC_TILELOADDT1,
|
||||
ZYDIS_MNEMONIC_TILERELEASE,
|
||||
ZYDIS_MNEMONIC_TILESTORED,
|
||||
ZYDIS_MNEMONIC_TILEZERO,
|
||||
ZYDIS_MNEMONIC_TLBSYNC,
|
||||
ZYDIS_MNEMONIC_TPAUSE,
|
||||
ZYDIS_MNEMONIC_TZCNT,
|
||||
ZYDIS_MNEMONIC_TZCNTI,
|
||||
|
@ -765,6 +805,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_UD0,
|
||||
ZYDIS_MNEMONIC_UD1,
|
||||
ZYDIS_MNEMONIC_UD2,
|
||||
ZYDIS_MNEMONIC_UIRET,
|
||||
ZYDIS_MNEMONIC_UMONITOR,
|
||||
ZYDIS_MNEMONIC_UMWAIT,
|
||||
ZYDIS_MNEMONIC_UNPCKHPD,
|
||||
|
@ -778,9 +819,11 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VADDNPD,
|
||||
ZYDIS_MNEMONIC_VADDNPS,
|
||||
ZYDIS_MNEMONIC_VADDPD,
|
||||
ZYDIS_MNEMONIC_VADDPH,
|
||||
ZYDIS_MNEMONIC_VADDPS,
|
||||
ZYDIS_MNEMONIC_VADDSD,
|
||||
ZYDIS_MNEMONIC_VADDSETSPS,
|
||||
ZYDIS_MNEMONIC_VADDSH,
|
||||
ZYDIS_MNEMONIC_VADDSS,
|
||||
ZYDIS_MNEMONIC_VADDSUBPD,
|
||||
ZYDIS_MNEMONIC_VADDSUBPS,
|
||||
|
@ -817,14 +860,18 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VBROADCASTSD,
|
||||
ZYDIS_MNEMONIC_VBROADCASTSS,
|
||||
ZYDIS_MNEMONIC_VCMPPD,
|
||||
ZYDIS_MNEMONIC_VCMPPH,
|
||||
ZYDIS_MNEMONIC_VCMPPS,
|
||||
ZYDIS_MNEMONIC_VCMPSD,
|
||||
ZYDIS_MNEMONIC_VCMPSH,
|
||||
ZYDIS_MNEMONIC_VCMPSS,
|
||||
ZYDIS_MNEMONIC_VCOMISD,
|
||||
ZYDIS_MNEMONIC_VCOMISH,
|
||||
ZYDIS_MNEMONIC_VCOMISS,
|
||||
ZYDIS_MNEMONIC_VCOMPRESSPD,
|
||||
ZYDIS_MNEMONIC_VCOMPRESSPS,
|
||||
ZYDIS_MNEMONIC_VCVTDQ2PD,
|
||||
ZYDIS_MNEMONIC_VCVTDQ2PH,
|
||||
ZYDIS_MNEMONIC_VCVTDQ2PS,
|
||||
ZYDIS_MNEMONIC_VCVTFXPNTDQ2PS,
|
||||
ZYDIS_MNEMONIC_VCVTFXPNTPD2DQ,
|
||||
|
@ -835,49 +882,82 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VCVTNE2PS2BF16,
|
||||
ZYDIS_MNEMONIC_VCVTNEPS2BF16,
|
||||
ZYDIS_MNEMONIC_VCVTPD2DQ,
|
||||
ZYDIS_MNEMONIC_VCVTPD2PH,
|
||||
ZYDIS_MNEMONIC_VCVTPD2PS,
|
||||
ZYDIS_MNEMONIC_VCVTPD2QQ,
|
||||
ZYDIS_MNEMONIC_VCVTPD2UDQ,
|
||||
ZYDIS_MNEMONIC_VCVTPD2UQQ,
|
||||
ZYDIS_MNEMONIC_VCVTPH2DQ,
|
||||
ZYDIS_MNEMONIC_VCVTPH2PD,
|
||||
ZYDIS_MNEMONIC_VCVTPH2PS,
|
||||
ZYDIS_MNEMONIC_VCVTPH2PSX,
|
||||
ZYDIS_MNEMONIC_VCVTPH2QQ,
|
||||
ZYDIS_MNEMONIC_VCVTPH2UDQ,
|
||||
ZYDIS_MNEMONIC_VCVTPH2UQQ,
|
||||
ZYDIS_MNEMONIC_VCVTPH2UW,
|
||||
ZYDIS_MNEMONIC_VCVTPH2W,
|
||||
ZYDIS_MNEMONIC_VCVTPS2DQ,
|
||||
ZYDIS_MNEMONIC_VCVTPS2PD,
|
||||
ZYDIS_MNEMONIC_VCVTPS2PH,
|
||||
ZYDIS_MNEMONIC_VCVTPS2PHX,
|
||||
ZYDIS_MNEMONIC_VCVTPS2QQ,
|
||||
ZYDIS_MNEMONIC_VCVTPS2UDQ,
|
||||
ZYDIS_MNEMONIC_VCVTPS2UQQ,
|
||||
ZYDIS_MNEMONIC_VCVTQQ2PD,
|
||||
ZYDIS_MNEMONIC_VCVTQQ2PH,
|
||||
ZYDIS_MNEMONIC_VCVTQQ2PS,
|
||||
ZYDIS_MNEMONIC_VCVTSD2SH,
|
||||
ZYDIS_MNEMONIC_VCVTSD2SI,
|
||||
ZYDIS_MNEMONIC_VCVTSD2SS,
|
||||
ZYDIS_MNEMONIC_VCVTSD2USI,
|
||||
ZYDIS_MNEMONIC_VCVTSH2SD,
|
||||
ZYDIS_MNEMONIC_VCVTSH2SI,
|
||||
ZYDIS_MNEMONIC_VCVTSH2SS,
|
||||
ZYDIS_MNEMONIC_VCVTSH2USI,
|
||||
ZYDIS_MNEMONIC_VCVTSI2SD,
|
||||
ZYDIS_MNEMONIC_VCVTSI2SH,
|
||||
ZYDIS_MNEMONIC_VCVTSI2SS,
|
||||
ZYDIS_MNEMONIC_VCVTSS2SD,
|
||||
ZYDIS_MNEMONIC_VCVTSS2SH,
|
||||
ZYDIS_MNEMONIC_VCVTSS2SI,
|
||||
ZYDIS_MNEMONIC_VCVTSS2USI,
|
||||
ZYDIS_MNEMONIC_VCVTTPD2DQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPD2QQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPD2UDQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPD2UQQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPH2DQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPH2QQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPH2UDQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPH2UQQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPH2UW,
|
||||
ZYDIS_MNEMONIC_VCVTTPH2W,
|
||||
ZYDIS_MNEMONIC_VCVTTPS2DQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPS2QQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPS2UDQ,
|
||||
ZYDIS_MNEMONIC_VCVTTPS2UQQ,
|
||||
ZYDIS_MNEMONIC_VCVTTSD2SI,
|
||||
ZYDIS_MNEMONIC_VCVTTSD2USI,
|
||||
ZYDIS_MNEMONIC_VCVTTSH2SI,
|
||||
ZYDIS_MNEMONIC_VCVTTSH2USI,
|
||||
ZYDIS_MNEMONIC_VCVTTSS2SI,
|
||||
ZYDIS_MNEMONIC_VCVTTSS2USI,
|
||||
ZYDIS_MNEMONIC_VCVTUDQ2PD,
|
||||
ZYDIS_MNEMONIC_VCVTUDQ2PH,
|
||||
ZYDIS_MNEMONIC_VCVTUDQ2PS,
|
||||
ZYDIS_MNEMONIC_VCVTUQQ2PD,
|
||||
ZYDIS_MNEMONIC_VCVTUQQ2PH,
|
||||
ZYDIS_MNEMONIC_VCVTUQQ2PS,
|
||||
ZYDIS_MNEMONIC_VCVTUSI2SD,
|
||||
ZYDIS_MNEMONIC_VCVTUSI2SH,
|
||||
ZYDIS_MNEMONIC_VCVTUSI2SS,
|
||||
ZYDIS_MNEMONIC_VCVTUW2PH,
|
||||
ZYDIS_MNEMONIC_VCVTW2PH,
|
||||
ZYDIS_MNEMONIC_VDBPSADBW,
|
||||
ZYDIS_MNEMONIC_VDIVPD,
|
||||
ZYDIS_MNEMONIC_VDIVPH,
|
||||
ZYDIS_MNEMONIC_VDIVPS,
|
||||
ZYDIS_MNEMONIC_VDIVSD,
|
||||
ZYDIS_MNEMONIC_VDIVSH,
|
||||
ZYDIS_MNEMONIC_VDIVSS,
|
||||
ZYDIS_MNEMONIC_VDPBF16PS,
|
||||
ZYDIS_MNEMONIC_VDPPD,
|
||||
|
@ -900,6 +980,10 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VEXTRACTI64X2,
|
||||
ZYDIS_MNEMONIC_VEXTRACTI64X4,
|
||||
ZYDIS_MNEMONIC_VEXTRACTPS,
|
||||
ZYDIS_MNEMONIC_VFCMADDCPH,
|
||||
ZYDIS_MNEMONIC_VFCMADDCSH,
|
||||
ZYDIS_MNEMONIC_VFCMULCPH,
|
||||
ZYDIS_MNEMONIC_VFCMULCSH,
|
||||
ZYDIS_MNEMONIC_VFIXUPIMMPD,
|
||||
ZYDIS_MNEMONIC_VFIXUPIMMPS,
|
||||
ZYDIS_MNEMONIC_VFIXUPIMMSD,
|
||||
|
@ -907,47 +991,67 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VFIXUPNANPD,
|
||||
ZYDIS_MNEMONIC_VFIXUPNANPS,
|
||||
ZYDIS_MNEMONIC_VFMADD132PD,
|
||||
ZYDIS_MNEMONIC_VFMADD132PH,
|
||||
ZYDIS_MNEMONIC_VFMADD132PS,
|
||||
ZYDIS_MNEMONIC_VFMADD132SD,
|
||||
ZYDIS_MNEMONIC_VFMADD132SH,
|
||||
ZYDIS_MNEMONIC_VFMADD132SS,
|
||||
ZYDIS_MNEMONIC_VFMADD213PD,
|
||||
ZYDIS_MNEMONIC_VFMADD213PH,
|
||||
ZYDIS_MNEMONIC_VFMADD213PS,
|
||||
ZYDIS_MNEMONIC_VFMADD213SD,
|
||||
ZYDIS_MNEMONIC_VFMADD213SH,
|
||||
ZYDIS_MNEMONIC_VFMADD213SS,
|
||||
ZYDIS_MNEMONIC_VFMADD231PD,
|
||||
ZYDIS_MNEMONIC_VFMADD231PH,
|
||||
ZYDIS_MNEMONIC_VFMADD231PS,
|
||||
ZYDIS_MNEMONIC_VFMADD231SD,
|
||||
ZYDIS_MNEMONIC_VFMADD231SH,
|
||||
ZYDIS_MNEMONIC_VFMADD231SS,
|
||||
ZYDIS_MNEMONIC_VFMADD233PS,
|
||||
ZYDIS_MNEMONIC_VFMADDCPH,
|
||||
ZYDIS_MNEMONIC_VFMADDCSH,
|
||||
ZYDIS_MNEMONIC_VFMADDPD,
|
||||
ZYDIS_MNEMONIC_VFMADDPS,
|
||||
ZYDIS_MNEMONIC_VFMADDSD,
|
||||
ZYDIS_MNEMONIC_VFMADDSS,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB132PD,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB132PH,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB132PS,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB213PD,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB213PH,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB213PS,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB231PD,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB231PH,
|
||||
ZYDIS_MNEMONIC_VFMADDSUB231PS,
|
||||
ZYDIS_MNEMONIC_VFMADDSUBPD,
|
||||
ZYDIS_MNEMONIC_VFMADDSUBPS,
|
||||
ZYDIS_MNEMONIC_VFMSUB132PD,
|
||||
ZYDIS_MNEMONIC_VFMSUB132PH,
|
||||
ZYDIS_MNEMONIC_VFMSUB132PS,
|
||||
ZYDIS_MNEMONIC_VFMSUB132SD,
|
||||
ZYDIS_MNEMONIC_VFMSUB132SH,
|
||||
ZYDIS_MNEMONIC_VFMSUB132SS,
|
||||
ZYDIS_MNEMONIC_VFMSUB213PD,
|
||||
ZYDIS_MNEMONIC_VFMSUB213PH,
|
||||
ZYDIS_MNEMONIC_VFMSUB213PS,
|
||||
ZYDIS_MNEMONIC_VFMSUB213SD,
|
||||
ZYDIS_MNEMONIC_VFMSUB213SH,
|
||||
ZYDIS_MNEMONIC_VFMSUB213SS,
|
||||
ZYDIS_MNEMONIC_VFMSUB231PD,
|
||||
ZYDIS_MNEMONIC_VFMSUB231PH,
|
||||
ZYDIS_MNEMONIC_VFMSUB231PS,
|
||||
ZYDIS_MNEMONIC_VFMSUB231SD,
|
||||
ZYDIS_MNEMONIC_VFMSUB231SH,
|
||||
ZYDIS_MNEMONIC_VFMSUB231SS,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD132PD,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD132PH,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD132PS,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD213PD,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD213PH,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD213PS,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD231PD,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD231PH,
|
||||
ZYDIS_MNEMONIC_VFMSUBADD231PS,
|
||||
ZYDIS_MNEMONIC_VFMSUBADDPD,
|
||||
ZYDIS_MNEMONIC_VFMSUBADDPS,
|
||||
|
@ -955,41 +1059,57 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VFMSUBPS,
|
||||
ZYDIS_MNEMONIC_VFMSUBSD,
|
||||
ZYDIS_MNEMONIC_VFMSUBSS,
|
||||
ZYDIS_MNEMONIC_VFMULCPH,
|
||||
ZYDIS_MNEMONIC_VFMULCSH,
|
||||
ZYDIS_MNEMONIC_VFNMADD132PD,
|
||||
ZYDIS_MNEMONIC_VFNMADD132PH,
|
||||
ZYDIS_MNEMONIC_VFNMADD132PS,
|
||||
ZYDIS_MNEMONIC_VFNMADD132SD,
|
||||
ZYDIS_MNEMONIC_VFNMADD132SH,
|
||||
ZYDIS_MNEMONIC_VFNMADD132SS,
|
||||
ZYDIS_MNEMONIC_VFNMADD213PD,
|
||||
ZYDIS_MNEMONIC_VFNMADD213PH,
|
||||
ZYDIS_MNEMONIC_VFNMADD213PS,
|
||||
ZYDIS_MNEMONIC_VFNMADD213SD,
|
||||
ZYDIS_MNEMONIC_VFNMADD213SH,
|
||||
ZYDIS_MNEMONIC_VFNMADD213SS,
|
||||
ZYDIS_MNEMONIC_VFNMADD231PD,
|
||||
ZYDIS_MNEMONIC_VFNMADD231PH,
|
||||
ZYDIS_MNEMONIC_VFNMADD231PS,
|
||||
ZYDIS_MNEMONIC_VFNMADD231SD,
|
||||
ZYDIS_MNEMONIC_VFNMADD231SH,
|
||||
ZYDIS_MNEMONIC_VFNMADD231SS,
|
||||
ZYDIS_MNEMONIC_VFNMADDPD,
|
||||
ZYDIS_MNEMONIC_VFNMADDPS,
|
||||
ZYDIS_MNEMONIC_VFNMADDSD,
|
||||
ZYDIS_MNEMONIC_VFNMADDSS,
|
||||
ZYDIS_MNEMONIC_VFNMSUB132PD,
|
||||
ZYDIS_MNEMONIC_VFNMSUB132PH,
|
||||
ZYDIS_MNEMONIC_VFNMSUB132PS,
|
||||
ZYDIS_MNEMONIC_VFNMSUB132SD,
|
||||
ZYDIS_MNEMONIC_VFNMSUB132SH,
|
||||
ZYDIS_MNEMONIC_VFNMSUB132SS,
|
||||
ZYDIS_MNEMONIC_VFNMSUB213PD,
|
||||
ZYDIS_MNEMONIC_VFNMSUB213PH,
|
||||
ZYDIS_MNEMONIC_VFNMSUB213PS,
|
||||
ZYDIS_MNEMONIC_VFNMSUB213SD,
|
||||
ZYDIS_MNEMONIC_VFNMSUB213SH,
|
||||
ZYDIS_MNEMONIC_VFNMSUB213SS,
|
||||
ZYDIS_MNEMONIC_VFNMSUB231PD,
|
||||
ZYDIS_MNEMONIC_VFNMSUB231PH,
|
||||
ZYDIS_MNEMONIC_VFNMSUB231PS,
|
||||
ZYDIS_MNEMONIC_VFNMSUB231SD,
|
||||
ZYDIS_MNEMONIC_VFNMSUB231SH,
|
||||
ZYDIS_MNEMONIC_VFNMSUB231SS,
|
||||
ZYDIS_MNEMONIC_VFNMSUBPD,
|
||||
ZYDIS_MNEMONIC_VFNMSUBPS,
|
||||
ZYDIS_MNEMONIC_VFNMSUBSD,
|
||||
ZYDIS_MNEMONIC_VFNMSUBSS,
|
||||
ZYDIS_MNEMONIC_VFPCLASSPD,
|
||||
ZYDIS_MNEMONIC_VFPCLASSPH,
|
||||
ZYDIS_MNEMONIC_VFPCLASSPS,
|
||||
ZYDIS_MNEMONIC_VFPCLASSSD,
|
||||
ZYDIS_MNEMONIC_VFPCLASSSH,
|
||||
ZYDIS_MNEMONIC_VFPCLASSSS,
|
||||
ZYDIS_MNEMONIC_VFRCZPD,
|
||||
ZYDIS_MNEMONIC_VFRCZPS,
|
||||
|
@ -1010,12 +1130,16 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VGATHERQPD,
|
||||
ZYDIS_MNEMONIC_VGATHERQPS,
|
||||
ZYDIS_MNEMONIC_VGETEXPPD,
|
||||
ZYDIS_MNEMONIC_VGETEXPPH,
|
||||
ZYDIS_MNEMONIC_VGETEXPPS,
|
||||
ZYDIS_MNEMONIC_VGETEXPSD,
|
||||
ZYDIS_MNEMONIC_VGETEXPSH,
|
||||
ZYDIS_MNEMONIC_VGETEXPSS,
|
||||
ZYDIS_MNEMONIC_VGETMANTPD,
|
||||
ZYDIS_MNEMONIC_VGETMANTPH,
|
||||
ZYDIS_MNEMONIC_VGETMANTPS,
|
||||
ZYDIS_MNEMONIC_VGETMANTSD,
|
||||
ZYDIS_MNEMONIC_VGETMANTSH,
|
||||
ZYDIS_MNEMONIC_VGETMANTSS,
|
||||
ZYDIS_MNEMONIC_VGF2P8AFFINEINVQB,
|
||||
ZYDIS_MNEMONIC_VGF2P8AFFINEQB,
|
||||
|
@ -1055,15 +1179,19 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VMASKMOVPD,
|
||||
ZYDIS_MNEMONIC_VMASKMOVPS,
|
||||
ZYDIS_MNEMONIC_VMAXPD,
|
||||
ZYDIS_MNEMONIC_VMAXPH,
|
||||
ZYDIS_MNEMONIC_VMAXPS,
|
||||
ZYDIS_MNEMONIC_VMAXSD,
|
||||
ZYDIS_MNEMONIC_VMAXSH,
|
||||
ZYDIS_MNEMONIC_VMAXSS,
|
||||
ZYDIS_MNEMONIC_VMCALL,
|
||||
ZYDIS_MNEMONIC_VMCLEAR,
|
||||
ZYDIS_MNEMONIC_VMFUNC,
|
||||
ZYDIS_MNEMONIC_VMINPD,
|
||||
ZYDIS_MNEMONIC_VMINPH,
|
||||
ZYDIS_MNEMONIC_VMINPS,
|
||||
ZYDIS_MNEMONIC_VMINSD,
|
||||
ZYDIS_MNEMONIC_VMINSH,
|
||||
ZYDIS_MNEMONIC_VMINSS,
|
||||
ZYDIS_MNEMONIC_VMLAUNCH,
|
||||
ZYDIS_MNEMONIC_VMLOAD,
|
||||
|
@ -1098,11 +1226,13 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VMOVNTPS,
|
||||
ZYDIS_MNEMONIC_VMOVQ,
|
||||
ZYDIS_MNEMONIC_VMOVSD,
|
||||
ZYDIS_MNEMONIC_VMOVSH,
|
||||
ZYDIS_MNEMONIC_VMOVSHDUP,
|
||||
ZYDIS_MNEMONIC_VMOVSLDUP,
|
||||
ZYDIS_MNEMONIC_VMOVSS,
|
||||
ZYDIS_MNEMONIC_VMOVUPD,
|
||||
ZYDIS_MNEMONIC_VMOVUPS,
|
||||
ZYDIS_MNEMONIC_VMOVW,
|
||||
ZYDIS_MNEMONIC_VMPSADBW,
|
||||
ZYDIS_MNEMONIC_VMPTRLD,
|
||||
ZYDIS_MNEMONIC_VMPTRST,
|
||||
|
@ -1111,8 +1241,10 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VMRUN,
|
||||
ZYDIS_MNEMONIC_VMSAVE,
|
||||
ZYDIS_MNEMONIC_VMULPD,
|
||||
ZYDIS_MNEMONIC_VMULPH,
|
||||
ZYDIS_MNEMONIC_VMULPS,
|
||||
ZYDIS_MNEMONIC_VMULSD,
|
||||
ZYDIS_MNEMONIC_VMULSH,
|
||||
ZYDIS_MNEMONIC_VMULSS,
|
||||
ZYDIS_MNEMONIC_VMWRITE,
|
||||
ZYDIS_MNEMONIC_VMXOFF,
|
||||
|
@ -1493,17 +1625,23 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VRCP28PS,
|
||||
ZYDIS_MNEMONIC_VRCP28SD,
|
||||
ZYDIS_MNEMONIC_VRCP28SS,
|
||||
ZYDIS_MNEMONIC_VRCPPH,
|
||||
ZYDIS_MNEMONIC_VRCPPS,
|
||||
ZYDIS_MNEMONIC_VRCPSH,
|
||||
ZYDIS_MNEMONIC_VRCPSS,
|
||||
ZYDIS_MNEMONIC_VREDUCEPD,
|
||||
ZYDIS_MNEMONIC_VREDUCEPH,
|
||||
ZYDIS_MNEMONIC_VREDUCEPS,
|
||||
ZYDIS_MNEMONIC_VREDUCESD,
|
||||
ZYDIS_MNEMONIC_VREDUCESH,
|
||||
ZYDIS_MNEMONIC_VREDUCESS,
|
||||
ZYDIS_MNEMONIC_VRNDFXPNTPD,
|
||||
ZYDIS_MNEMONIC_VRNDFXPNTPS,
|
||||
ZYDIS_MNEMONIC_VRNDSCALEPD,
|
||||
ZYDIS_MNEMONIC_VRNDSCALEPH,
|
||||
ZYDIS_MNEMONIC_VRNDSCALEPS,
|
||||
ZYDIS_MNEMONIC_VRNDSCALESD,
|
||||
ZYDIS_MNEMONIC_VRNDSCALESH,
|
||||
ZYDIS_MNEMONIC_VRNDSCALESS,
|
||||
ZYDIS_MNEMONIC_VROUNDPD,
|
||||
ZYDIS_MNEMONIC_VROUNDPS,
|
||||
|
@ -1518,11 +1656,15 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VRSQRT28PS,
|
||||
ZYDIS_MNEMONIC_VRSQRT28SD,
|
||||
ZYDIS_MNEMONIC_VRSQRT28SS,
|
||||
ZYDIS_MNEMONIC_VRSQRTPH,
|
||||
ZYDIS_MNEMONIC_VRSQRTPS,
|
||||
ZYDIS_MNEMONIC_VRSQRTSH,
|
||||
ZYDIS_MNEMONIC_VRSQRTSS,
|
||||
ZYDIS_MNEMONIC_VSCALEFPD,
|
||||
ZYDIS_MNEMONIC_VSCALEFPH,
|
||||
ZYDIS_MNEMONIC_VSCALEFPS,
|
||||
ZYDIS_MNEMONIC_VSCALEFSD,
|
||||
ZYDIS_MNEMONIC_VSCALEFSH,
|
||||
ZYDIS_MNEMONIC_VSCALEFSS,
|
||||
ZYDIS_MNEMONIC_VSCALEPS,
|
||||
ZYDIS_MNEMONIC_VSCATTERDPD,
|
||||
|
@ -1546,19 +1688,24 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_VSHUFPD,
|
||||
ZYDIS_MNEMONIC_VSHUFPS,
|
||||
ZYDIS_MNEMONIC_VSQRTPD,
|
||||
ZYDIS_MNEMONIC_VSQRTPH,
|
||||
ZYDIS_MNEMONIC_VSQRTPS,
|
||||
ZYDIS_MNEMONIC_VSQRTSD,
|
||||
ZYDIS_MNEMONIC_VSQRTSH,
|
||||
ZYDIS_MNEMONIC_VSQRTSS,
|
||||
ZYDIS_MNEMONIC_VSTMXCSR,
|
||||
ZYDIS_MNEMONIC_VSUBPD,
|
||||
ZYDIS_MNEMONIC_VSUBPH,
|
||||
ZYDIS_MNEMONIC_VSUBPS,
|
||||
ZYDIS_MNEMONIC_VSUBRPD,
|
||||
ZYDIS_MNEMONIC_VSUBRPS,
|
||||
ZYDIS_MNEMONIC_VSUBSD,
|
||||
ZYDIS_MNEMONIC_VSUBSH,
|
||||
ZYDIS_MNEMONIC_VSUBSS,
|
||||
ZYDIS_MNEMONIC_VTESTPD,
|
||||
ZYDIS_MNEMONIC_VTESTPS,
|
||||
ZYDIS_MNEMONIC_VUCOMISD,
|
||||
ZYDIS_MNEMONIC_VUCOMISH,
|
||||
ZYDIS_MNEMONIC_VUCOMISS,
|
||||
ZYDIS_MNEMONIC_VUNPCKHPD,
|
||||
ZYDIS_MNEMONIC_VUNPCKHPS,
|
||||
|
@ -1592,6 +1739,7 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_XOR,
|
||||
ZYDIS_MNEMONIC_XORPD,
|
||||
ZYDIS_MNEMONIC_XORPS,
|
||||
ZYDIS_MNEMONIC_XRESLDTRK,
|
||||
ZYDIS_MNEMONIC_XRSTOR,
|
||||
ZYDIS_MNEMONIC_XRSTOR64,
|
||||
ZYDIS_MNEMONIC_XRSTORS,
|
||||
|
@ -1608,14 +1756,15 @@ typedef enum ZydisMnemonic_
|
|||
ZYDIS_MNEMONIC_XSHA1,
|
||||
ZYDIS_MNEMONIC_XSHA256,
|
||||
ZYDIS_MNEMONIC_XSTORE,
|
||||
ZYDIS_MNEMONIC_XSUSLDTRK,
|
||||
ZYDIS_MNEMONIC_XTEST,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_MNEMONIC_MAX_VALUE = ZYDIS_MNEMONIC_XTEST,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_MNEMONIC_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MNEMONIC_MAX_VALUE)
|
||||
} ZydisMnemonic;
|
||||
|
|
|
@ -16,9 +16,17 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("addsubps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("adox"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesdec"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesdec128kl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesdec256kl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesdeclast"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesdecwide128kl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesdecwide256kl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesenc"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesenc128kl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesenc256kl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesenclast"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesencwide128kl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesencwide256kl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aesimc"),
|
||||
ZYDIS_MAKE_SHORTSTRING("aeskeygenassist"),
|
||||
ZYDIS_MAKE_SHORTSTRING("and"),
|
||||
|
@ -75,6 +83,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("cli"),
|
||||
ZYDIS_MAKE_SHORTSTRING("clrssbsy"),
|
||||
ZYDIS_MAKE_SHORTSTRING("clts"),
|
||||
ZYDIS_MAKE_SHORTSTRING("clui"),
|
||||
ZYDIS_MAKE_SHORTSTRING("clwb"),
|
||||
ZYDIS_MAKE_SHORTSTRING("clzero"),
|
||||
ZYDIS_MAKE_SHORTSTRING("cmc"),
|
||||
|
@ -149,6 +158,8 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("encls"),
|
||||
ZYDIS_MAKE_SHORTSTRING("enclu"),
|
||||
ZYDIS_MAKE_SHORTSTRING("enclv"),
|
||||
ZYDIS_MAKE_SHORTSTRING("encodekey128"),
|
||||
ZYDIS_MAKE_SHORTSTRING("encodekey256"),
|
||||
ZYDIS_MAKE_SHORTSTRING("endbr32"),
|
||||
ZYDIS_MAKE_SHORTSTRING("endbr64"),
|
||||
ZYDIS_MAKE_SHORTSTRING("enqcmd"),
|
||||
|
@ -260,6 +271,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("haddpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("haddps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("hlt"),
|
||||
ZYDIS_MAKE_SHORTSTRING("hreset"),
|
||||
ZYDIS_MAKE_SHORTSTRING("hsubpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("hsubps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("idiv"),
|
||||
|
@ -281,6 +293,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("invept"),
|
||||
ZYDIS_MAKE_SHORTSTRING("invlpg"),
|
||||
ZYDIS_MAKE_SHORTSTRING("invlpga"),
|
||||
ZYDIS_MAKE_SHORTSTRING("invlpgb"),
|
||||
ZYDIS_MAKE_SHORTSTRING("invpcid"),
|
||||
ZYDIS_MAKE_SHORTSTRING("invvpid"),
|
||||
ZYDIS_MAKE_SHORTSTRING("iret"),
|
||||
|
@ -378,6 +391,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("lddqu"),
|
||||
ZYDIS_MAKE_SHORTSTRING("ldmxcsr"),
|
||||
ZYDIS_MAKE_SHORTSTRING("lds"),
|
||||
ZYDIS_MAKE_SHORTSTRING("ldtilecfg"),
|
||||
ZYDIS_MAKE_SHORTSTRING("lea"),
|
||||
ZYDIS_MAKE_SHORTSTRING("leave"),
|
||||
ZYDIS_MAKE_SHORTSTRING("les"),
|
||||
|
@ -389,6 +403,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("lldt"),
|
||||
ZYDIS_MAKE_SHORTSTRING("llwpcb"),
|
||||
ZYDIS_MAKE_SHORTSTRING("lmsw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("loadiwkey"),
|
||||
ZYDIS_MAKE_SHORTSTRING("lodsb"),
|
||||
ZYDIS_MAKE_SHORTSTRING("lodsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("lodsq"),
|
||||
|
@ -408,6 +423,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("maxps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("maxsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("maxss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("mcommit"),
|
||||
ZYDIS_MAKE_SHORTSTRING("mfence"),
|
||||
ZYDIS_MAKE_SHORTSTRING("minpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("minps"),
|
||||
|
@ -615,6 +631,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("pslldq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("psllq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("psllw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("psmash"),
|
||||
ZYDIS_MAKE_SHORTSTRING("psrad"),
|
||||
ZYDIS_MAKE_SHORTSTRING("psraw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("psrld"),
|
||||
|
@ -646,6 +663,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("pushf"),
|
||||
ZYDIS_MAKE_SHORTSTRING("pushfd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("pushfq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("pvalidate"),
|
||||
ZYDIS_MAKE_SHORTSTRING("pxor"),
|
||||
ZYDIS_MAKE_SHORTSTRING("rcl"),
|
||||
ZYDIS_MAKE_SHORTSTRING("rcpps"),
|
||||
|
@ -665,6 +683,8 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("rdtsc"),
|
||||
ZYDIS_MAKE_SHORTSTRING("rdtscp"),
|
||||
ZYDIS_MAKE_SHORTSTRING("ret"),
|
||||
ZYDIS_MAKE_SHORTSTRING("rmpadjust"),
|
||||
ZYDIS_MAKE_SHORTSTRING("rmpupdate"),
|
||||
ZYDIS_MAKE_SHORTSTRING("rol"),
|
||||
ZYDIS_MAKE_SHORTSTRING("ror"),
|
||||
ZYDIS_MAKE_SHORTSTRING("rorx"),
|
||||
|
@ -686,6 +706,11 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("scasd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("scasq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("scasw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("seamcall"),
|
||||
ZYDIS_MAKE_SHORTSTRING("seamops"),
|
||||
ZYDIS_MAKE_SHORTSTRING("seamret"),
|
||||
ZYDIS_MAKE_SHORTSTRING("senduipi"),
|
||||
ZYDIS_MAKE_SHORTSTRING("serialize"),
|
||||
ZYDIS_MAKE_SHORTSTRING("setb"),
|
||||
ZYDIS_MAKE_SHORTSTRING("setbe"),
|
||||
ZYDIS_MAKE_SHORTSTRING("setl"),
|
||||
|
@ -741,6 +766,8 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("stosq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("stosw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("str"),
|
||||
ZYDIS_MAKE_SHORTSTRING("sttilecfg"),
|
||||
ZYDIS_MAKE_SHORTSTRING("stui"),
|
||||
ZYDIS_MAKE_SHORTSTRING("sub"),
|
||||
ZYDIS_MAKE_SHORTSTRING("subpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("subps"),
|
||||
|
@ -752,7 +779,20 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("sysexit"),
|
||||
ZYDIS_MAKE_SHORTSTRING("sysret"),
|
||||
ZYDIS_MAKE_SHORTSTRING("t1mskc"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tdcall"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tdpbf16ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tdpbssd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tdpbsud"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tdpbusd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tdpbuud"),
|
||||
ZYDIS_MAKE_SHORTSTRING("test"),
|
||||
ZYDIS_MAKE_SHORTSTRING("testui"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tileloadd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tileloaddt1"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tilerelease"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tilestored"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tilezero"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tlbsync"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tpause"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tzcnt"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tzcnti"),
|
||||
|
@ -762,6 +802,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("ud0"),
|
||||
ZYDIS_MAKE_SHORTSTRING("ud1"),
|
||||
ZYDIS_MAKE_SHORTSTRING("ud2"),
|
||||
ZYDIS_MAKE_SHORTSTRING("uiret"),
|
||||
ZYDIS_MAKE_SHORTSTRING("umonitor"),
|
||||
ZYDIS_MAKE_SHORTSTRING("umwait"),
|
||||
ZYDIS_MAKE_SHORTSTRING("unpckhpd"),
|
||||
|
@ -775,9 +816,11 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vaddnpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddnps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddsetsps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddsubpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vaddsubps"),
|
||||
|
@ -814,14 +857,18 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vbroadcastsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vbroadcastss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcmppd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcmpph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcmpps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcmpsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcmpsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcmpss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcomisd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcomish"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcomiss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcompresspd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcompressps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtdq2pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtdq2ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtdq2ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtfxpntdq2ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtfxpntpd2dq"),
|
||||
|
@ -832,49 +879,82 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vcvtne2ps2bf16"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtneps2bf16"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtpd2dq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtpd2ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtpd2ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtpd2qq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtpd2udq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtpd2uqq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2dq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2psx"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2qq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2udq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2uqq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2uw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtph2w"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtps2dq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtps2pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtps2ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtps2phx"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtps2qq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtps2udq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtps2uqq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtqq2pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtqq2ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtqq2ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsd2sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsd2si"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsd2ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsd2usi"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsh2sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsh2si"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsh2ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsh2usi"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsi2sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsi2sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtsi2ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtss2sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtss2sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtss2si"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtss2usi"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttpd2dq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttpd2qq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttpd2udq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttpd2uqq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttph2dq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttph2qq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttph2udq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttph2uqq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttph2uw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttph2w"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttps2dq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttps2qq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttps2udq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttps2uqq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttsd2si"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttsd2usi"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttsh2si"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttsh2usi"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttss2si"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvttss2usi"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtudq2pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtudq2ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtudq2ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtuqq2pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtuqq2ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtuqq2ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtusi2sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtusi2sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtusi2ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtuw2ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vcvtw2ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdbpsadbw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdivpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdivph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdivps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdivsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdivsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdivss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdpbf16ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vdppd"),
|
||||
|
@ -897,6 +977,10 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vextracti64x2"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vextracti64x4"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vextractps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfcmaddcph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfcmaddcsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfcmulcph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfcmulcsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfixupimmpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfixupimmps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfixupimmsd"),
|
||||
|
@ -904,47 +988,67 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vfixupnanpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfixupnanps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd132pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd132ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd132ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd132sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd132sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd132ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd213pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd213ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd213ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd213sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd213sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd213ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd231pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd231ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd231ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd231sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd231sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd231ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmadd233ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddcph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddcsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub132pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub132ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub132ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub213pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub213ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub213ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub231pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub231ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsub231ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsubpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmaddsubps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub132pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub132ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub132ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub132sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub132sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub132ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub213pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub213ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub213ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub213sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub213sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub213ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub231pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub231ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub231ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub231sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub231sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsub231ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd132pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd132ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd132ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd213pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd213ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd213ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd231pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd231ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubadd231ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubaddpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubaddps"),
|
||||
|
@ -952,41 +1056,57 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vfmsubps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmsubss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmulcph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfmulcsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd132pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd132ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd132ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd132sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd132sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd132ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd213pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd213ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd213ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd213sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd213sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd213ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd231pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd231ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd231ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd231sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd231sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmadd231ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmaddpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmaddps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmaddsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmaddss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub132pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub132ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub132ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub132sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub132sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub132ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub213pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub213ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub213ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub213sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub213sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub213ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub231pd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub231ph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub231ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub231sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub231sh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsub231ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsubpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsubps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsubsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfnmsubss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfpclasspd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfpclassph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfpclassps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfpclasssd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfpclasssh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfpclassss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfrczpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vfrczps"),
|
||||
|
@ -1007,12 +1127,16 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vgatherqpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgatherqps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetexppd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetexpph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetexpps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetexpsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetexpsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetexpss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetmantpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetmantph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetmantps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetmantsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetmantsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgetmantss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgf2p8affineinvqb"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vgf2p8affineqb"),
|
||||
|
@ -1052,15 +1176,19 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vmaskmovpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmaskmovps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmaxpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmaxph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmaxps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmaxsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmaxsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmaxss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmcall"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmclear"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmfunc"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vminpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vminph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vminps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vminsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vminsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vminss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmlaunch"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmload"),
|
||||
|
@ -1095,11 +1223,13 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vmovntps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovq"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovshdup"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovsldup"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovupd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovups"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmovw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmpsadbw"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmptrld"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmptrst"),
|
||||
|
@ -1108,8 +1238,10 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vmrun"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmsave"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmulpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmulph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmulps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmulsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmulsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmulss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmwrite"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vmxoff"),
|
||||
|
@ -1490,17 +1622,23 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vrcp28ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrcp28sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrcp28ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrcpph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrcpps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrcpsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrcpss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vreducepd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vreduceph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vreduceps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vreducesd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vreducesh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vreducess"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrndfxpntpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrndfxpntps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrndscalepd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrndscaleph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrndscaleps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrndscalesd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrndscalesh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrndscaless"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vroundpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vroundps"),
|
||||
|
@ -1515,11 +1653,15 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vrsqrt28ps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrsqrt28sd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrsqrt28ss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrsqrtph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrsqrtps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrsqrtsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vrsqrtss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vscalefpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vscalefph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vscalefps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vscalefsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vscalefsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vscalefss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vscaleps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vscatterdpd"),
|
||||
|
@ -1543,19 +1685,24 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("vshufpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vshufps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsqrtpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsqrtph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsqrtps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsqrtsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsqrtsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsqrtss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vstmxcsr"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsubpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsubph"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsubps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsubrpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsubrps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsubsd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsubsh"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vsubss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vtestpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vtestps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vucomisd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vucomish"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vucomiss"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vunpckhpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("vunpckhps"),
|
||||
|
@ -1589,6 +1736,7 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("xor"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xorpd"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xorps"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xresldtrk"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xrstor"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xrstor64"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xrstors"),
|
||||
|
@ -1605,5 +1753,6 @@ static const ZydisShortString STR_MNEMONIC[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("xsha1"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xsha256"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xstore"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xsusldtrk"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xtest")
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @brief Defines the `ZydisRegister` enum.
|
||||
* Defines the `ZydisRegister` enum.
|
||||
*/
|
||||
typedef enum ZydisRegister_
|
||||
{
|
||||
|
@ -197,6 +197,15 @@ typedef enum ZydisRegister_
|
|||
ZYDIS_REGISTER_ZMM29,
|
||||
ZYDIS_REGISTER_ZMM30,
|
||||
ZYDIS_REGISTER_ZMM31,
|
||||
// Matrix registers
|
||||
ZYDIS_REGISTER_TMM0,
|
||||
ZYDIS_REGISTER_TMM1,
|
||||
ZYDIS_REGISTER_TMM2,
|
||||
ZYDIS_REGISTER_TMM3,
|
||||
ZYDIS_REGISTER_TMM4,
|
||||
ZYDIS_REGISTER_TMM5,
|
||||
ZYDIS_REGISTER_TMM6,
|
||||
ZYDIS_REGISTER_TMM7,
|
||||
// Flags registers
|
||||
ZYDIS_REGISTER_FLAGS,
|
||||
ZYDIS_REGISTER_EFLAGS,
|
||||
|
@ -280,13 +289,14 @@ typedef enum ZydisRegister_
|
|||
ZYDIS_REGISTER_MXCSR,
|
||||
ZYDIS_REGISTER_PKRU,
|
||||
ZYDIS_REGISTER_XCR0,
|
||||
ZYDIS_REGISTER_UIF,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_REGISTER_MAX_VALUE = ZYDIS_REGISTER_XCR0,
|
||||
ZYDIS_REGISTER_MAX_VALUE = ZYDIS_REGISTER_UIF,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_REGISTER_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_REGISTER_MAX_VALUE)
|
||||
} ZydisRegister;
|
||||
|
|
|
@ -194,6 +194,15 @@ static const ZydisShortString STR_REGISTER[] =
|
|||
ZYDIS_MAKE_SHORTSTRING("zmm29"),
|
||||
ZYDIS_MAKE_SHORTSTRING("zmm30"),
|
||||
ZYDIS_MAKE_SHORTSTRING("zmm31"),
|
||||
// Matrix registers
|
||||
ZYDIS_MAKE_SHORTSTRING("tmm0"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tmm1"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tmm2"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tmm3"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tmm4"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tmm5"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tmm6"),
|
||||
ZYDIS_MAKE_SHORTSTRING("tmm7"),
|
||||
// Flags registers
|
||||
ZYDIS_MAKE_SHORTSTRING("flags"),
|
||||
ZYDIS_MAKE_SHORTSTRING("eflags"),
|
||||
|
@ -276,5 +285,6 @@ static const ZydisShortString STR_REGISTER[] =
|
|||
// Uncategorized
|
||||
ZYDIS_MAKE_SHORTSTRING("mxcsr"),
|
||||
ZYDIS_MAKE_SHORTSTRING("pkru"),
|
||||
ZYDIS_MAKE_SHORTSTRING("xcr0")
|
||||
ZYDIS_MAKE_SHORTSTRING("xcr0"),
|
||||
ZYDIS_MAKE_SHORTSTRING("uif")
|
||||
};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma pack(push, 1)
|
||||
|
||||
static const ZydisShortString STR_ADD = ZYDIS_MAKE_SHORTSTRING("+");
|
||||
static const struct ZydisPredefinedTokenADD_
|
||||
{
|
||||
|
@ -7,6 +8,7 @@ static const struct ZydisPredefinedTokenADD_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_ADD = { 4, 2, { ZYDIS_TOKEN_DELIMITER, 0, '+', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_ADD = (const ZydisPredefinedToken* const)&TOK_DATA_ADD;
|
||||
|
||||
static const ZydisShortString STR_ADDR_RELATIVE = ZYDIS_MAKE_SHORTSTRING("$");
|
||||
static const struct ZydisPredefinedTokenADDR_RELATIVE_
|
||||
{
|
||||
|
@ -15,6 +17,7 @@ static const struct ZydisPredefinedTokenADDR_RELATIVE_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_ADDR_RELATIVE = { 4, 2, { ZYDIS_TOKEN_ADDRESS_REL, 0, '$', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_ADDR_RELATIVE = (const ZydisPredefinedToken* const)&TOK_DATA_ADDR_RELATIVE;
|
||||
|
||||
static const ZydisShortString STR_DECO_1TO2 = ZYDIS_MAKE_SHORTSTRING(" {1to2}");
|
||||
static const struct ZydisPredefinedTokenDECO_1TO2_
|
||||
{
|
||||
|
@ -23,6 +26,7 @@ static const struct ZydisPredefinedTokenDECO_1TO2_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_1TO2 = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, '1', 't', 'o', '2', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_1TO2 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_1TO2;
|
||||
|
||||
static const ZydisShortString STR_DECO_1TO4 = ZYDIS_MAKE_SHORTSTRING(" {1to4}");
|
||||
static const struct ZydisPredefinedTokenDECO_1TO4_
|
||||
{
|
||||
|
@ -31,6 +35,7 @@ static const struct ZydisPredefinedTokenDECO_1TO4_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_1TO4 = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, '1', 't', 'o', '4', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_1TO4 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_1TO4;
|
||||
|
||||
static const ZydisShortString STR_DECO_1TO8 = ZYDIS_MAKE_SHORTSTRING(" {1to8}");
|
||||
static const struct ZydisPredefinedTokenDECO_1TO8_
|
||||
{
|
||||
|
@ -39,6 +44,7 @@ static const struct ZydisPredefinedTokenDECO_1TO8_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_1TO8 = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, '1', 't', 'o', '8', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_1TO8 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_1TO8;
|
||||
|
||||
static const ZydisShortString STR_DECO_1TO16 = ZYDIS_MAKE_SHORTSTRING(" {1to16}");
|
||||
static const struct ZydisPredefinedTokenDECO_1TO16_
|
||||
{
|
||||
|
@ -47,6 +53,25 @@ static const struct ZydisPredefinedTokenDECO_1TO16_
|
|||
ZyanU8 data[20];
|
||||
} TOK_DATA_DECO_1TO16 = { 20, 18, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 6, '1', 't', 'o', '1', '6', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_1TO16 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_1TO16;
|
||||
|
||||
static const ZydisShortString STR_DECO_1TO32 = ZYDIS_MAKE_SHORTSTRING(" {1to32}");
|
||||
static const struct ZydisPredefinedTokenDECO_1TO32_
|
||||
{
|
||||
ZyanU8 size;
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[20];
|
||||
} TOK_DATA_DECO_1TO32 = { 20, 18, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 6, '1', 't', 'o', '3', '2', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_1TO32 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_1TO32;
|
||||
|
||||
static const ZydisShortString STR_DECO_1TO64 = ZYDIS_MAKE_SHORTSTRING(" {1to64}");
|
||||
static const struct ZydisPredefinedTokenDECO_1TO64_
|
||||
{
|
||||
ZyanU8 size;
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[20];
|
||||
} TOK_DATA_DECO_1TO64 = { 20, 18, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 6, '1', 't', 'o', '6', '4', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_1TO64 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_1TO64;
|
||||
|
||||
static const ZydisShortString STR_DECO_4TO8 = ZYDIS_MAKE_SHORTSTRING(" {4to8}");
|
||||
static const struct ZydisPredefinedTokenDECO_4TO8_
|
||||
{
|
||||
|
@ -55,6 +80,7 @@ static const struct ZydisPredefinedTokenDECO_4TO8_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_4TO8 = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, '4', 't', 'o', '8', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_4TO8 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_4TO8;
|
||||
|
||||
static const ZydisShortString STR_DECO_4TO16 = ZYDIS_MAKE_SHORTSTRING(" {4to16}");
|
||||
static const struct ZydisPredefinedTokenDECO_4TO16_
|
||||
{
|
||||
|
@ -63,6 +89,16 @@ static const struct ZydisPredefinedTokenDECO_4TO16_
|
|||
ZyanU8 data[20];
|
||||
} TOK_DATA_DECO_4TO16 = { 20, 18, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 6, '4', 't', 'o', '1', '6', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_4TO16 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_4TO16;
|
||||
|
||||
static const ZydisShortString STR_DECO_8TO16 = ZYDIS_MAKE_SHORTSTRING(" {8to16}");
|
||||
static const struct ZydisPredefinedTokenDECO_8TO16_
|
||||
{
|
||||
ZyanU8 size;
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[20];
|
||||
} TOK_DATA_DECO_8TO16 = { 20, 18, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 6, '8', 't', 'o', '1', '6', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_8TO16 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_8TO16;
|
||||
|
||||
static const ZydisShortString STR_DECO_AAAA = ZYDIS_MAKE_SHORTSTRING(" {aaaa}");
|
||||
static const struct ZydisPredefinedTokenDECO_AAAA_
|
||||
{
|
||||
|
@ -71,6 +107,7 @@ static const struct ZydisPredefinedTokenDECO_AAAA_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_AAAA = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, 'a', 'a', 'a', 'a', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_AAAA = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_AAAA;
|
||||
|
||||
static const ZydisShortString STR_DECO_BADC = ZYDIS_MAKE_SHORTSTRING(" {badc}");
|
||||
static const struct ZydisPredefinedTokenDECO_BADC_
|
||||
{
|
||||
|
@ -79,6 +116,7 @@ static const struct ZydisPredefinedTokenDECO_BADC_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_BADC = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, 'b', 'a', 'd', 'c', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_BADC = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_BADC;
|
||||
|
||||
static const ZydisShortString STR_DECO_BBBB = ZYDIS_MAKE_SHORTSTRING(" {bbbb}");
|
||||
static const struct ZydisPredefinedTokenDECO_BBBB_
|
||||
{
|
||||
|
@ -87,6 +125,7 @@ static const struct ZydisPredefinedTokenDECO_BBBB_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_BBBB = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, 'b', 'b', 'b', 'b', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_BBBB = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_BBBB;
|
||||
|
||||
static const ZydisShortString STR_DECO_BEGIN = ZYDIS_MAKE_SHORTSTRING(" {");
|
||||
static const struct ZydisPredefinedTokenDECO_BEGIN_
|
||||
{
|
||||
|
@ -95,6 +134,7 @@ static const struct ZydisPredefinedTokenDECO_BEGIN_
|
|||
ZyanU8 data[8];
|
||||
} TOK_DATA_DECO_BEGIN = { 8, 6, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 0, '{', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_BEGIN = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_BEGIN;
|
||||
|
||||
static const ZydisShortString STR_DECO_CCCC = ZYDIS_MAKE_SHORTSTRING(" {cccc}");
|
||||
static const struct ZydisPredefinedTokenDECO_CCCC_
|
||||
{
|
||||
|
@ -103,6 +143,7 @@ static const struct ZydisPredefinedTokenDECO_CCCC_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_CCCC = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, 'c', 'c', 'c', 'c', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_CCCC = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_CCCC;
|
||||
|
||||
static const ZydisShortString STR_DECO_CDAB = ZYDIS_MAKE_SHORTSTRING(" {cdab}");
|
||||
static const struct ZydisPredefinedTokenDECO_CDAB_
|
||||
{
|
||||
|
@ -111,6 +152,7 @@ static const struct ZydisPredefinedTokenDECO_CDAB_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_CDAB = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, 'c', 'd', 'a', 'b', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_CDAB = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_CDAB;
|
||||
|
||||
static const ZydisShortString STR_DECO_DACB = ZYDIS_MAKE_SHORTSTRING(" {dacb}");
|
||||
static const struct ZydisPredefinedTokenDECO_DACB_
|
||||
{
|
||||
|
@ -119,6 +161,7 @@ static const struct ZydisPredefinedTokenDECO_DACB_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_DACB = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, 'd', 'a', 'c', 'b', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_DACB = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_DACB;
|
||||
|
||||
static const ZydisShortString STR_DECO_DDDD = ZYDIS_MAKE_SHORTSTRING(" {dddd}");
|
||||
static const struct ZydisPredefinedTokenDECO_DDDD_
|
||||
{
|
||||
|
@ -127,14 +170,16 @@ static const struct ZydisPredefinedTokenDECO_DDDD_
|
|||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_DDDD = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, 'd', 'd', 'd', 'd', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_DDDD = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_DDDD;
|
||||
static const ZydisShortString STR_DECO_EH = ZYDIS_MAKE_SHORTSTRING(" {cdab}");
|
||||
|
||||
static const ZydisShortString STR_DECO_EH = ZYDIS_MAKE_SHORTSTRING(" {eh}");
|
||||
static const struct ZydisPredefinedTokenDECO_EH_
|
||||
{
|
||||
ZyanU8 size;
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[19];
|
||||
} TOK_DATA_DECO_EH = { 19, 17, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 5, 'c', 'd', 'a', 'b', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
ZyanU8 data[17];
|
||||
} TOK_DATA_DECO_EH = { 17, 15, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 3, 'e', 'h', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_EH = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_EH;
|
||||
|
||||
static const ZydisShortString STR_DECO_END = ZYDIS_MAKE_SHORTSTRING("}");
|
||||
static const struct ZydisPredefinedTokenDECO_END_
|
||||
{
|
||||
|
@ -143,6 +188,7 @@ static const struct ZydisPredefinedTokenDECO_END_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_DECO_END = { 4, 2, { ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_END = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_END;
|
||||
|
||||
static const ZydisShortString STR_DECO_FLOAT16 = ZYDIS_MAKE_SHORTSTRING(" {float16}");
|
||||
static const struct ZydisPredefinedTokenDECO_FLOAT16_
|
||||
{
|
||||
|
@ -151,6 +197,7 @@ static const struct ZydisPredefinedTokenDECO_FLOAT16_
|
|||
ZyanU8 data[22];
|
||||
} TOK_DATA_DECO_FLOAT16 = { 22, 20, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 8, 'f', 'l', 'o', 'a', 't', '1', '6', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_FLOAT16 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_FLOAT16;
|
||||
|
||||
static const ZydisShortString STR_DECO_RD = ZYDIS_MAKE_SHORTSTRING(" {rd}");
|
||||
static const struct ZydisPredefinedTokenDECO_RD_
|
||||
{
|
||||
|
@ -159,6 +206,7 @@ static const struct ZydisPredefinedTokenDECO_RD_
|
|||
ZyanU8 data[17];
|
||||
} TOK_DATA_DECO_RD = { 17, 15, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 3, 'r', 'd', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_RD = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_RD;
|
||||
|
||||
static const ZydisShortString STR_DECO_RD_SAE = ZYDIS_MAKE_SHORTSTRING(" {rd-sae}");
|
||||
static const struct ZydisPredefinedTokenDECO_RD_SAE_
|
||||
{
|
||||
|
@ -167,6 +215,7 @@ static const struct ZydisPredefinedTokenDECO_RD_SAE_
|
|||
ZyanU8 data[21];
|
||||
} TOK_DATA_DECO_RD_SAE = { 21, 19, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 7, 'r', 'd', '-', 's', 'a', 'e', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_RD_SAE = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_RD_SAE;
|
||||
|
||||
static const ZydisShortString STR_DECO_RN = ZYDIS_MAKE_SHORTSTRING(" {rn}");
|
||||
static const struct ZydisPredefinedTokenDECO_RN_
|
||||
{
|
||||
|
@ -175,6 +224,7 @@ static const struct ZydisPredefinedTokenDECO_RN_
|
|||
ZyanU8 data[17];
|
||||
} TOK_DATA_DECO_RN = { 17, 15, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 3, 'r', 'n', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_RN = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_RN;
|
||||
|
||||
static const ZydisShortString STR_DECO_RN_SAE = ZYDIS_MAKE_SHORTSTRING(" {rn-sae}");
|
||||
static const struct ZydisPredefinedTokenDECO_RN_SAE_
|
||||
{
|
||||
|
@ -183,6 +233,7 @@ static const struct ZydisPredefinedTokenDECO_RN_SAE_
|
|||
ZyanU8 data[21];
|
||||
} TOK_DATA_DECO_RN_SAE = { 21, 19, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 7, 'r', 'n', '-', 's', 'a', 'e', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_RN_SAE = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_RN_SAE;
|
||||
|
||||
static const ZydisShortString STR_DECO_RU = ZYDIS_MAKE_SHORTSTRING(" {ru}");
|
||||
static const struct ZydisPredefinedTokenDECO_RU_
|
||||
{
|
||||
|
@ -191,6 +242,7 @@ static const struct ZydisPredefinedTokenDECO_RU_
|
|||
ZyanU8 data[17];
|
||||
} TOK_DATA_DECO_RU = { 17, 15, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 3, 'r', 'u', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_RU = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_RU;
|
||||
|
||||
static const ZydisShortString STR_DECO_RU_SAE = ZYDIS_MAKE_SHORTSTRING(" {ru-sae}");
|
||||
static const struct ZydisPredefinedTokenDECO_RU_SAE_
|
||||
{
|
||||
|
@ -199,6 +251,7 @@ static const struct ZydisPredefinedTokenDECO_RU_SAE_
|
|||
ZyanU8 data[21];
|
||||
} TOK_DATA_DECO_RU_SAE = { 21, 19, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 7, 'r', 'u', '-', 's', 'a', 'e', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_RU_SAE = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_RU_SAE;
|
||||
|
||||
static const ZydisShortString STR_DECO_RZ = ZYDIS_MAKE_SHORTSTRING(" {rz}");
|
||||
static const struct ZydisPredefinedTokenDECO_RZ_
|
||||
{
|
||||
|
@ -207,6 +260,7 @@ static const struct ZydisPredefinedTokenDECO_RZ_
|
|||
ZyanU8 data[17];
|
||||
} TOK_DATA_DECO_RZ = { 17, 15, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 3, 'r', 'z', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_RZ = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_RZ;
|
||||
|
||||
static const ZydisShortString STR_DECO_RZ_SAE = ZYDIS_MAKE_SHORTSTRING(" {rz-sae}");
|
||||
static const struct ZydisPredefinedTokenDECO_RZ_SAE_
|
||||
{
|
||||
|
@ -215,6 +269,7 @@ static const struct ZydisPredefinedTokenDECO_RZ_SAE_
|
|||
ZyanU8 data[21];
|
||||
} TOK_DATA_DECO_RZ_SAE = { 21, 19, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 7, 'r', 'z', '-', 's', 'a', 'e', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_RZ_SAE = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_RZ_SAE;
|
||||
|
||||
static const ZydisShortString STR_DECO_SAE = ZYDIS_MAKE_SHORTSTRING(" {sae}");
|
||||
static const struct ZydisPredefinedTokenDECO_SAE_
|
||||
{
|
||||
|
@ -223,6 +278,7 @@ static const struct ZydisPredefinedTokenDECO_SAE_
|
|||
ZyanU8 data[18];
|
||||
} TOK_DATA_DECO_SAE = { 18, 16, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 4, 's', 'a', 'e', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_SAE = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_SAE;
|
||||
|
||||
static const ZydisShortString STR_DECO_SINT8 = ZYDIS_MAKE_SHORTSTRING(" {sint8}");
|
||||
static const struct ZydisPredefinedTokenDECO_SINT8_
|
||||
{
|
||||
|
@ -231,6 +287,7 @@ static const struct ZydisPredefinedTokenDECO_SINT8_
|
|||
ZyanU8 data[20];
|
||||
} TOK_DATA_DECO_SINT8 = { 20, 18, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 6, 's', 'i', 'n', 't', '8', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_SINT8 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_SINT8;
|
||||
|
||||
static const ZydisShortString STR_DECO_SINT16 = ZYDIS_MAKE_SHORTSTRING(" {sint16}");
|
||||
static const struct ZydisPredefinedTokenDECO_SINT16_
|
||||
{
|
||||
|
@ -239,6 +296,7 @@ static const struct ZydisPredefinedTokenDECO_SINT16_
|
|||
ZyanU8 data[21];
|
||||
} TOK_DATA_DECO_SINT16 = { 21, 19, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 7, 's', 'i', 'n', 't', '1', '6', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_SINT16 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_SINT16;
|
||||
|
||||
static const ZydisShortString STR_DECO_UINT8 = ZYDIS_MAKE_SHORTSTRING(" {uint8}");
|
||||
static const struct ZydisPredefinedTokenDECO_UINT8_
|
||||
{
|
||||
|
@ -247,6 +305,7 @@ static const struct ZydisPredefinedTokenDECO_UINT8_
|
|||
ZyanU8 data[20];
|
||||
} TOK_DATA_DECO_UINT8 = { 20, 18, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 6, 'u', 'i', 'n', 't', '8', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_UINT8 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_UINT8;
|
||||
|
||||
static const ZydisShortString STR_DECO_UINT16 = ZYDIS_MAKE_SHORTSTRING(" {uint16}");
|
||||
static const struct ZydisPredefinedTokenDECO_UINT16_
|
||||
{
|
||||
|
@ -255,6 +314,7 @@ static const struct ZydisPredefinedTokenDECO_UINT16_
|
|||
ZyanU8 data[21];
|
||||
} TOK_DATA_DECO_UINT16 = { 21, 19, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 7, 'u', 'i', 'n', 't', '1', '6', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_UINT16 = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_UINT16;
|
||||
|
||||
static const ZydisShortString STR_DECO_ZERO = ZYDIS_MAKE_SHORTSTRING(" {z}");
|
||||
static const struct ZydisPredefinedTokenDECO_ZERO_
|
||||
{
|
||||
|
@ -263,6 +323,7 @@ static const struct ZydisPredefinedTokenDECO_ZERO_
|
|||
ZyanU8 data[16];
|
||||
} TOK_DATA_DECO_ZERO = { 16, 14, { ZYDIS_TOKEN_WHITESPACE, 2, ' ', '\0', ZYDIS_TOKEN_PARENTHESIS_OPEN, 2, '{', '\0', ZYDIS_TOKEN_DECORATOR, 2, 'z', '\0', ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, '}', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DECO_ZERO = (const ZydisPredefinedToken* const)&TOK_DATA_DECO_ZERO;
|
||||
|
||||
static const ZydisShortString STR_DELIM_MEMORY = ZYDIS_MAKE_SHORTSTRING(",");
|
||||
static const struct ZydisPredefinedTokenDELIM_MEMORY_
|
||||
{
|
||||
|
@ -271,6 +332,7 @@ static const struct ZydisPredefinedTokenDELIM_MEMORY_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_DELIM_MEMORY = { 4, 2, { ZYDIS_TOKEN_DELIMITER, 0, ',', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DELIM_MEMORY = (const ZydisPredefinedToken* const)&TOK_DATA_DELIM_MEMORY;
|
||||
|
||||
static const ZydisShortString STR_DELIM_MNEMONIC = ZYDIS_MAKE_SHORTSTRING(" ");
|
||||
static const struct ZydisPredefinedTokenDELIM_MNEMONIC_
|
||||
{
|
||||
|
@ -279,6 +341,7 @@ static const struct ZydisPredefinedTokenDELIM_MNEMONIC_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_DELIM_MNEMONIC = { 4, 2, { ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DELIM_MNEMONIC = (const ZydisPredefinedToken* const)&TOK_DATA_DELIM_MNEMONIC;
|
||||
|
||||
static const ZydisShortString STR_DELIM_OPERAND = ZYDIS_MAKE_SHORTSTRING(", ");
|
||||
static const struct ZydisPredefinedTokenDELIM_OPERAND_
|
||||
{
|
||||
|
@ -287,6 +350,7 @@ static const struct ZydisPredefinedTokenDELIM_OPERAND_
|
|||
ZyanU8 data[8];
|
||||
} TOK_DATA_DELIM_OPERAND = { 8, 6, { ZYDIS_TOKEN_DELIMITER, 2, ',', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DELIM_OPERAND = (const ZydisPredefinedToken* const)&TOK_DATA_DELIM_OPERAND;
|
||||
|
||||
static const ZydisShortString STR_DELIM_SEGMENT = ZYDIS_MAKE_SHORTSTRING(":");
|
||||
static const struct ZydisPredefinedTokenDELIM_SEGMENT_
|
||||
{
|
||||
|
@ -295,6 +359,7 @@ static const struct ZydisPredefinedTokenDELIM_SEGMENT_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_DELIM_SEGMENT = { 4, 2, { ZYDIS_TOKEN_DELIMITER, 0, ':', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_DELIM_SEGMENT = (const ZydisPredefinedToken* const)&TOK_DATA_DELIM_SEGMENT;
|
||||
|
||||
static const ZydisShortString STR_FAR = ZYDIS_MAKE_SHORTSTRING(" far");
|
||||
static const ZydisShortString STR_FAR_ATT = ZYDIS_MAKE_SHORTSTRING("l");
|
||||
static const ZydisShortString STR_IMMEDIATE = ZYDIS_MAKE_SHORTSTRING("$");
|
||||
|
@ -305,6 +370,7 @@ static const struct ZydisPredefinedTokenIMMEDIATE_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_IMMEDIATE = { 4, 2, { ZYDIS_TOKEN_IMMEDIATE, 0, '$', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_IMMEDIATE = (const ZydisPredefinedToken* const)&TOK_DATA_IMMEDIATE;
|
||||
|
||||
static const ZydisShortString STR_INVALID_MNEMONIC = ZYDIS_MAKE_SHORTSTRING("invalid");
|
||||
static const struct ZydisPredefinedTokenINVALID_MNEMONIC_
|
||||
{
|
||||
|
@ -313,6 +379,7 @@ static const struct ZydisPredefinedTokenINVALID_MNEMONIC_
|
|||
ZyanU8 data[10];
|
||||
} TOK_DATA_INVALID_MNEMONIC = { 10, 2, { ZYDIS_TOKEN_MNEMONIC, 0, 'i', 'n', 'v', 'a', 'l', 'i', 'd', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_INVALID_MNEMONIC = (const ZydisPredefinedToken* const)&TOK_DATA_INVALID_MNEMONIC;
|
||||
|
||||
static const ZydisShortString STR_INVALID_REG = ZYDIS_MAKE_SHORTSTRING("invalid");
|
||||
static const struct ZydisPredefinedTokenINVALID_REG_
|
||||
{
|
||||
|
@ -321,6 +388,7 @@ static const struct ZydisPredefinedTokenINVALID_REG_
|
|||
ZyanU8 data[10];
|
||||
} TOK_DATA_INVALID_REG = { 10, 2, { ZYDIS_TOKEN_REGISTER, 0, 'i', 'n', 'v', 'a', 'l', 'i', 'd', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_INVALID_REG = (const ZydisPredefinedToken* const)&TOK_DATA_INVALID_REG;
|
||||
|
||||
static const ZydisShortString STR_MEMORY_BEGIN_ATT = ZYDIS_MAKE_SHORTSTRING("(");
|
||||
static const struct ZydisPredefinedTokenMEMORY_BEGIN_ATT_
|
||||
{
|
||||
|
@ -329,6 +397,7 @@ static const struct ZydisPredefinedTokenMEMORY_BEGIN_ATT_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_MEMORY_BEGIN_ATT = { 4, 2, { ZYDIS_TOKEN_PARENTHESIS_OPEN, 0, '(', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_MEMORY_BEGIN_ATT = (const ZydisPredefinedToken* const)&TOK_DATA_MEMORY_BEGIN_ATT;
|
||||
|
||||
static const ZydisShortString STR_MEMORY_BEGIN_INTEL = ZYDIS_MAKE_SHORTSTRING("[");
|
||||
static const struct ZydisPredefinedTokenMEMORY_BEGIN_INTEL_
|
||||
{
|
||||
|
@ -337,6 +406,7 @@ static const struct ZydisPredefinedTokenMEMORY_BEGIN_INTEL_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_MEMORY_BEGIN_INTEL = { 4, 2, { ZYDIS_TOKEN_PARENTHESIS_OPEN, 0, '[', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_MEMORY_BEGIN_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_MEMORY_BEGIN_INTEL;
|
||||
|
||||
static const ZydisShortString STR_MEMORY_END_ATT = ZYDIS_MAKE_SHORTSTRING(")");
|
||||
static const struct ZydisPredefinedTokenMEMORY_END_ATT_
|
||||
{
|
||||
|
@ -345,6 +415,7 @@ static const struct ZydisPredefinedTokenMEMORY_END_ATT_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_MEMORY_END_ATT = { 4, 2, { ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, ')', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_MEMORY_END_ATT = (const ZydisPredefinedToken* const)&TOK_DATA_MEMORY_END_ATT;
|
||||
|
||||
static const ZydisShortString STR_MEMORY_END_INTEL = ZYDIS_MAKE_SHORTSTRING("]");
|
||||
static const struct ZydisPredefinedTokenMEMORY_END_INTEL_
|
||||
{
|
||||
|
@ -353,6 +424,7 @@ static const struct ZydisPredefinedTokenMEMORY_END_INTEL_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_MEMORY_END_INTEL = { 4, 2, { ZYDIS_TOKEN_PARENTHESIS_CLOSE, 0, ']', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_MEMORY_END_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_MEMORY_END_INTEL;
|
||||
|
||||
static const ZydisShortString STR_MUL = ZYDIS_MAKE_SHORTSTRING("*");
|
||||
static const struct ZydisPredefinedTokenMUL_
|
||||
{
|
||||
|
@ -361,6 +433,7 @@ static const struct ZydisPredefinedTokenMUL_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_MUL = { 4, 2, { ZYDIS_TOKEN_DELIMITER, 0, '*', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_MUL = (const ZydisPredefinedToken* const)&TOK_DATA_MUL;
|
||||
|
||||
static const ZydisShortString STR_NEAR = ZYDIS_MAKE_SHORTSTRING(" near");
|
||||
static const ZydisShortString STR_PREF_BND = ZYDIS_MAKE_SHORTSTRING("bnd ");
|
||||
static const struct ZydisPredefinedTokenPREF_BND_
|
||||
|
@ -370,6 +443,7 @@ static const struct ZydisPredefinedTokenPREF_BND_
|
|||
ZyanU8 data[10];
|
||||
} TOK_DATA_PREF_BND = { 10, 8, { ZYDIS_TOKEN_PREFIX, 4, 'b', 'n', 'd', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_BND = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_BND;
|
||||
|
||||
static const ZydisShortString STR_PREF_LOCK = ZYDIS_MAKE_SHORTSTRING("lock ");
|
||||
static const struct ZydisPredefinedTokenPREF_LOCK_
|
||||
{
|
||||
|
@ -378,6 +452,7 @@ static const struct ZydisPredefinedTokenPREF_LOCK_
|
|||
ZyanU8 data[11];
|
||||
} TOK_DATA_PREF_LOCK = { 11, 9, { ZYDIS_TOKEN_PREFIX, 5, 'l', 'o', 'c', 'k', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_LOCK = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_LOCK;
|
||||
|
||||
static const ZydisShortString STR_PREF_REP = ZYDIS_MAKE_SHORTSTRING("rep ");
|
||||
static const struct ZydisPredefinedTokenPREF_REP_
|
||||
{
|
||||
|
@ -386,6 +461,7 @@ static const struct ZydisPredefinedTokenPREF_REP_
|
|||
ZyanU8 data[10];
|
||||
} TOK_DATA_PREF_REP = { 10, 8, { ZYDIS_TOKEN_PREFIX, 4, 'r', 'e', 'p', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REP = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REP;
|
||||
|
||||
static const ZydisShortString STR_PREF_REPE = ZYDIS_MAKE_SHORTSTRING("repe ");
|
||||
static const struct ZydisPredefinedTokenPREF_REPE_
|
||||
{
|
||||
|
@ -394,6 +470,7 @@ static const struct ZydisPredefinedTokenPREF_REPE_
|
|||
ZyanU8 data[11];
|
||||
} TOK_DATA_PREF_REPE = { 11, 9, { ZYDIS_TOKEN_PREFIX, 5, 'r', 'e', 'p', 'e', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REPE = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REPE;
|
||||
|
||||
static const ZydisShortString STR_PREF_REPNE = ZYDIS_MAKE_SHORTSTRING("repne ");
|
||||
static const struct ZydisPredefinedTokenPREF_REPNE_
|
||||
{
|
||||
|
@ -402,6 +479,7 @@ static const struct ZydisPredefinedTokenPREF_REPNE_
|
|||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REPNE = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'p', 'n', 'e', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REPNE = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REPNE;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4A = ZYDIS_MAKE_SHORTSTRING("rex.wx ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4A_
|
||||
{
|
||||
|
@ -410,6 +488,7 @@ static const struct ZydisPredefinedTokenPREF_REX_4A_
|
|||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_4A = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'w', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_4A = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4A;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4B = ZYDIS_MAKE_SHORTSTRING("rex.wxb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4B_
|
||||
{
|
||||
|
@ -418,6 +497,7 @@ static const struct ZydisPredefinedTokenPREF_REX_4B_
|
|||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_REX_4B = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'r', 'e', 'x', '.', 'w', 'x', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_4B = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4B;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4C = ZYDIS_MAKE_SHORTSTRING("rex.wr ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4C_
|
||||
{
|
||||
|
@ -426,6 +506,7 @@ static const struct ZydisPredefinedTokenPREF_REX_4C_
|
|||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_4C = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'w', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_4C = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4C;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4D = ZYDIS_MAKE_SHORTSTRING("rex.wrb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4D_
|
||||
{
|
||||
|
@ -434,6 +515,7 @@ static const struct ZydisPredefinedTokenPREF_REX_4D_
|
|||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_REX_4D = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'r', 'e', 'x', '.', 'w', 'r', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_4D = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4D;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4E = ZYDIS_MAKE_SHORTSTRING("rex.wrx ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4E_
|
||||
{
|
||||
|
@ -442,6 +524,7 @@ static const struct ZydisPredefinedTokenPREF_REX_4E_
|
|||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_REX_4E = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'r', 'e', 'x', '.', 'w', 'r', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_4E = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4E;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4F = ZYDIS_MAKE_SHORTSTRING("rex.wrxb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4F_
|
||||
{
|
||||
|
@ -450,6 +533,7 @@ static const struct ZydisPredefinedTokenPREF_REX_4F_
|
|||
ZyanU8 data[15];
|
||||
} TOK_DATA_PREF_REX_4F = { 15, 13, { ZYDIS_TOKEN_PREFIX, 9, 'r', 'e', 'x', '.', 'w', 'r', 'x', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_4F = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4F;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_40 = ZYDIS_MAKE_SHORTSTRING("rex ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_40_
|
||||
{
|
||||
|
@ -458,6 +542,7 @@ static const struct ZydisPredefinedTokenPREF_REX_40_
|
|||
ZyanU8 data[10];
|
||||
} TOK_DATA_PREF_REX_40 = { 10, 8, { ZYDIS_TOKEN_PREFIX, 4, 'r', 'e', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_40 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_40;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_41 = ZYDIS_MAKE_SHORTSTRING("rex.b ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_41_
|
||||
{
|
||||
|
@ -466,6 +551,7 @@ static const struct ZydisPredefinedTokenPREF_REX_41_
|
|||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REX_41 = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'x', '.', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_41 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_41;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_42 = ZYDIS_MAKE_SHORTSTRING("rex.x ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_42_
|
||||
{
|
||||
|
@ -474,6 +560,7 @@ static const struct ZydisPredefinedTokenPREF_REX_42_
|
|||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REX_42 = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'x', '.', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_42 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_42;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_43 = ZYDIS_MAKE_SHORTSTRING("rex.xb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_43_
|
||||
{
|
||||
|
@ -482,6 +569,7 @@ static const struct ZydisPredefinedTokenPREF_REX_43_
|
|||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_43 = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'x', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_43 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_43;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_44 = ZYDIS_MAKE_SHORTSTRING("rex.r ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_44_
|
||||
{
|
||||
|
@ -490,6 +578,7 @@ static const struct ZydisPredefinedTokenPREF_REX_44_
|
|||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REX_44 = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'x', '.', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_44 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_44;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_45 = ZYDIS_MAKE_SHORTSTRING("rex.rb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_45_
|
||||
{
|
||||
|
@ -498,6 +587,7 @@ static const struct ZydisPredefinedTokenPREF_REX_45_
|
|||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_45 = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'r', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_45 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_45;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_46 = ZYDIS_MAKE_SHORTSTRING("rex.rx ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_46_
|
||||
{
|
||||
|
@ -506,6 +596,7 @@ static const struct ZydisPredefinedTokenPREF_REX_46_
|
|||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_46 = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'r', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_46 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_46;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_47 = ZYDIS_MAKE_SHORTSTRING("rex.rxb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_47_
|
||||
{
|
||||
|
@ -514,6 +605,7 @@ static const struct ZydisPredefinedTokenPREF_REX_47_
|
|||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_REX_47 = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'r', 'e', 'x', '.', 'r', 'x', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_47 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_47;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_48 = ZYDIS_MAKE_SHORTSTRING("rex.w ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_48_
|
||||
{
|
||||
|
@ -522,6 +614,7 @@ static const struct ZydisPredefinedTokenPREF_REX_48_
|
|||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REX_48 = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'x', '.', 'w', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_48 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_48;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_49 = ZYDIS_MAKE_SHORTSTRING("rex.wb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_49_
|
||||
{
|
||||
|
@ -530,6 +623,7 @@ static const struct ZydisPredefinedTokenPREF_REX_49_
|
|||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_49 = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'w', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_REX_49 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_49;
|
||||
|
||||
static const ZydisShortString STR_PREF_SEG_CS = ZYDIS_MAKE_SHORTSTRING("cs ");
|
||||
static const struct ZydisPredefinedTokenPREF_SEG_CS_
|
||||
{
|
||||
|
@ -538,6 +632,7 @@ static const struct ZydisPredefinedTokenPREF_SEG_CS_
|
|||
ZyanU8 data[9];
|
||||
} TOK_DATA_PREF_SEG_CS = { 9, 7, { ZYDIS_TOKEN_PREFIX, 3, 'c', 's', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_SEG_CS = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_SEG_CS;
|
||||
|
||||
static const ZydisShortString STR_PREF_SEG_DS = ZYDIS_MAKE_SHORTSTRING("ds ");
|
||||
static const struct ZydisPredefinedTokenPREF_SEG_DS_
|
||||
{
|
||||
|
@ -546,6 +641,7 @@ static const struct ZydisPredefinedTokenPREF_SEG_DS_
|
|||
ZyanU8 data[9];
|
||||
} TOK_DATA_PREF_SEG_DS = { 9, 7, { ZYDIS_TOKEN_PREFIX, 3, 'd', 's', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_SEG_DS = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_SEG_DS;
|
||||
|
||||
static const ZydisShortString STR_PREF_SEG_ES = ZYDIS_MAKE_SHORTSTRING("es ");
|
||||
static const struct ZydisPredefinedTokenPREF_SEG_ES_
|
||||
{
|
||||
|
@ -554,6 +650,7 @@ static const struct ZydisPredefinedTokenPREF_SEG_ES_
|
|||
ZyanU8 data[9];
|
||||
} TOK_DATA_PREF_SEG_ES = { 9, 7, { ZYDIS_TOKEN_PREFIX, 3, 'e', 's', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_SEG_ES = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_SEG_ES;
|
||||
|
||||
static const ZydisShortString STR_PREF_SEG_FS = ZYDIS_MAKE_SHORTSTRING("fs ");
|
||||
static const struct ZydisPredefinedTokenPREF_SEG_FS_
|
||||
{
|
||||
|
@ -562,6 +659,7 @@ static const struct ZydisPredefinedTokenPREF_SEG_FS_
|
|||
ZyanU8 data[9];
|
||||
} TOK_DATA_PREF_SEG_FS = { 9, 7, { ZYDIS_TOKEN_PREFIX, 3, 'f', 's', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_SEG_FS = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_SEG_FS;
|
||||
|
||||
static const ZydisShortString STR_PREF_SEG_GS = ZYDIS_MAKE_SHORTSTRING("gs ");
|
||||
static const struct ZydisPredefinedTokenPREF_SEG_GS_
|
||||
{
|
||||
|
@ -570,6 +668,7 @@ static const struct ZydisPredefinedTokenPREF_SEG_GS_
|
|||
ZyanU8 data[9];
|
||||
} TOK_DATA_PREF_SEG_GS = { 9, 7, { ZYDIS_TOKEN_PREFIX, 3, 'g', 's', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_SEG_GS = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_SEG_GS;
|
||||
|
||||
static const ZydisShortString STR_PREF_SEG_SS = ZYDIS_MAKE_SHORTSTRING("ss ");
|
||||
static const struct ZydisPredefinedTokenPREF_SEG_SS_
|
||||
{
|
||||
|
@ -578,6 +677,7 @@ static const struct ZydisPredefinedTokenPREF_SEG_SS_
|
|||
ZyanU8 data[9];
|
||||
} TOK_DATA_PREF_SEG_SS = { 9, 7, { ZYDIS_TOKEN_PREFIX, 3, 's', 's', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_SEG_SS = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_SEG_SS;
|
||||
|
||||
static const ZydisShortString STR_PREF_XACQUIRE = ZYDIS_MAKE_SHORTSTRING("xacquire ");
|
||||
static const struct ZydisPredefinedTokenPREF_XACQUIRE_
|
||||
{
|
||||
|
@ -586,6 +686,7 @@ static const struct ZydisPredefinedTokenPREF_XACQUIRE_
|
|||
ZyanU8 data[15];
|
||||
} TOK_DATA_PREF_XACQUIRE = { 15, 13, { ZYDIS_TOKEN_PREFIX, 9, 'x', 'a', 'c', 'q', 'u', 'i', 'r', 'e', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_XACQUIRE = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_XACQUIRE;
|
||||
|
||||
static const ZydisShortString STR_PREF_XRELEASE = ZYDIS_MAKE_SHORTSTRING("xrelease ");
|
||||
static const struct ZydisPredefinedTokenPREF_XRELEASE_
|
||||
{
|
||||
|
@ -594,6 +695,16 @@ static const struct ZydisPredefinedTokenPREF_XRELEASE_
|
|||
ZyanU8 data[15];
|
||||
} TOK_DATA_PREF_XRELEASE = { 15, 13, { ZYDIS_TOKEN_PREFIX, 9, 'x', 'r', 'e', 'l', 'e', 'a', 's', 'e', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_XRELEASE = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_XRELEASE;
|
||||
|
||||
static const ZydisShortString STR_PREF_NOTRACK = ZYDIS_MAKE_SHORTSTRING("notrack ");
|
||||
static const struct ZydisPredefinedTokenPREF_NOTRACK_
|
||||
{
|
||||
ZyanU8 size;
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_NOTRACK = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'n', 'o', 't', 'r', 'a', 'c', 'k', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_PREF_NOTRACK = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_NOTRACK;
|
||||
|
||||
static const ZydisShortString STR_REGISTER = ZYDIS_MAKE_SHORTSTRING("%");
|
||||
static const struct ZydisPredefinedTokenREGISTER_
|
||||
{
|
||||
|
@ -602,6 +713,7 @@ static const struct ZydisPredefinedTokenREGISTER_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_REGISTER = { 4, 2, { ZYDIS_TOKEN_REGISTER, 0, '%', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_REGISTER = (const ZydisPredefinedToken* const)&TOK_DATA_REGISTER;
|
||||
|
||||
static const ZydisShortString STR_SHORT = ZYDIS_MAKE_SHORTSTRING(" short");
|
||||
static const ZydisShortString STR_SIZE_8_ATT = ZYDIS_MAKE_SHORTSTRING("b");
|
||||
static const ZydisShortString STR_SIZE_8_INTEL = ZYDIS_MAKE_SHORTSTRING("byte ptr ");
|
||||
|
@ -612,6 +724,7 @@ static const struct ZydisPredefinedTokenSIZE_8_INTEL_
|
|||
ZyanU8 data[15];
|
||||
} TOK_DATA_SIZE_8_INTEL = { 15, 13, { ZYDIS_TOKEN_TYPECAST, 9, 'b', 'y', 't', 'e', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_8_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_8_INTEL;
|
||||
|
||||
static const ZydisShortString STR_SIZE_16_ATT = ZYDIS_MAKE_SHORTSTRING("w");
|
||||
static const ZydisShortString STR_SIZE_16_INTEL = ZYDIS_MAKE_SHORTSTRING("word ptr ");
|
||||
static const struct ZydisPredefinedTokenSIZE_16_INTEL_
|
||||
|
@ -621,6 +734,7 @@ static const struct ZydisPredefinedTokenSIZE_16_INTEL_
|
|||
ZyanU8 data[15];
|
||||
} TOK_DATA_SIZE_16_INTEL = { 15, 13, { ZYDIS_TOKEN_TYPECAST, 9, 'w', 'o', 'r', 'd', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_16_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_16_INTEL;
|
||||
|
||||
static const ZydisShortString STR_SIZE_32_ATT = ZYDIS_MAKE_SHORTSTRING("l");
|
||||
static const ZydisShortString STR_SIZE_32_INTEL = ZYDIS_MAKE_SHORTSTRING("dword ptr ");
|
||||
static const struct ZydisPredefinedTokenSIZE_32_INTEL_
|
||||
|
@ -630,6 +744,7 @@ static const struct ZydisPredefinedTokenSIZE_32_INTEL_
|
|||
ZyanU8 data[16];
|
||||
} TOK_DATA_SIZE_32_INTEL = { 16, 14, { ZYDIS_TOKEN_TYPECAST, 10, 'd', 'w', 'o', 'r', 'd', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_32_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_32_INTEL;
|
||||
|
||||
static const ZydisShortString STR_SIZE_48 = ZYDIS_MAKE_SHORTSTRING("fword ptr ");
|
||||
static const struct ZydisPredefinedTokenSIZE_48_
|
||||
{
|
||||
|
@ -638,6 +753,7 @@ static const struct ZydisPredefinedTokenSIZE_48_
|
|||
ZyanU8 data[16];
|
||||
} TOK_DATA_SIZE_48 = { 16, 14, { ZYDIS_TOKEN_TYPECAST, 10, 'f', 'w', 'o', 'r', 'd', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_48 = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_48;
|
||||
|
||||
static const ZydisShortString STR_SIZE_64_ATT = ZYDIS_MAKE_SHORTSTRING("q");
|
||||
static const ZydisShortString STR_SIZE_64_INTEL = ZYDIS_MAKE_SHORTSTRING("qword ptr ");
|
||||
static const struct ZydisPredefinedTokenSIZE_64_INTEL_
|
||||
|
@ -647,6 +763,7 @@ static const struct ZydisPredefinedTokenSIZE_64_INTEL_
|
|||
ZyanU8 data[16];
|
||||
} TOK_DATA_SIZE_64_INTEL = { 16, 14, { ZYDIS_TOKEN_TYPECAST, 10, 'q', 'w', 'o', 'r', 'd', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_64_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_64_INTEL;
|
||||
|
||||
static const ZydisShortString STR_SIZE_80 = ZYDIS_MAKE_SHORTSTRING("tbyte ptr ");
|
||||
static const struct ZydisPredefinedTokenSIZE_80_
|
||||
{
|
||||
|
@ -655,6 +772,7 @@ static const struct ZydisPredefinedTokenSIZE_80_
|
|||
ZyanU8 data[16];
|
||||
} TOK_DATA_SIZE_80 = { 16, 14, { ZYDIS_TOKEN_TYPECAST, 10, 't', 'b', 'y', 't', 'e', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_80 = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_80;
|
||||
|
||||
static const ZydisShortString STR_SIZE_128_ATT = ZYDIS_MAKE_SHORTSTRING("x");
|
||||
static const ZydisShortString STR_SIZE_128_INTEL = ZYDIS_MAKE_SHORTSTRING("xmmword ptr ");
|
||||
static const struct ZydisPredefinedTokenSIZE_128_INTEL_
|
||||
|
@ -664,6 +782,7 @@ static const struct ZydisPredefinedTokenSIZE_128_INTEL_
|
|||
ZyanU8 data[18];
|
||||
} TOK_DATA_SIZE_128_INTEL = { 18, 16, { ZYDIS_TOKEN_TYPECAST, 12, 'x', 'm', 'm', 'w', 'o', 'r', 'd', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_128_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_128_INTEL;
|
||||
|
||||
static const ZydisShortString STR_SIZE_256_ATT = ZYDIS_MAKE_SHORTSTRING("y");
|
||||
static const ZydisShortString STR_SIZE_256_INTEL = ZYDIS_MAKE_SHORTSTRING("ymmword ptr ");
|
||||
static const struct ZydisPredefinedTokenSIZE_256_INTEL_
|
||||
|
@ -673,6 +792,7 @@ static const struct ZydisPredefinedTokenSIZE_256_INTEL_
|
|||
ZyanU8 data[18];
|
||||
} TOK_DATA_SIZE_256_INTEL = { 18, 16, { ZYDIS_TOKEN_TYPECAST, 12, 'y', 'm', 'm', 'w', 'o', 'r', 'd', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_256_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_256_INTEL;
|
||||
|
||||
static const ZydisShortString STR_SIZE_512_ATT = ZYDIS_MAKE_SHORTSTRING("z");
|
||||
static const ZydisShortString STR_SIZE_512_INTEL = ZYDIS_MAKE_SHORTSTRING("zmmword ptr ");
|
||||
static const struct ZydisPredefinedTokenSIZE_512_INTEL_
|
||||
|
@ -682,6 +802,7 @@ static const struct ZydisPredefinedTokenSIZE_512_INTEL_
|
|||
ZyanU8 data[18];
|
||||
} TOK_DATA_SIZE_512_INTEL = { 18, 16, { ZYDIS_TOKEN_TYPECAST, 12, 'z', 'm', 'm', 'w', 'o', 'r', 'd', ' ', 'p', 't', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SIZE_512_INTEL = (const ZydisPredefinedToken* const)&TOK_DATA_SIZE_512_INTEL;
|
||||
|
||||
static const ZydisShortString STR_SUB = ZYDIS_MAKE_SHORTSTRING("-");
|
||||
static const struct ZydisPredefinedTokenSUB_
|
||||
{
|
||||
|
@ -690,5 +811,6 @@ static const struct ZydisPredefinedTokenSUB_
|
|||
ZyanU8 data[4];
|
||||
} TOK_DATA_SUB = { 4, 2, { ZYDIS_TOKEN_DELIMITER, 0, '-', '\0' } };
|
||||
static const ZydisPredefinedToken* const TOK_SUB = (const ZydisPredefinedToken* const)&TOK_DATA_SUB;
|
||||
|
||||
static const ZydisShortString STR_WHITESPACE = ZYDIS_MAKE_SHORTSTRING(" ");
|
||||
#pragma pack(pop)
|
||||
#pragma pack(pop)
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -18,6 +18,6 @@ static const ZydisInstructionEncodingInfo INSTR_ENCODINGS[] =
|
|||
{ ZYDIS_INSTR_ENC_FLAG_HAS_MODRM | ZYDIS_INSTR_ENC_FLAG_HAS_IMM0, { { 0, 0, 0 } }, { { { 16, 32, 32 }, ZYAN_TRUE, ZYAN_TRUE }, { { 0, 0, 0 }, ZYAN_FALSE, ZYAN_FALSE } } },
|
||||
{ ZYDIS_INSTR_ENC_FLAG_HAS_MODRM | ZYDIS_INSTR_ENC_FLAG_FORCE_REG_FORM, { { 0, 0, 0 } }, { { { 0, 0, 0 }, ZYAN_FALSE, ZYAN_FALSE }, { { 0, 0, 0 }, ZYAN_FALSE, ZYAN_FALSE } } },
|
||||
{ ZYDIS_INSTR_ENC_FLAG_HAS_IMM0 | ZYDIS_INSTR_ENC_FLAG_HAS_IMM1, { { 0, 0, 0 } }, { { { 16, 16, 16 }, ZYAN_FALSE, ZYAN_FALSE }, { { 8, 8, 8 }, ZYAN_FALSE, ZYAN_FALSE } } },
|
||||
{ ZYDIS_INSTR_ENC_FLAG_HAS_IMM0 | ZYDIS_INSTR_ENC_FLAG_HAS_IMM1, { { 0, 0, 0 } }, { { { 16, 32, 32 }, ZYAN_TRUE, ZYAN_TRUE }, { { 16, 16, 16 }, ZYAN_FALSE, ZYAN_FALSE } } },
|
||||
{ ZYDIS_INSTR_ENC_FLAG_HAS_IMM0 | ZYDIS_INSTR_ENC_FLAG_HAS_IMM1, { { 0, 0, 0 } }, { { { 16, 32, 32 }, ZYAN_FALSE, ZYAN_FALSE }, { { 16, 16, 16 }, ZYAN_FALSE, ZYAN_FALSE } } },
|
||||
{ ZYDIS_INSTR_ENC_FLAG_HAS_MODRM | ZYDIS_INSTR_ENC_FLAG_HAS_IMM0 | ZYDIS_INSTR_ENC_FLAG_HAS_IMM1, { { 0, 0, 0 } }, { { { 8, 8, 8 }, ZYAN_FALSE, ZYAN_FALSE }, { { 8, 8, 8 }, ZYAN_FALSE, ZYAN_FALSE } } }
|
||||
};
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -51,126 +51,126 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisDecoderTreeNodeType` data-type.
|
||||
* Defines the `ZydisDecoderTreeNodeType` data-type.
|
||||
*/
|
||||
typedef ZyanU8 ZydisDecoderTreeNodeType;
|
||||
|
||||
/**
|
||||
* @brief Values that represent zydis decoder tree node types.
|
||||
* Values that represent zydis decoder tree node types.
|
||||
*/
|
||||
enum ZydisDecoderTreeNodeTypes
|
||||
{
|
||||
ZYDIS_NODETYPE_INVALID = 0x00,
|
||||
/**
|
||||
* @brief Reference to an instruction-definition.
|
||||
* Reference to an instruction-definition.
|
||||
*/
|
||||
ZYDIS_NODETYPE_DEFINITION_MASK = 0x80,
|
||||
/**
|
||||
* @brief Reference to an XOP-map filter.
|
||||
* Reference to an XOP-map filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_XOP = 0x01,
|
||||
/**
|
||||
* @brief Reference to an VEX-map filter.
|
||||
* Reference to an VEX-map filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_VEX = 0x02,
|
||||
/**
|
||||
* @brief Reference to an EVEX/MVEX-map filter.
|
||||
* Reference to an EVEX/MVEX-map filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_EMVEX = 0x03,
|
||||
/**
|
||||
* @brief Reference to an opcode filter.
|
||||
* Reference to an opcode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_OPCODE = 0x04,
|
||||
/**
|
||||
* @brief Reference to an instruction-mode filter.
|
||||
* Reference to an instruction-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE = 0x05,
|
||||
/**
|
||||
* @brief Reference to an compacted instruction-mode filter.
|
||||
* Reference to an compacted instruction-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_COMPACT = 0x06,
|
||||
/**
|
||||
* @brief Reference to a ModRM.mod filter.
|
||||
* Reference to a ModRM.mod filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODRM_MOD = 0x07,
|
||||
/**
|
||||
* @brief Reference to a compacted ModRM.mod filter.
|
||||
* Reference to a compacted ModRM.mod filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODRM_MOD_COMPACT = 0x08,
|
||||
/**
|
||||
* @brief Reference to a ModRM.reg filter.
|
||||
* Reference to a ModRM.reg filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODRM_REG = 0x09,
|
||||
/**
|
||||
* @brief Reference to a ModRM.rm filter.
|
||||
* Reference to a ModRM.rm filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODRM_RM = 0x0A,
|
||||
/**
|
||||
* @brief Reference to a PrefixGroup1 filter.
|
||||
* Reference to a PrefixGroup1 filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_PREFIX_GROUP1 = 0x0B,
|
||||
/**
|
||||
* @brief Reference to a mandatory-prefix filter.
|
||||
* Reference to a mandatory-prefix filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MANDATORY_PREFIX = 0x0C,
|
||||
/**
|
||||
* @brief Reference to an operand-size filter.
|
||||
* Reference to an operand-size filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_OPERAND_SIZE = 0x0D,
|
||||
/**
|
||||
* @brief Reference to an address-size filter.
|
||||
* Reference to an address-size filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_ADDRESS_SIZE = 0x0E,
|
||||
/**
|
||||
* @brief Reference to a vector-length filter.
|
||||
* Reference to a vector-length filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_VECTOR_LENGTH = 0x0F,
|
||||
/**
|
||||
* @brief Reference to an REX/VEX/EVEX.W filter.
|
||||
* Reference to an REX/VEX/EVEX.W filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_REX_W = 0x10,
|
||||
/**
|
||||
* @brief Reference to an REX/VEX/EVEX.B filter.
|
||||
* Reference to an REX/VEX/EVEX.B filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_REX_B = 0x11,
|
||||
/**
|
||||
* @brief Reference to an EVEX.b filter.
|
||||
* Reference to an EVEX.b filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_EVEX_B = 0x12,
|
||||
/**
|
||||
* @brief Reference to an MVEX.E filter.
|
||||
* Reference to an MVEX.E filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MVEX_E = 0x13,
|
||||
/**
|
||||
* @brief Reference to a AMD-mode filter.
|
||||
* Reference to a AMD-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_AMD = 0x14,
|
||||
/**
|
||||
* @brief Reference to a KNC-mode filter.
|
||||
* Reference to a KNC-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_KNC = 0x15,
|
||||
/**
|
||||
* @brief Reference to a MPX-mode filter.
|
||||
* Reference to a MPX-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_MPX = 0x16,
|
||||
/**
|
||||
* @brief Reference to a CET-mode filter.
|
||||
* Reference to a CET-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_CET = 0x17,
|
||||
/**
|
||||
* @brief Reference to a LZCNT-mode filter.
|
||||
* Reference to a LZCNT-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_LZCNT = 0x18,
|
||||
/**
|
||||
* @brief Reference to a TZCNT-mode filter.
|
||||
* Reference to a TZCNT-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_TZCNT = 0x19,
|
||||
/**
|
||||
* @brief Reference to a WBNOINVD-mode filter.
|
||||
* Reference to a WBNOINVD-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_WBNOINVD = 0x1A,
|
||||
/**
|
||||
* @brief Reference to a CLDEMOTE-mode filter.
|
||||
* Reference to a CLDEMOTE-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_CLDEMOTE = 0x1B
|
||||
};
|
||||
|
@ -178,14 +178,14 @@ enum ZydisDecoderTreeNodeTypes
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisDecoderTreeNodeValue` data-type.
|
||||
* Defines the `ZydisDecoderTreeNodeValue` data-type.
|
||||
*/
|
||||
typedef ZyanU16 ZydisDecoderTreeNodeValue;
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisDecoderTreeNode` struct.
|
||||
* Defines the `ZydisDecoderTreeNode` struct.
|
||||
*/
|
||||
typedef struct ZydisDecoderTreeNode_
|
||||
{
|
||||
|
@ -206,32 +206,32 @@ typedef struct ZydisDecoderTreeNode_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionEncodingFlags` data-type.
|
||||
* Defines the `ZydisInstructionEncodingFlags` data-type.
|
||||
*/
|
||||
typedef ZyanU8 ZydisInstructionEncodingFlags;
|
||||
|
||||
/**
|
||||
* @brief The instruction has an optional modrm byte.
|
||||
* The instruction has an optional modrm byte.
|
||||
*/
|
||||
#define ZYDIS_INSTR_ENC_FLAG_HAS_MODRM 0x01
|
||||
|
||||
/**
|
||||
* @brief The instruction has an optional displacement value.
|
||||
* The instruction has an optional displacement value.
|
||||
*/
|
||||
#define ZYDIS_INSTR_ENC_FLAG_HAS_DISP 0x02
|
||||
|
||||
/**
|
||||
* @brief The instruction has an optional immediate value.
|
||||
* The instruction has an optional immediate value.
|
||||
*/
|
||||
#define ZYDIS_INSTR_ENC_FLAG_HAS_IMM0 0x04
|
||||
|
||||
/**
|
||||
* @brief The instruction has a second optional immediate value.
|
||||
* The instruction has a second optional immediate value.
|
||||
*/
|
||||
#define ZYDIS_INSTR_ENC_FLAG_HAS_IMM1 0x08
|
||||
|
||||
/**
|
||||
* @brief The instruction ignores the value of `modrm.mod` and always assumes `modrm.mod == 3`
|
||||
* The instruction ignores the value of `modrm.mod` and always assumes `modrm.mod == 3`
|
||||
* ("reg, reg" - form).
|
||||
*
|
||||
* Instructions with this flag can't have a SIB byte or a displacement value.
|
||||
|
@ -239,39 +239,39 @@ typedef ZyanU8 ZydisInstructionEncodingFlags;
|
|||
#define ZYDIS_INSTR_ENC_FLAG_FORCE_REG_FORM 0x10
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionEncodingInfo` struct.
|
||||
* Defines the `ZydisInstructionEncodingInfo` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionEncodingInfo_
|
||||
{
|
||||
/**
|
||||
* @brief Contains flags with information about the physical instruction-encoding.
|
||||
* Contains flags with information about the physical instruction-encoding.
|
||||
*/
|
||||
ZydisInstructionEncodingFlags flags;
|
||||
/**
|
||||
* @brief Displacement info.
|
||||
* Displacement info.
|
||||
*/
|
||||
struct
|
||||
{
|
||||
/**
|
||||
* @brief The size of the displacement value.
|
||||
* The size of the displacement value.
|
||||
*/
|
||||
ZyanU8 size[3];
|
||||
} disp;
|
||||
/**
|
||||
* @brief Immediate info.
|
||||
* Immediate info.
|
||||
*/
|
||||
struct
|
||||
{
|
||||
/**
|
||||
* @brief The size of the immediate value.
|
||||
* The size of the immediate value.
|
||||
*/
|
||||
ZyanU8 size[3];
|
||||
/**
|
||||
* @brief Signals, if the value is signed.
|
||||
* Signals, if the value is signed.
|
||||
*/
|
||||
ZyanBool is_signed;
|
||||
/**
|
||||
* @brief Signals, if the value is a relative offset.
|
||||
* Signals, if the value is a relative offset.
|
||||
*/
|
||||
ZyanBool is_relative;
|
||||
} imm[2];
|
||||
|
@ -287,15 +287,20 @@ typedef struct ZydisInstructionEncodingInfo_
|
|||
/* Decoder tree */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
extern const ZydisDecoderTreeNode zydis_decoder_tree_root;
|
||||
|
||||
/**
|
||||
* @brief Returns the root node of the instruction tree.
|
||||
* Returns the root node of the instruction tree.
|
||||
*
|
||||
* @return The root node of the instruction tree.
|
||||
*/
|
||||
ZYDIS_NO_EXPORT const ZydisDecoderTreeNode* ZydisDecoderTreeGetRootNode(void);
|
||||
ZYAN_INLINE const ZydisDecoderTreeNode* ZydisDecoderTreeGetRootNode(void)
|
||||
{
|
||||
return &zydis_decoder_tree_root;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the child node of `parent` specified by `index`.
|
||||
* Returns the child node of `parent` specified by `index`.
|
||||
*
|
||||
* @param parent The parent node.
|
||||
* @param index The index of the child node to retrieve.
|
||||
|
@ -306,8 +311,8 @@ ZYDIS_NO_EXPORT const ZydisDecoderTreeNode* ZydisDecoderTreeGetChildNode(
|
|||
const ZydisDecoderTreeNode* parent, ZyanU16 index);
|
||||
|
||||
/**
|
||||
* @brief Returns information about optional instruction parts (like modrm, displacement or
|
||||
* immediates) for the instruction that is linked to the given `node`.
|
||||
* Returns information about optional instruction parts (like modrm, displacement or
|
||||
* immediates) for the instruction that is linked to the given `node`.
|
||||
*
|
||||
* @param node The instruction definition node.
|
||||
* @param info A pointer to the `ZydisInstructionParts` struct.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implements the `AT&T` style instruction-formatter.
|
||||
* Implements the `AT&T` style instruction-formatter.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_FORMATTER_ATT_H
|
||||
|
@ -68,6 +68,9 @@ ZyanStatus ZydisFormatterATTPrintMnemonic(const ZydisFormatter* formatter,
|
|||
ZyanStatus ZydisFormatterATTPrintRegister(const ZydisFormatter* formatter,
|
||||
ZydisFormatterBuffer* buffer, ZydisFormatterContext* context, ZydisRegister reg);
|
||||
|
||||
ZyanStatus ZydisFormatterATTPrintAddressABS(const ZydisFormatter* formatter,
|
||||
ZydisFormatterBuffer* buffer, ZydisFormatterContext* context);
|
||||
|
||||
ZyanStatus ZydisFormatterATTPrintDISP(const ZydisFormatter* formatter,
|
||||
ZydisFormatterBuffer* buffer, ZydisFormatterContext* context);
|
||||
|
||||
|
@ -85,13 +88,14 @@ ZyanStatus ZydisFormatterATTPrintIMM(const ZydisFormatter* formatter,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief The default formatter configuration for `AT&T` style disassembly.
|
||||
* The default formatter configuration for `AT&T` style disassembly.
|
||||
*/
|
||||
static const ZydisFormatter FORMATTER_ATT =
|
||||
{
|
||||
/* style */ ZYDIS_FORMATTER_STYLE_ATT,
|
||||
/* force_memory_size */ ZYAN_FALSE,
|
||||
/* force_memory_seg */ ZYAN_FALSE,
|
||||
/* force_memory_scale */ ZYAN_TRUE,
|
||||
/* force_relative_branches */ ZYAN_FALSE,
|
||||
/* force_relative_riprel */ ZYAN_FALSE,
|
||||
/* print_branch_size */ ZYAN_FALSE,
|
||||
|
@ -157,7 +161,7 @@ static const ZydisFormatter FORMATTER_ATT =
|
|||
/* func_format_operand_imm */ &ZydisFormatterBaseFormatOperandIMM,
|
||||
/* func_print_mnemonic */ &ZydisFormatterATTPrintMnemonic,
|
||||
/* func_print_register */ &ZydisFormatterATTPrintRegister,
|
||||
/* func_print_address_abs */ &ZydisFormatterBasePrintAddressABS,
|
||||
/* func_print_address_abs */ &ZydisFormatterATTPrintAddressABS,
|
||||
/* func_print_address_rel */ &ZydisFormatterBasePrintAddressREL,
|
||||
/* func_print_disp */ &ZydisFormatterATTPrintDISP,
|
||||
/* func_print_imm */ &ZydisFormatterATTPrintIMM,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Provides formatter functions that are shared between the different formatters.
|
||||
* Provides formatter functions that are shared between the different formatters.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_FORMATTER_BASE_H
|
||||
|
@ -48,7 +48,7 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Appends an unsigned numeric value to the given string.
|
||||
* Appends an unsigned numeric value to the given string.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param base The numeric base.
|
||||
|
@ -75,7 +75,7 @@ extern "C" {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Appends a signed numeric value to the given string.
|
||||
* Appends a signed numeric value to the given string.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param base The numeric base.
|
||||
|
@ -107,8 +107,8 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Invokes the `ZydisFormatterBufferAppend` routine, if tokenization is enabled for the
|
||||
* current pass.
|
||||
* Invokes the `ZydisFormatterBufferAppend` routine, if tokenization is enabled for the
|
||||
* current pass.
|
||||
*
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param type The token type.
|
||||
|
@ -123,7 +123,7 @@ extern "C" {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a snapshot of the buffer-state.
|
||||
* Returns a snapshot of the buffer-state.
|
||||
*
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param state Receives a snapshot of the buffer-state.
|
||||
|
@ -141,10 +141,10 @@ extern "C" {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Appends a string (`STR_`-prefix) or a predefined token-list (`TOK_`-prefix).
|
||||
* Appends a string (`STR_`-prefix) or a predefined token-list (`TOK_`-prefix).
|
||||
*
|
||||
* @brief buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @brief name The base name (without prefix) of the string- or token.
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param name The base name (without prefix) of the string- or token.
|
||||
*/
|
||||
#define ZYDIS_BUFFER_APPEND(buffer, name) \
|
||||
if ((buffer)->is_token_list) \
|
||||
|
@ -158,11 +158,11 @@ extern "C" {
|
|||
// TODO: Implement `letter_case` for predefined tokens
|
||||
|
||||
/**
|
||||
* @brief Appends a string (`STR_`-prefix) or a predefined token-list (`TOK_`-prefix).
|
||||
* Appends a string (`STR_`-prefix) or a predefined token-list (`TOK_`-prefix).
|
||||
*
|
||||
* @brief buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @brief name The base name (without prefix) of the string- or token.
|
||||
* @brief letter-case The desired letter-case.
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param name The base name (without prefix) of the string- or token.
|
||||
* @param letter-case The desired letter-case.
|
||||
*/
|
||||
#define ZYDIS_BUFFER_APPEND_CASE(buffer, name, letter_case) \
|
||||
if ((buffer)->is_token_list) \
|
||||
|
@ -205,7 +205,7 @@ typedef struct ZydisPredefinedToken_
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @brief Appends a predefined token-list to the `buffer`.
|
||||
* Appends a predefined token-list to the `buffer`.
|
||||
*
|
||||
* @param buffer A pointer to the `ZydisFormatterBuffer` struct.
|
||||
* @param data A pointer to the `ZydisPredefinedToken` struct.
|
||||
|
@ -247,8 +247,8 @@ ZYAN_INLINE ZyanStatus ZydisFormatterBufferAppendPredefined(ZydisFormatterBuffer
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the size to be used as explicit size suffix (`AT&T`) or explicit typecast
|
||||
* (`INTEL`), if required.
|
||||
* Returns the size to be used as explicit size suffix (`AT&T`) or explicit typecast
|
||||
* (`INTEL`), if required.
|
||||
*
|
||||
* @param formatter A pointer to the `ZydisFormatter` instance.
|
||||
* @param context A pointer to the `ZydisFormatterContext` struct.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Implements the `INTEL` style instruction-formatter.
|
||||
* Implements the `INTEL` style instruction-formatter.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_FORMATTER_INTEL_H
|
||||
|
@ -87,13 +87,14 @@ ZyanStatus ZydisFormatterIntelPrintAddressMASM(const ZydisFormatter* formatter,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief The default formatter configuration for `INTEL` style disassembly.
|
||||
* The default formatter configuration for `INTEL` style disassembly.
|
||||
*/
|
||||
static const ZydisFormatter FORMATTER_INTEL =
|
||||
{
|
||||
/* style */ ZYDIS_FORMATTER_STYLE_INTEL,
|
||||
/* force_memory_size */ ZYAN_FALSE,
|
||||
/* force_memory_seg */ ZYAN_FALSE,
|
||||
/* force_memory_scale */ ZYAN_TRUE,
|
||||
/* force_relative_branches */ ZYAN_FALSE,
|
||||
/* force_relative_riprel */ ZYAN_FALSE,
|
||||
/* print_branch_size */ ZYAN_FALSE,
|
||||
|
@ -174,13 +175,14 @@ static const ZydisFormatter FORMATTER_INTEL =
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief The default formatter configuration for `MASM` style disassembly.
|
||||
* The default formatter configuration for `MASM` style disassembly.
|
||||
*/
|
||||
static const ZydisFormatter FORMATTER_INTEL_MASM =
|
||||
{
|
||||
/* style */ ZYDIS_FORMATTER_STYLE_INTEL_MASM,
|
||||
/* force_memory_size */ ZYAN_TRUE,
|
||||
/* force_memory_seg */ ZYAN_FALSE,
|
||||
/* force_memory_scale */ ZYAN_TRUE,
|
||||
/* force_relative_branches */ ZYAN_FALSE,
|
||||
/* force_relative_riprel */ ZYAN_FALSE,
|
||||
/* print_branch_size */ ZYAN_FALSE,
|
||||
|
|
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisSemanticOperandType` enum.
|
||||
* Defines the `ZydisSemanticOperandType` enum.
|
||||
*/
|
||||
typedef enum ZydisSemanticOperandType_
|
||||
{
|
||||
|
@ -75,6 +75,7 @@ typedef enum ZydisSemanticOperandType_
|
|||
ZYDIS_SEMANTIC_OPTYPE_XMM,
|
||||
ZYDIS_SEMANTIC_OPTYPE_YMM,
|
||||
ZYDIS_SEMANTIC_OPTYPE_ZMM,
|
||||
ZYDIS_SEMANTIC_OPTYPE_TMM,
|
||||
ZYDIS_SEMANTIC_OPTYPE_BND,
|
||||
ZYDIS_SEMANTIC_OPTYPE_SREG,
|
||||
ZYDIS_SEMANTIC_OPTYPE_CR,
|
||||
|
@ -92,11 +93,11 @@ typedef enum ZydisSemanticOperandType_
|
|||
ZYDIS_SEMANTIC_OPTYPE_MIB,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_SEMANTIC_OPTYPE_MAX_VALUE = ZYDIS_SEMANTIC_OPTYPE_MIB,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_SEMANTIC_OPTYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_SEMANTIC_OPTYPE_MAX_VALUE)
|
||||
} ZydisSemanticOperandType;
|
||||
|
@ -104,7 +105,7 @@ typedef enum ZydisSemanticOperandType_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInternalElementType` enum.
|
||||
* Defines the `ZydisInternalElementType` enum.
|
||||
*/
|
||||
typedef enum ZydisInternalElementType_
|
||||
{
|
||||
|
@ -125,6 +126,7 @@ typedef enum ZydisInternalElementType_
|
|||
ZYDIS_IELEMENT_TYPE_UINT128,
|
||||
ZYDIS_IELEMENT_TYPE_UINT256,
|
||||
ZYDIS_IELEMENT_TYPE_FLOAT16,
|
||||
ZYDIS_IELEMENT_TYPE_FLOAT16X2,
|
||||
ZYDIS_IELEMENT_TYPE_FLOAT32,
|
||||
ZYDIS_IELEMENT_TYPE_FLOAT64,
|
||||
ZYDIS_IELEMENT_TYPE_FLOAT80,
|
||||
|
@ -133,11 +135,11 @@ typedef enum ZydisInternalElementType_
|
|||
ZYDIS_IELEMENT_TYPE_CC5,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_IELEMENT_TYPE_MAX_VALUE = ZYDIS_IELEMENT_TYPE_CC5,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_IELEMENT_TYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IELEMENT_TYPE_MAX_VALUE)
|
||||
} ZydisInternalElementType;
|
||||
|
@ -145,7 +147,7 @@ typedef enum ZydisInternalElementType_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisImplicitRegisterType` enum.
|
||||
* Defines the `ZydisImplicitRegisterType` enum.
|
||||
*/
|
||||
typedef enum ZydisImplicitRegisterType_
|
||||
{
|
||||
|
@ -158,11 +160,11 @@ typedef enum ZydisImplicitRegisterType_
|
|||
ZYDIS_IMPLREG_TYPE_FLAGS_SSZ,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_IMPLREG_TYPE_MAX_VALUE = ZYDIS_IMPLREG_TYPE_FLAGS_SSZ,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_IMPLREG_TYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IMPLREG_TYPE_MAX_VALUE)
|
||||
} ZydisImplicitRegisterType;
|
||||
|
@ -170,7 +172,7 @@ typedef enum ZydisImplicitRegisterType_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisImplicitMemBase` enum.
|
||||
* Defines the `ZydisImplicitMemBase` enum.
|
||||
*/
|
||||
typedef enum ZydisImplicitMemBase_
|
||||
{
|
||||
|
@ -179,17 +181,17 @@ typedef enum ZydisImplicitMemBase_
|
|||
ZYDIS_IMPLMEM_BASE_AAX,
|
||||
ZYDIS_IMPLMEM_BASE_ADX,
|
||||
ZYDIS_IMPLMEM_BASE_ABX,
|
||||
ZYDIS_IMPLMEM_BASE_ASP,
|
||||
ZYDIS_IMPLMEM_BASE_ABP,
|
||||
ZYDIS_IMPLMEM_BASE_ASI,
|
||||
ZYDIS_IMPLMEM_BASE_ADI,
|
||||
ZYDIS_IMPLMEM_BASE_SSP,
|
||||
ZYDIS_IMPLMEM_BASE_SBP,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_IMPLMEM_BASE_MAX_VALUE = ZYDIS_IMPLMEM_BASE_ADI,
|
||||
ZYDIS_IMPLMEM_BASE_MAX_VALUE = ZYDIS_IMPLMEM_BASE_SBP,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_IMPLMEM_BASE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IMPLMEM_BASE_MAX_VALUE)
|
||||
} ZydisImplicitMemBase;
|
||||
|
@ -208,7 +210,7 @@ ZYAN_STATIC_ASSERT(ZYDIS_REGISTER_REQUIRED_BITS <= 16);
|
|||
ZYAN_STATIC_ASSERT(ZYDIS_IMPLMEM_BASE_REQUIRED_BITS <= 8);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisOperandDefinition` struct.
|
||||
* Defines the `ZydisOperandDefinition` struct.
|
||||
*/
|
||||
typedef struct ZydisOperandDefinition_
|
||||
{
|
||||
|
@ -235,6 +237,8 @@ typedef struct ZydisOperandDefinition_
|
|||
ZyanU8 base ZYAN_BITFIELD(ZYDIS_IMPLMEM_BASE_REQUIRED_BITS);
|
||||
} mem;
|
||||
} op;
|
||||
ZyanBool is_multisource4 ZYAN_BITFIELD(1);
|
||||
ZyanBool ignore_seg_override ZYAN_BITFIELD(1);
|
||||
} ZydisOperandDefinition;
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
@ -242,7 +246,7 @@ typedef struct ZydisOperandDefinition_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisReadWriteAction` enum.
|
||||
* Defines the `ZydisReadWriteAction` enum.
|
||||
*/
|
||||
typedef enum ZydisReadWriteAction_
|
||||
{
|
||||
|
@ -252,11 +256,11 @@ typedef enum ZydisReadWriteAction_
|
|||
ZYDIS_RW_ACTION_READWRITE,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_RW_ACTION_MAX_VALUE = ZYDIS_RW_ACTION_READWRITE,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_RW_ACTION_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_RW_ACTION_MAX_VALUE)
|
||||
} ZydisReadWriteAction;
|
||||
|
@ -264,7 +268,7 @@ typedef enum ZydisReadWriteAction_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisRegisterConstraint` enum.
|
||||
* Defines the `ZydisRegisterConstraint` enum.
|
||||
*/
|
||||
typedef enum ZydisRegisterConstraint_
|
||||
{
|
||||
|
@ -278,13 +282,14 @@ typedef enum ZydisRegisterConstraint_
|
|||
ZYDIS_REG_CONSTRAINTS_MASK,
|
||||
ZYDIS_REG_CONSTRAINTS_BND,
|
||||
ZYDIS_REG_CONSTRAINTS_VSIB,
|
||||
ZYDIS_REG_CONSTRAINTS_NO_REL,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_REG_CONSTRAINTS_MAX_VALUE = ZYDIS_REG_CONSTRAINTS_VSIB,
|
||||
ZYDIS_REG_CONSTRAINTS_MAX_VALUE = ZYDIS_REG_CONSTRAINTS_NO_REL,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_REG_CONSTRAINTS_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_REG_CONSTRAINTS_MAX_VALUE)
|
||||
} ZydisRegisterConstraint;
|
||||
|
@ -292,7 +297,7 @@ typedef enum ZydisRegisterConstraint_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInternalVectorLength` enum.
|
||||
* Defines the `ZydisInternalVectorLength` enum.
|
||||
*/
|
||||
typedef enum ZydisInternalVectorLength_
|
||||
{
|
||||
|
@ -302,11 +307,11 @@ typedef enum ZydisInternalVectorLength_
|
|||
ZYDIS_IVECTOR_LENGTH_FIXED_512,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_IVECTOR_LENGTH_MAX_VALUE = ZYDIS_IVECTOR_LENGTH_FIXED_512,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_IVECTOR_LENGTH_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IVECTOR_LENGTH_MAX_VALUE)
|
||||
} ZydisInternalVectorLength;
|
||||
|
@ -314,7 +319,7 @@ typedef enum ZydisInternalVectorLength_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInternalElementSize` enum.
|
||||
* Defines the `ZydisInternalElementSize` enum.
|
||||
*/
|
||||
typedef enum ZydisInternalElementSize_
|
||||
{
|
||||
|
@ -326,11 +331,11 @@ typedef enum ZydisInternalElementSize_
|
|||
ZYDIS_IELEMENT_SIZE_128,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_IELEMENT_SIZE_MAX_VALUE = ZYDIS_IELEMENT_SIZE_128,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_IELEMENT_SIZE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IELEMENT_SIZE_MAX_VALUE)
|
||||
} ZydisInternalElementSize;
|
||||
|
@ -338,30 +343,30 @@ typedef enum ZydisInternalElementSize_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisEVEXFunctionality` enum.
|
||||
* Defines the `ZydisEVEXFunctionality` enum.
|
||||
*/
|
||||
typedef enum ZydisEVEXFunctionality_
|
||||
{
|
||||
ZYDIS_EVEX_FUNC_INVALID,
|
||||
/**
|
||||
* @brief `EVEX.b` enables broadcast functionality.
|
||||
* `EVEX.b` enables broadcast functionality.
|
||||
*/
|
||||
ZYDIS_EVEX_FUNC_BC,
|
||||
/**
|
||||
* @brief `EVEX.b` enables embedded-rounding functionality.
|
||||
* `EVEX.b` enables embedded-rounding functionality.
|
||||
*/
|
||||
ZYDIS_EVEX_FUNC_RC,
|
||||
/**
|
||||
* @brief `EVEX.b` enables sae functionality.
|
||||
* `EVEX.b` enables sae functionality.
|
||||
*/
|
||||
ZYDIS_EVEX_FUNC_SAE,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_EVEX_FUNC_MAX_VALUE = ZYDIS_EVEX_FUNC_SAE,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_EVEX_FUNC_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_EVEX_FUNC_MAX_VALUE)
|
||||
} ZydisEVEXFunctionality;
|
||||
|
@ -369,78 +374,82 @@ typedef enum ZydisEVEXFunctionality_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisEVEXTupleType` enum.
|
||||
* Defines the `ZydisEVEXTupleType` enum.
|
||||
*/
|
||||
typedef enum ZydisEVEXTupleType_
|
||||
{
|
||||
ZYDIS_TUPLETYPE_INVALID,
|
||||
/**
|
||||
* @brief Full Vector
|
||||
* Full Vector
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_FV,
|
||||
/**
|
||||
* @brief Half Vector
|
||||
* Half Vector
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_HV,
|
||||
/**
|
||||
* @brief Full Vector Mem
|
||||
* Full Vector Mem
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_FVM,
|
||||
/**
|
||||
* @brief Tuple1 Scalar
|
||||
* Tuple1 Scalar
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_T1S,
|
||||
/**
|
||||
* @brief Tuple1 Fixed
|
||||
* Tuple1 Fixed
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_T1F,
|
||||
/**
|
||||
* @brief Tuple1 4x32
|
||||
* Tuple1 4x32
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_T1_4X,
|
||||
/**
|
||||
* @brief Gather / Scatter
|
||||
* Gather / Scatter
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_GSCAT,
|
||||
/**
|
||||
* @brief Tuple2
|
||||
* Tuple2
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_T2,
|
||||
/**
|
||||
* @brief Tuple4
|
||||
* Tuple4
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_T4,
|
||||
/**
|
||||
* @brief Tuple8
|
||||
* Tuple8
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_T8,
|
||||
/**
|
||||
* @brief Half Mem
|
||||
* Half Mem
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_HVM,
|
||||
/**
|
||||
* @brief QuarterMem
|
||||
* QuarterMem
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_QVM,
|
||||
/**
|
||||
* @brief OctMem
|
||||
* OctMem
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_OVM,
|
||||
/**
|
||||
* @brief Mem128
|
||||
* Mem128
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_M128,
|
||||
/**
|
||||
* @brief MOVDDUP
|
||||
* MOVDDUP
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_DUP,
|
||||
/**
|
||||
* Quarter of the vector-length.
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_QUARTER,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_MAX_VALUE = ZYDIS_TUPLETYPE_DUP,
|
||||
ZYDIS_TUPLETYPE_MAX_VALUE = ZYDIS_TUPLETYPE_QUARTER,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_TUPLETYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_TUPLETYPE_MAX_VALUE)
|
||||
} ZydisEVEXTupleType;
|
||||
|
@ -448,121 +457,121 @@ typedef enum ZydisEVEXTupleType_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisMVEXFunctionality` enum.
|
||||
* Defines the `ZydisMVEXFunctionality` enum.
|
||||
*/
|
||||
typedef enum ZydisMVEXFunctionality_
|
||||
{
|
||||
/**
|
||||
* @brief The `MVEX.SSS` value is ignored.
|
||||
* The `MVEX.SSS` value is ignored.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_IGNORED,
|
||||
/**
|
||||
* @brief `MVEX.SSS` must be `000b`.
|
||||
* `MVEX.SSS` must be `000b`.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_INVALID,
|
||||
/**
|
||||
* @brief `MVEX.SSS` controls embedded-rounding functionality.
|
||||
* `MVEX.SSS` controls embedded-rounding functionality.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_RC,
|
||||
/**
|
||||
* @brief `MVEX.SSS` controls sae functionality.
|
||||
* `MVEX.SSS` controls sae functionality.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SAE,
|
||||
/**
|
||||
* @brief No special operation (32bit float elements).
|
||||
* No special operation (32bit float elements).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_F_32,
|
||||
/**
|
||||
* @brief No special operation (32bit uint elements).
|
||||
* No special operation (32bit uint elements).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_I_32,
|
||||
/**
|
||||
* @brief No special operation (64bit float elements).
|
||||
* No special operation (64bit float elements).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_F_64,
|
||||
/**
|
||||
* @brief No special operation (64bit uint elements).
|
||||
* No special operation (64bit uint elements).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_I_64,
|
||||
/**
|
||||
* @brief Sf32(reg) or Si32(reg).
|
||||
* Sf32(reg) or Si32(reg).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SWIZZLE_32,
|
||||
/**
|
||||
* @brief Sf64(reg) or Si64(reg).
|
||||
* Sf64(reg) or Si64(reg).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SWIZZLE_64,
|
||||
/**
|
||||
* @brief Sf32(mem).
|
||||
* Sf32(mem).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SF_32,
|
||||
/**
|
||||
* @brief Sf32(mem) broadcast only.
|
||||
* Sf32(mem) broadcast only.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SF_32_BCST,
|
||||
/**
|
||||
* @brief Sf32(mem) broadcast 4to16 only.
|
||||
* Sf32(mem) broadcast 4to16 only.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SF_32_BCST_4TO16,
|
||||
/**
|
||||
* @brief Sf64(mem).
|
||||
* Sf64(mem).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SF_64,
|
||||
/**
|
||||
* @brief Si32(mem).
|
||||
* Si32(mem).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SI_32,
|
||||
/**
|
||||
* @brief Si32(mem) broadcast only.
|
||||
* Si32(mem) broadcast only.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SI_32_BCST,
|
||||
/**
|
||||
* @brief Si32(mem) broadcast 4to16 only.
|
||||
* Si32(mem) broadcast 4to16 only.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SI_32_BCST_4TO16,
|
||||
/**
|
||||
* @brief Si64(mem).
|
||||
* Si64(mem).
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_SI_64,
|
||||
/**
|
||||
* @brief Uf32.
|
||||
* Uf32.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_UF_32,
|
||||
/**
|
||||
* @brief Uf64.
|
||||
* Uf64.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_UF_64,
|
||||
/**
|
||||
* @brief Ui32.
|
||||
* Ui32.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_UI_32,
|
||||
/**
|
||||
* @brief Ui64.
|
||||
* Ui64.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_UI_64,
|
||||
/**
|
||||
* @brief Df32.
|
||||
* Df32.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_DF_32,
|
||||
/**
|
||||
* @brief Df64.
|
||||
* Df64.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_DF_64,
|
||||
/**
|
||||
* @brief Di32.
|
||||
* Di32.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_DI_32,
|
||||
/**
|
||||
* @brief Di64.
|
||||
* Di64.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_DI_64,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_MAX_VALUE = ZYDIS_MVEX_FUNC_DI_64,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_MVEX_FUNC_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MVEX_FUNC_MAX_VALUE)
|
||||
} ZydisMVEXFunctionality;
|
||||
|
@ -570,7 +579,7 @@ typedef enum ZydisMVEXFunctionality_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisVEXStaticBroadcast` enum.
|
||||
* Defines the `ZydisVEXStaticBroadcast` enum.
|
||||
*/
|
||||
typedef enum ZydisVEXStaticBroadcast
|
||||
{
|
||||
|
@ -583,11 +592,11 @@ typedef enum ZydisVEXStaticBroadcast
|
|||
ZYDIS_VEX_STATIC_BROADCAST_2_TO_4,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_VEX_STATIC_BROADCAST_MAX_VALUE = ZYDIS_VEX_STATIC_BROADCAST_2_TO_4,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_VEX_STATIC_BROADCAST_REQUIRED_BITS =
|
||||
ZYAN_BITS_TO_REPRESENT(ZYDIS_VEX_STATIC_BROADCAST_MAX_VALUE)
|
||||
|
@ -596,7 +605,7 @@ typedef enum ZydisVEXStaticBroadcast
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisEVEXStaticBroadcast` enum.
|
||||
* Defines the `ZydisEVEXStaticBroadcast` enum.
|
||||
*/
|
||||
typedef enum ZydisEVEXStaticBroadcast_
|
||||
{
|
||||
|
@ -615,11 +624,11 @@ typedef enum ZydisEVEXStaticBroadcast_
|
|||
ZYDIS_EVEX_STATIC_BROADCAST_8_TO_16,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_EVEX_STATIC_BROADCAST_MAX_VALUE = ZYDIS_EVEX_STATIC_BROADCAST_8_TO_16,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_EVEX_STATIC_BROADCAST_REQUIRED_BITS =
|
||||
ZYAN_BITS_TO_REPRESENT(ZYDIS_EVEX_STATIC_BROADCAST_MAX_VALUE)
|
||||
|
@ -628,7 +637,7 @@ typedef enum ZydisEVEXStaticBroadcast_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisMVEXStaticBroadcast` enum.
|
||||
* Defines the `ZydisMVEXStaticBroadcast` enum.
|
||||
*/
|
||||
typedef enum ZydisMVEXStaticBroadcast_
|
||||
{
|
||||
|
@ -639,11 +648,11 @@ typedef enum ZydisMVEXStaticBroadcast_
|
|||
ZYDIS_MVEX_STATIC_BROADCAST_4_TO_16,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_MVEX_STATIC_BROADCAST_MAX_VALUE = ZYDIS_MVEX_STATIC_BROADCAST_4_TO_16,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_MVEX_STATIC_BROADCAST_REQUIRED_BITS =
|
||||
ZYAN_BITS_TO_REPRESENT(ZYDIS_MVEX_STATIC_BROADCAST_MAX_VALUE)
|
||||
|
@ -652,31 +661,31 @@ typedef enum ZydisMVEXStaticBroadcast_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisMaskPolicy` enum.
|
||||
* Defines the `ZydisMaskPolicy` enum.
|
||||
*/
|
||||
typedef enum ZydisMaskPolicy_
|
||||
{
|
||||
ZYDIS_MASK_POLICY_INVALID,
|
||||
/**
|
||||
* @brief The instruction accepts mask-registers other than the default-mask (K0), but
|
||||
* The instruction accepts mask-registers other than the default-mask (K0), but
|
||||
* does not require them.
|
||||
*/
|
||||
ZYDIS_MASK_POLICY_ALLOWED,
|
||||
/**
|
||||
* @brief The instruction requires a mask-register other than the default-mask (K0).
|
||||
* The instruction requires a mask-register other than the default-mask (K0).
|
||||
*/
|
||||
ZYDIS_MASK_POLICY_REQUIRED,
|
||||
/**
|
||||
* @brief The instruction does not allow a mask-register other than the default-mask (K0).
|
||||
* The instruction does not allow a mask-register other than the default-mask (K0).
|
||||
*/
|
||||
ZYDIS_MASK_POLICY_FORBIDDEN,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_MASK_POLICY_MAX_VALUE = ZYDIS_MASK_POLICY_FORBIDDEN,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_MASK_POLICY_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MASK_POLICY_MAX_VALUE)
|
||||
} ZydisMaskPolicy;
|
||||
|
@ -684,7 +693,7 @@ typedef enum ZydisMaskPolicy_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisMaskOverride` enum.
|
||||
* Defines the `ZydisMaskOverride` enum.
|
||||
*/
|
||||
typedef enum ZydisMaskOverride_
|
||||
{
|
||||
|
@ -693,11 +702,11 @@ typedef enum ZydisMaskOverride_
|
|||
ZYDIS_MASK_OVERRIDE_CONTROL,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_MASK_OVERRIDE_MAX_VALUE = ZYDIS_MASK_OVERRIDE_CONTROL,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_MASK_OVERRIDE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MASK_OVERRIDE_MAX_VALUE)
|
||||
} ZydisMaskOverride;
|
||||
|
@ -724,6 +733,7 @@ ZYAN_STATIC_ASSERT(ZYDIS_RW_ACTION_REQUIRED_BITS <= 8);
|
|||
ZyanU8 address_size_map ZYAN_BITFIELD( 2); \
|
||||
ZyanU8 flags_reference ZYAN_BITFIELD( 7); \
|
||||
ZyanBool requires_protected_mode ZYAN_BITFIELD( 1); \
|
||||
ZyanBool no_compat_mode ZYAN_BITFIELD( 1); \
|
||||
ZyanU8 category ZYAN_BITFIELD(ZYDIS_CATEGORY_REQUIRED_BITS); \
|
||||
ZyanU8 isa_set ZYAN_BITFIELD(ZYDIS_ISA_SET_REQUIRED_BITS); \
|
||||
ZyanU8 isa_ext ZYAN_BITFIELD(ZYDIS_ISA_EXT_REQUIRED_BITS); \
|
||||
|
@ -733,7 +743,8 @@ ZYAN_STATIC_ASSERT(ZYDIS_RW_ACTION_REQUIRED_BITS <= 8);
|
|||
ZyanU8 constr_RM ZYAN_BITFIELD(ZYDIS_REG_CONSTRAINTS_REQUIRED_BITS); \
|
||||
ZyanU8 cpu_state ZYAN_BITFIELD(ZYDIS_RW_ACTION_REQUIRED_BITS); \
|
||||
ZyanU8 fpu_state ZYAN_BITFIELD(ZYDIS_RW_ACTION_REQUIRED_BITS); \
|
||||
ZyanU8 xmm_state ZYAN_BITFIELD(ZYDIS_RW_ACTION_REQUIRED_BITS)
|
||||
ZyanU8 xmm_state ZYAN_BITFIELD(ZYDIS_RW_ACTION_REQUIRED_BITS); \
|
||||
ZyanBool accepts_segment ZYAN_BITFIELD( 1)
|
||||
#else
|
||||
# define ZYDIS_INSTRUCTION_DEFINITION_BASE \
|
||||
ZyanU16 mnemonic ZYAN_BITFIELD(ZYDIS_MNEMONIC_REQUIRED_BITS); \
|
||||
|
@ -750,10 +761,11 @@ ZYAN_STATIC_ASSERT(ZYDIS_RW_ACTION_REQUIRED_BITS <= 8);
|
|||
|
||||
#define ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR_INTEL \
|
||||
ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR; \
|
||||
ZyanBool is_gather ZYAN_BITFIELD( 1)
|
||||
ZyanBool is_gather ZYAN_BITFIELD( 1); \
|
||||
ZyanBool no_source_dest_match ZYAN_BITFIELD( 1)
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionDefinition` struct.
|
||||
* Defines the `ZydisInstructionDefinition` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionDefinition_
|
||||
{
|
||||
|
@ -761,7 +773,7 @@ typedef struct ZydisInstructionDefinition_
|
|||
} ZydisInstructionDefinition;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionDefinitionLEGACY` struct.
|
||||
* Defines the `ZydisInstructionDefinitionLEGACY` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionDefinitionLEGACY_
|
||||
{
|
||||
|
@ -777,14 +789,14 @@ typedef struct ZydisInstructionDefinitionLEGACY_
|
|||
ZyanBool accepts_BOUND ZYAN_BITFIELD( 1);
|
||||
ZyanBool accepts_XACQUIRE ZYAN_BITFIELD( 1);
|
||||
ZyanBool accepts_XRELEASE ZYAN_BITFIELD( 1);
|
||||
ZyanBool accepts_NOTRACK ZYAN_BITFIELD( 1);
|
||||
ZyanBool accepts_hle_without_lock ZYAN_BITFIELD( 1);
|
||||
ZyanBool accepts_branch_hints ZYAN_BITFIELD( 1);
|
||||
ZyanBool accepts_segment ZYAN_BITFIELD( 1);
|
||||
#endif
|
||||
} ZydisInstructionDefinitionLEGACY;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionDefinition3DNOW` struct.
|
||||
* Defines the `ZydisInstructionDefinition3DNOW` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionDefinition3DNOW_
|
||||
{
|
||||
|
@ -792,7 +804,7 @@ typedef struct ZydisInstructionDefinition3DNOW_
|
|||
} ZydisInstructionDefinition3DNOW;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionDefinitionXOP` struct.
|
||||
* Defines the `ZydisInstructionDefinitionXOP` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionDefinitionXOP_
|
||||
{
|
||||
|
@ -804,7 +816,7 @@ typedef struct ZydisInstructionDefinitionXOP_
|
|||
ZYAN_STATIC_ASSERT(ZYDIS_VEX_STATIC_BROADCAST_REQUIRED_BITS <= 8);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionDefinitionVEX` struct.
|
||||
* Defines the `ZydisInstructionDefinitionVEX` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionDefinitionVEX_
|
||||
{
|
||||
|
@ -827,7 +839,7 @@ ZYAN_STATIC_ASSERT(ZYDIS_MASK_OVERRIDE_REQUIRED_BITS <= 8);
|
|||
ZYAN_STATIC_ASSERT(ZYDIS_EVEX_STATIC_BROADCAST_REQUIRED_BITS <= 8);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionDefinitionEVEX` struct.
|
||||
* Defines the `ZydisInstructionDefinitionEVEX` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionDefinitionEVEX_
|
||||
{
|
||||
|
@ -856,7 +868,7 @@ ZYAN_STATIC_ASSERT(ZYDIS_MASK_POLICY_REQUIRED_BITS <= 8);
|
|||
ZYAN_STATIC_ASSERT(ZYDIS_MVEX_STATIC_BROADCAST_REQUIRED_BITS <= 8);
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionDefinitionMVEX` struct.
|
||||
* Defines the `ZydisInstructionDefinitionMVEX` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionDefinitionMVEX_
|
||||
{
|
||||
|
@ -877,6 +889,10 @@ typedef struct ZydisInstructionDefinitionMVEX_
|
|||
typedef struct ZydisAccessedFlags_
|
||||
{
|
||||
ZydisCPUFlagAction action[ZYDIS_CPUFLAG_MAX_VALUE + 1];
|
||||
ZyanU32 cpu_flags_read ZYAN_BITFIELD(22);
|
||||
ZyanU32 cpu_flags_written ZYAN_BITFIELD(22);
|
||||
ZyanU8 fpu_flags_read ZYAN_BITFIELD( 4);
|
||||
ZyanU8 fpu_flags_written ZYAN_BITFIELD( 4);
|
||||
} ZydisAccessedFlags;
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
@ -896,7 +912,7 @@ typedef struct ZydisAccessedFlags_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the instruction-definition with the given `encoding` and `id`.
|
||||
* Returns the instruction-definition with the given `encoding` and `id`.
|
||||
*
|
||||
* @param encoding The instruction-encoding.
|
||||
* @param id The definition-id.
|
||||
|
@ -912,7 +928,7 @@ ZYDIS_NO_EXPORT void ZydisGetInstructionDefinition(ZydisInstructionEncoding enco
|
|||
|
||||
#ifndef ZYDIS_MINIMAL_MODE
|
||||
/**
|
||||
* @brief Returns the the operand-definitions for the given instruction-`definition`.
|
||||
* Returns the the operand-definitions for the given instruction-`definition`.
|
||||
*
|
||||
* @param definition A pointer to the instruction-definition.
|
||||
* @param operand A pointer to the variable that receives a pointer to the first operand-
|
||||
|
@ -930,7 +946,7 @@ ZYDIS_NO_EXPORT ZyanU8 ZydisGetOperandDefinitions(const ZydisInstructionDefiniti
|
|||
|
||||
#ifndef ZYDIS_MINIMAL_MODE
|
||||
/**
|
||||
* @brief Returns the actual type and size of an internal element-type.
|
||||
* Returns the actual type and size of an internal element-type.
|
||||
*
|
||||
* @param element The internal element type.
|
||||
* @param type The actual element type.
|
||||
|
@ -946,7 +962,7 @@ ZYDIS_NO_EXPORT void ZydisGetElementInfo(ZydisInternalElementType element, Zydis
|
|||
|
||||
#ifndef ZYDIS_MINIMAL_MODE
|
||||
/**
|
||||
* @brief Returns the the operand-definitions for the given instruction-`definition`.
|
||||
* Returns the the operand-definitions for the given instruction-`definition`.
|
||||
*
|
||||
* @param definition A pointer to the instruction-definition.
|
||||
* @param flags A pointer to the variable that receives the `ZydisAccessedFlags` struct.
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Provides some internal, more performant, but unsafe helper functions for the
|
||||
* `ZyanString` data-type.
|
||||
* Provides some internal, more performant, but unsafe helper functions for the `ZyanString`
|
||||
* data-type.
|
||||
*
|
||||
* Most of these functions are very similar to the ones in `Zycore/String.h`, but inlined and
|
||||
* without optional overhead like parameter-validation checks, etc ...
|
||||
|
@ -43,6 +43,7 @@
|
|||
#include "zydis/Zycore/LibC.h"
|
||||
#include "zydis/Zycore/String.h"
|
||||
#include "zydis/Zycore/Types.h"
|
||||
#include "zydis/Zycore/Format.h"
|
||||
#include "zydis/Zydis/ShortString.h"
|
||||
#include "zydis/Zydis/Status.h"
|
||||
|
||||
|
@ -59,29 +60,29 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisLetterCase` enum.
|
||||
* Defines the `ZydisLetterCase` enum.
|
||||
*/
|
||||
typedef enum ZydisLetterCase_
|
||||
{
|
||||
/**
|
||||
* @brief Uses the given text "as is".
|
||||
* Uses the given text "as is".
|
||||
*/
|
||||
ZYDIS_LETTER_CASE_DEFAULT,
|
||||
/**
|
||||
* @brief Converts the given text to lowercase letters.
|
||||
* Converts the given text to lowercase letters.
|
||||
*/
|
||||
ZYDIS_LETTER_CASE_LOWER,
|
||||
/**
|
||||
* @brief Converts the given text to uppercase letters.
|
||||
* Converts the given text to uppercase letters.
|
||||
*/
|
||||
ZYDIS_LETTER_CASE_UPPER,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_LETTER_CASE_MAX_VALUE = ZYDIS_LETTER_CASE_UPPER,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_LETTER_CASE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_LETTER_CASE_MAX_VALUE)
|
||||
} ZydisLetterCase;
|
||||
|
@ -97,13 +98,13 @@ typedef enum ZydisLetterCase_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Checks for a terminating '\0' character at the end of the string data.
|
||||
* Checks for a terminating '\0' character at the end of the string data.
|
||||
*/
|
||||
#define ZYDIS_STRING_ASSERT_NULLTERMINATION(string) \
|
||||
ZYAN_ASSERT(*(char*)((ZyanU8*)(string)->vector.data + (string)->vector.size - 1) == '\0');
|
||||
|
||||
/**
|
||||
* @brief Writes a terminating '\0' character at the end of the string data.
|
||||
* Writes a terminating '\0' character at the end of the string data.
|
||||
*/
|
||||
#define ZYDIS_STRING_NULLTERMINATE(string) \
|
||||
*(char*)((ZyanU8*)(string)->vector.data + (string)->vector.size - 1) = '\0';
|
||||
|
@ -119,7 +120,7 @@ typedef enum ZydisLetterCase_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Appends the content of the source string to the end of the destination string.
|
||||
* Appends the content of the source string to the end of the destination string.
|
||||
*
|
||||
* @param destination The destination string.
|
||||
* @param source The source string.
|
||||
|
@ -147,8 +148,8 @@ ZYAN_INLINE ZyanStatus ZydisStringAppend(ZyanString* destination, const ZyanStri
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Appends the content of the source string to the end of the destination string,
|
||||
* converting the characters to the specified letter-case.
|
||||
* Appends the content of the source string to the end of the destination
|
||||
* string, converting the characters to the specified letter-case.
|
||||
*
|
||||
* @param destination The destination string.
|
||||
* @param source The source string.
|
||||
|
@ -218,7 +219,7 @@ ZYAN_INLINE ZyanStatus ZydisStringAppendCase(ZyanString* destination, const Zyan
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Appends the content of the source short-string to the end of the destination string.
|
||||
* Appends the content of the source short-string to the end of the destination string.
|
||||
*
|
||||
* @param destination The destination string.
|
||||
* @param source The source string.
|
||||
|
@ -247,8 +248,8 @@ ZYAN_INLINE ZyanStatus ZydisStringAppendShort(ZyanString* destination,
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Appends the content of the source short-string to the end of the destination string,
|
||||
* converting the characters to the specified letter-case.
|
||||
* Appends the content of the source short-string to the end of the destination string,
|
||||
* converting the characters to the specified letter-case.
|
||||
*
|
||||
* @param destination The destination string.
|
||||
* @param source The source string.
|
||||
|
@ -322,8 +323,8 @@ ZYAN_INLINE ZyanStatus ZydisStringAppendShortCase(ZyanString* destination,
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Formats the given unsigned ordinal `value` to its decimal text-representation and
|
||||
* appends it to the `string`.
|
||||
* Formats the given unsigned ordinal `value` to its decimal text-representation and
|
||||
* appends it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param value The value.
|
||||
|
@ -341,8 +342,8 @@ ZyanStatus ZydisStringAppendDecU(ZyanString* string, ZyanU64 value, ZyanU8 paddi
|
|||
const ZyanStringView* prefix, const ZyanStringView* suffix);
|
||||
|
||||
/**
|
||||
* @brief Formats the given signed ordinal `value` to its decimal text-representation and
|
||||
* appends it to the `string`.
|
||||
* Formats the given signed ordinal `value` to its decimal text-representation and
|
||||
* appends it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param value The value.
|
||||
|
@ -371,7 +372,7 @@ ZYAN_INLINE ZyanStatus ZydisStringAppendDecS(ZyanString* string, ZyanI64 value,
|
|||
{
|
||||
ZYAN_CHECK(ZydisStringAppend(string, prefix));
|
||||
}
|
||||
return ZydisStringAppendDecU(string, -value, padding_length,
|
||||
return ZydisStringAppendDecU(string, ZyanAbsI64(value), padding_length,
|
||||
(const ZyanStringView*)ZYAN_NULL, suffix);
|
||||
}
|
||||
|
||||
|
@ -384,8 +385,8 @@ ZYAN_INLINE ZyanStatus ZydisStringAppendDecS(ZyanString* string, ZyanI64 value,
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Formats the given unsigned ordinal `value` to its hexadecimal text-representation and
|
||||
* appends it to the `string`.
|
||||
* Formats the given unsigned ordinal `value` to its hexadecimal text-representation and
|
||||
* appends it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the `ZyanString` instance.
|
||||
* @param value The value.
|
||||
|
@ -405,8 +406,8 @@ ZyanStatus ZydisStringAppendHexU(ZyanString* string, ZyanU64 value, ZyanU8 paddi
|
|||
ZyanBool uppercase, const ZyanStringView* prefix, const ZyanStringView* suffix);
|
||||
|
||||
/**
|
||||
* @brief Formats the given signed ordinal `value` to its hexadecimal text-representation and
|
||||
* appends it to the `string`.
|
||||
* Formats the given signed ordinal `value` to its hexadecimal text-representation and
|
||||
* appends it to the `string`.
|
||||
*
|
||||
* @param string A pointer to the string.
|
||||
* @param value The value.
|
||||
|
@ -440,7 +441,7 @@ ZYAN_INLINE ZyanStatus ZydisStringAppendHexS(ZyanString* string, ZyanI64 value,
|
|||
{
|
||||
ZYAN_CHECK(ZydisStringAppend(string, prefix));
|
||||
}
|
||||
return ZydisStringAppendHexU(string, -value, padding_length, uppercase,
|
||||
return ZydisStringAppendHexU(string, ZyanAbsI64(value), padding_length, uppercase,
|
||||
(const ZyanStringView*)ZYAN_NULL, suffix);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2020 Florian Bernd
|
||||
Copyright (c) 2014-2020 Joel Höner
|
||||
Copyright (c) 2014-2021 Florian Bernd
|
||||
Copyright (c) 2014-2021 Joel Höner
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -53,7 +53,7 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Returns the specified instruction category string.
|
||||
* Returns the specified instruction category string.
|
||||
*
|
||||
* @param category The instruction category.
|
||||
*
|
||||
|
@ -62,7 +62,7 @@ extern "C" {
|
|||
ZYDIS_EXPORT const char* ZydisCategoryGetString(ZydisInstructionCategory category);
|
||||
|
||||
/**
|
||||
* @brief Returns the specified isa-set string.
|
||||
* Returns the specified isa-set string.
|
||||
*
|
||||
* @param isa_set The isa-set.
|
||||
*
|
||||
|
@ -71,7 +71,7 @@ ZYDIS_EXPORT const char* ZydisCategoryGetString(ZydisInstructionCategory categor
|
|||
ZYDIS_EXPORT const char* ZydisISASetGetString(ZydisISASet isa_set);
|
||||
|
||||
/**
|
||||
* @brief Returns the specified isa-extension string.
|
||||
* Returns the specified isa-extension string.
|
||||
*
|
||||
* @param isa_ext The isa-extension.
|
||||
*
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Mnemonic constant definitions and helper functions.
|
||||
* Mnemonic constant definitions and helper functions.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_MNEMONIC_H
|
||||
|
@ -51,12 +51,12 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* @addtogroup mnemonic Mnemonic
|
||||
* @brief Functions for retrieving mnemonic names.
|
||||
* Functions for retrieving mnemonic names.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Returns the specified instruction mnemonic string.
|
||||
* Returns the specified instruction mnemonic string.
|
||||
*
|
||||
* @param mnemonic The mnemonic.
|
||||
*
|
||||
|
@ -65,7 +65,7 @@ extern "C" {
|
|||
ZYDIS_EXPORT const char* ZydisMnemonicGetString(ZydisMnemonic mnemonic);
|
||||
|
||||
/**
|
||||
* @brief Returns the specified instruction mnemonic as `ZydisShortString`.
|
||||
* Returns the specified instruction mnemonic as `ZydisShortString`.
|
||||
*
|
||||
* @param mnemonic The mnemonic.
|
||||
*
|
||||
|
|
|
@ -37,55 +37,56 @@
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisRegisterMapItem` struct.
|
||||
* Defines the `ZydisRegisterMapItem` struct.
|
||||
*/
|
||||
typedef struct ZydisRegisterMapItem_
|
||||
{
|
||||
/**
|
||||
* @brief The register class.
|
||||
* The register class.
|
||||
*/
|
||||
ZydisRegisterClass class;
|
||||
/**
|
||||
* @brief The lowest register of the current class.
|
||||
* The lowest register of the current class.
|
||||
*/
|
||||
ZydisRegister lo;
|
||||
/**
|
||||
* @brief The highest register of the current class.
|
||||
* The highest register of the current class.
|
||||
*/
|
||||
ZydisRegister hi;
|
||||
/**
|
||||
* @brief The width of registers of the current class in 16- and 32-bit mode.
|
||||
* The width of registers of the current class in 16- and 32-bit mode.
|
||||
*/
|
||||
ZydisRegisterWidth width;
|
||||
/**
|
||||
* @brief The width of registers of the current class in 64-bit mode.
|
||||
* The width of registers of the current class in 64-bit mode.
|
||||
*/
|
||||
ZydisRegisterWidth width64;
|
||||
} ZydisRegisterMapItem;
|
||||
|
||||
/**
|
||||
* @brief Provides register to register-class and register-class + id to register mappings.
|
||||
* Provides register to register-class and register-class + id to register mappings.
|
||||
*/
|
||||
static const ZydisRegisterMapItem REGISTER_MAP[] =
|
||||
{
|
||||
{ ZYDIS_REGCLASS_INVALID , ZYDIS_REGISTER_NONE , ZYDIS_REGISTER_NONE , 0 , 0 },
|
||||
{ ZYDIS_REGCLASS_GPR8 , ZYDIS_REGISTER_AL , ZYDIS_REGISTER_R15B , 8 , 8 },
|
||||
{ ZYDIS_REGCLASS_GPR16 , ZYDIS_REGISTER_AX , ZYDIS_REGISTER_R15W , 16 , 16 },
|
||||
{ ZYDIS_REGCLASS_GPR32 , ZYDIS_REGISTER_EAX , ZYDIS_REGISTER_R15D , 32 , 32 },
|
||||
{ ZYDIS_REGCLASS_GPR64 , ZYDIS_REGISTER_RAX , ZYDIS_REGISTER_R15 , 0 , 64 },
|
||||
{ ZYDIS_REGCLASS_X87 , ZYDIS_REGISTER_ST0 , ZYDIS_REGISTER_ST7 , 80 , 80 },
|
||||
{ ZYDIS_REGCLASS_MMX , ZYDIS_REGISTER_MM0 , ZYDIS_REGISTER_MM7 , 64 , 64 },
|
||||
{ ZYDIS_REGCLASS_XMM , ZYDIS_REGISTER_XMM0 , ZYDIS_REGISTER_XMM31 , 128 , 128 },
|
||||
{ ZYDIS_REGCLASS_YMM , ZYDIS_REGISTER_YMM0 , ZYDIS_REGISTER_YMM31 , 256 , 256 },
|
||||
{ ZYDIS_REGCLASS_ZMM , ZYDIS_REGISTER_ZMM0 , ZYDIS_REGISTER_ZMM31 , 512 , 512 },
|
||||
{ ZYDIS_REGCLASS_FLAGS , ZYDIS_REGISTER_FLAGS , ZYDIS_REGISTER_RFLAGS , 0 , 0 },
|
||||
{ ZYDIS_REGCLASS_IP , ZYDIS_REGISTER_IP , ZYDIS_REGISTER_RIP , 0 , 0 },
|
||||
{ ZYDIS_REGCLASS_SEGMENT , ZYDIS_REGISTER_ES , ZYDIS_REGISTER_GS , 16 , 16 },
|
||||
{ ZYDIS_REGCLASS_TEST , ZYDIS_REGISTER_TR0 , ZYDIS_REGISTER_TR7 , 32 , 32 },
|
||||
{ ZYDIS_REGCLASS_CONTROL , ZYDIS_REGISTER_CR0 , ZYDIS_REGISTER_CR15 , 32 , 64 },
|
||||
{ ZYDIS_REGCLASS_DEBUG , ZYDIS_REGISTER_DR0 , ZYDIS_REGISTER_DR15 , 32 , 64 },
|
||||
{ ZYDIS_REGCLASS_MASK , ZYDIS_REGISTER_K0 , ZYDIS_REGISTER_K7 , 0 , 0 },
|
||||
{ ZYDIS_REGCLASS_BOUND , ZYDIS_REGISTER_BND0 , ZYDIS_REGISTER_BND3 , 128 , 128 }
|
||||
{ ZYDIS_REGCLASS_INVALID , ZYDIS_REGISTER_NONE , ZYDIS_REGISTER_NONE , 0 , 0 },
|
||||
{ ZYDIS_REGCLASS_GPR8 , ZYDIS_REGISTER_AL , ZYDIS_REGISTER_R15B , 8 , 8 },
|
||||
{ ZYDIS_REGCLASS_GPR16 , ZYDIS_REGISTER_AX , ZYDIS_REGISTER_R15W , 16 , 16 },
|
||||
{ ZYDIS_REGCLASS_GPR32 , ZYDIS_REGISTER_EAX , ZYDIS_REGISTER_R15D , 32 , 32 },
|
||||
{ ZYDIS_REGCLASS_GPR64 , ZYDIS_REGISTER_RAX , ZYDIS_REGISTER_R15 , 0 , 64 },
|
||||
{ ZYDIS_REGCLASS_X87 , ZYDIS_REGISTER_ST0 , ZYDIS_REGISTER_ST7 , 80 , 80 },
|
||||
{ ZYDIS_REGCLASS_MMX , ZYDIS_REGISTER_MM0 , ZYDIS_REGISTER_MM7 , 64 , 64 },
|
||||
{ ZYDIS_REGCLASS_XMM , ZYDIS_REGISTER_XMM0 , ZYDIS_REGISTER_XMM31 , 128 , 128 },
|
||||
{ ZYDIS_REGCLASS_YMM , ZYDIS_REGISTER_YMM0 , ZYDIS_REGISTER_YMM31 , 256 , 256 },
|
||||
{ ZYDIS_REGCLASS_ZMM , ZYDIS_REGISTER_ZMM0 , ZYDIS_REGISTER_ZMM31 , 512 , 512 },
|
||||
{ ZYDIS_REGCLASS_TMM , ZYDIS_REGISTER_TMM0 , ZYDIS_REGISTER_TMM7 , 8192 , 8192 },
|
||||
{ ZYDIS_REGCLASS_FLAGS , ZYDIS_REGISTER_FLAGS , ZYDIS_REGISTER_RFLAGS , 0 , 0 },
|
||||
{ ZYDIS_REGCLASS_IP , ZYDIS_REGISTER_IP , ZYDIS_REGISTER_RIP , 0 , 0 },
|
||||
{ ZYDIS_REGCLASS_SEGMENT , ZYDIS_REGISTER_ES , ZYDIS_REGISTER_GS , 16 , 16 },
|
||||
{ ZYDIS_REGCLASS_TEST , ZYDIS_REGISTER_TR0 , ZYDIS_REGISTER_TR7 , 32 , 32 },
|
||||
{ ZYDIS_REGCLASS_CONTROL , ZYDIS_REGISTER_CR0 , ZYDIS_REGISTER_CR15 , 32 , 64 },
|
||||
{ ZYDIS_REGCLASS_DEBUG , ZYDIS_REGISTER_DR0 , ZYDIS_REGISTER_DR15 , 32 , 64 },
|
||||
{ ZYDIS_REGCLASS_MASK , ZYDIS_REGISTER_K0 , ZYDIS_REGISTER_K7 , 0 , 0 },
|
||||
{ ZYDIS_REGCLASS_BOUND , ZYDIS_REGISTER_BND0 , ZYDIS_REGISTER_BND3 , 128 , 128 }
|
||||
};
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
@ -188,8 +189,7 @@ ZydisRegisterWidth ZydisRegisterGetWidth(ZydisMachineMode mode, ZydisRegister re
|
|||
return 0;
|
||||
}
|
||||
|
||||
ZydisRegister ZydisRegisterGetLargestEnclosing(ZydisMachineMode mode,
|
||||
ZydisRegister reg)
|
||||
ZydisRegister ZydisRegisterGetLargestEnclosing(ZydisMachineMode mode, ZydisRegister reg)
|
||||
{
|
||||
static const ZyanU8 GPR8_MAPPING[20] =
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Utility functions and constants for registers.
|
||||
* Utility functions and constants for registers.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_REGISTER_H
|
||||
|
@ -56,7 +56,7 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisRegisterClass` enum.
|
||||
* Defines the `ZydisRegisterClass` enum.
|
||||
*
|
||||
* Please note that this enum does not contain a matching entry for all values of the
|
||||
* `ZydisRegister` enum, but only for those registers where it makes sense to logically group them
|
||||
|
@ -69,80 +69,84 @@ typedef enum ZydisRegisterClass_
|
|||
{
|
||||
ZYDIS_REGCLASS_INVALID,
|
||||
/**
|
||||
* @brief 8-bit general-purpose registers.
|
||||
* 8-bit general-purpose registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_GPR8,
|
||||
/**
|
||||
* @brief 16-bit general-purpose registers.
|
||||
* 16-bit general-purpose registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_GPR16,
|
||||
/**
|
||||
* @brief 32-bit general-purpose registers.
|
||||
* 32-bit general-purpose registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_GPR32,
|
||||
/**
|
||||
* @brief 64-bit general-purpose registers.
|
||||
* 64-bit general-purpose registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_GPR64,
|
||||
/**
|
||||
* @brief Floating point legacy registers.
|
||||
* Floating point legacy registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_X87,
|
||||
/**
|
||||
* @brief Floating point multimedia registers.
|
||||
* Floating point multimedia registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_MMX,
|
||||
/**
|
||||
* @brief 128-bit vector registers.
|
||||
* 128-bit vector registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_XMM,
|
||||
/**
|
||||
* @brief 256-bit vector registers.
|
||||
* 256-bit vector registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_YMM,
|
||||
/**
|
||||
* @brief 512-bit vector registers.
|
||||
* 512-bit vector registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_ZMM,
|
||||
/**
|
||||
* @brief Flags registers.
|
||||
* Matrix registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_TMM,
|
||||
/*
|
||||
* Flags registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_FLAGS,
|
||||
/**
|
||||
* @brief Instruction-pointer registers.
|
||||
* Instruction-pointer registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_IP,
|
||||
/**
|
||||
* @brief Segment registers.
|
||||
* Segment registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_SEGMENT,
|
||||
/**
|
||||
* @brief Test registers.
|
||||
* Test registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_TEST,
|
||||
/**
|
||||
* @brief Control registers.
|
||||
* Control registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_CONTROL,
|
||||
/**
|
||||
* @brief Debug registers.
|
||||
* Debug registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_DEBUG,
|
||||
/**
|
||||
* @brief Mask registers.
|
||||
* Mask registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_MASK,
|
||||
/**
|
||||
* @brief Bound registers.
|
||||
* Bound registers.
|
||||
*/
|
||||
ZYDIS_REGCLASS_BOUND,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_REGCLASS_MAX_VALUE = ZYDIS_REGCLASS_BOUND,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_REGCLASS_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_REGCLASS_MAX_VALUE)
|
||||
} ZydisRegisterClass;
|
||||
|
@ -152,7 +156,7 @@ typedef enum ZydisRegisterClass_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisRegisterWidth` data-type.
|
||||
* Defines the `ZydisRegisterWidth` data-type.
|
||||
*/
|
||||
typedef ZyanU16 ZydisRegisterWidth;
|
||||
|
||||
|
@ -161,12 +165,12 @@ typedef ZyanU16 ZydisRegisterWidth;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisRegisterContext` struct.
|
||||
* Defines the `ZydisRegisterContext` struct.
|
||||
*/
|
||||
typedef struct ZydisRegisterContext_
|
||||
{
|
||||
/**
|
||||
* @brief The values stored in the register context.
|
||||
* The values stored in the register context.
|
||||
*/
|
||||
ZyanU64 values[ZYDIS_REGISTER_MAX_VALUE + 1];
|
||||
} ZydisRegisterContext;
|
||||
|
@ -179,7 +183,7 @@ typedef struct ZydisRegisterContext_
|
|||
|
||||
/**
|
||||
* @addtogroup register Register
|
||||
* @brief Functions allowing retrieval of information about registers.
|
||||
* Functions allowing retrieval of information about registers.
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -188,7 +192,7 @@ typedef struct ZydisRegisterContext_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the register specified by the `register_class` and `id` tuple.
|
||||
* Returns the register specified by the `register_class` and `id` tuple.
|
||||
*
|
||||
* @param register_class The register class.
|
||||
* @param id The register id.
|
||||
|
@ -199,7 +203,7 @@ typedef struct ZydisRegisterContext_
|
|||
ZYDIS_EXPORT ZydisRegister ZydisRegisterEncode(ZydisRegisterClass register_class, ZyanU8 id);
|
||||
|
||||
/**
|
||||
* @brief Returns the id of the specified register.
|
||||
* Returns the id of the specified register.
|
||||
*
|
||||
* @param reg The register.
|
||||
*
|
||||
|
@ -208,7 +212,7 @@ ZYDIS_EXPORT ZydisRegister ZydisRegisterEncode(ZydisRegisterClass register_class
|
|||
ZYDIS_EXPORT ZyanI8 ZydisRegisterGetId(ZydisRegister reg);
|
||||
|
||||
/**
|
||||
* @brief Returns the register-class of the specified register.
|
||||
* Returns the register-class of the specified register.
|
||||
*
|
||||
* @param reg The register.
|
||||
*
|
||||
|
@ -217,7 +221,7 @@ ZYDIS_EXPORT ZyanI8 ZydisRegisterGetId(ZydisRegister reg);
|
|||
ZYDIS_EXPORT ZydisRegisterClass ZydisRegisterGetClass(ZydisRegister reg);
|
||||
|
||||
/**
|
||||
* @brief Returns the width of the specified register.
|
||||
* Returns the width of the specified register.
|
||||
*
|
||||
* @param mode The active machine mode.
|
||||
* @param reg The register.
|
||||
|
@ -228,7 +232,7 @@ ZYDIS_EXPORT ZydisRegisterClass ZydisRegisterGetClass(ZydisRegister reg);
|
|||
ZYDIS_EXPORT ZydisRegisterWidth ZydisRegisterGetWidth(ZydisMachineMode mode, ZydisRegister reg);
|
||||
|
||||
/**
|
||||
* @brief Returns the largest enclosing register of the given register.
|
||||
* Returns the largest enclosing register of the given register.
|
||||
*
|
||||
* @param mode The active machine mode.
|
||||
* @param reg The register.
|
||||
|
@ -240,7 +244,7 @@ ZYDIS_EXPORT ZydisRegister ZydisRegisterGetLargestEnclosing(ZydisMachineMode mod
|
|||
ZydisRegister reg);
|
||||
|
||||
/**
|
||||
* @brief Returns the specified register string.
|
||||
* Returns the specified register string.
|
||||
*
|
||||
* @param reg The register.
|
||||
*
|
||||
|
@ -249,7 +253,7 @@ ZYDIS_EXPORT ZydisRegister ZydisRegisterGetLargestEnclosing(ZydisMachineMode mod
|
|||
ZYDIS_EXPORT const char* ZydisRegisterGetString(ZydisRegister reg);
|
||||
|
||||
/**
|
||||
* @brief Returns the specified register string as `ZydisShortString`.
|
||||
* Returns the specified register string as `ZydisShortString`.
|
||||
*
|
||||
* @param reg The register.
|
||||
*
|
||||
|
@ -264,7 +268,7 @@ ZYDIS_EXPORT const ZydisShortString* ZydisRegisterGetStringWrapped(ZydisRegister
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns the width of the specified register-class.
|
||||
* Returns the width of the specified register-class.
|
||||
*
|
||||
* @param mode The active machine mode.
|
||||
* @param register_class The register class.
|
||||
|
|
|
@ -153,6 +153,7 @@ void ZydisGetElementInfo(ZydisInternalElementType element, ZydisElementType* typ
|
|||
{ ZYDIS_ELEMENT_TYPE_UINT , 128 },
|
||||
{ ZYDIS_ELEMENT_TYPE_UINT , 256 },
|
||||
{ ZYDIS_ELEMENT_TYPE_FLOAT16 , 16 },
|
||||
{ ZYDIS_ELEMENT_TYPE_FLOAT16 , 32 }, // TODO: Should indicate 2 float16 elements
|
||||
{ ZYDIS_ELEMENT_TYPE_FLOAT32 , 32 },
|
||||
{ ZYDIS_ELEMENT_TYPE_FLOAT64 , 64 },
|
||||
{ ZYDIS_ELEMENT_TYPE_FLOAT80 , 80 },
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Defines decoder/encoder-shared macros and types.
|
||||
* Defines decoder/encoder-shared macros and types.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_SHAREDTYPES_H
|
||||
|
@ -60,41 +60,41 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisMachineMode` enum.
|
||||
* Defines the `ZydisMachineMode` enum.
|
||||
*/
|
||||
typedef enum ZydisMachineMode_
|
||||
{
|
||||
/**
|
||||
* @brief 64 bit mode.
|
||||
* 64 bit mode.
|
||||
*/
|
||||
ZYDIS_MACHINE_MODE_LONG_64,
|
||||
/**
|
||||
* @brief 32 bit protected mode.
|
||||
* 32 bit protected mode.
|
||||
*/
|
||||
ZYDIS_MACHINE_MODE_LONG_COMPAT_32,
|
||||
/**
|
||||
* @brief 16 bit protected mode.
|
||||
* 16 bit protected mode.
|
||||
*/
|
||||
ZYDIS_MACHINE_MODE_LONG_COMPAT_16,
|
||||
/**
|
||||
* @brief 32 bit protected mode.
|
||||
* 32 bit protected mode.
|
||||
*/
|
||||
ZYDIS_MACHINE_MODE_LEGACY_32,
|
||||
/**
|
||||
* @brief 16 bit protected mode.
|
||||
* 16 bit protected mode.
|
||||
*/
|
||||
ZYDIS_MACHINE_MODE_LEGACY_16,
|
||||
/**
|
||||
* @brief 16 bit real mode.
|
||||
* 16 bit real mode.
|
||||
*/
|
||||
ZYDIS_MACHINE_MODE_REAL_16,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_MACHINE_MODE_MAX_VALUE = ZYDIS_MACHINE_MODE_REAL_16,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_MACHINE_MODE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MACHINE_MODE_MAX_VALUE)
|
||||
} ZydisMachineMode;
|
||||
|
@ -104,7 +104,7 @@ typedef enum ZydisMachineMode_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisAddressWidth` enum.
|
||||
* Defines the `ZydisAddressWidth` enum.
|
||||
*/
|
||||
typedef enum ZydisAddressWidth_
|
||||
{
|
||||
|
@ -113,11 +113,11 @@ typedef enum ZydisAddressWidth_
|
|||
ZYDIS_ADDRESS_WIDTH_64,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_ADDRESS_WIDTH_MAX_VALUE = ZYDIS_ADDRESS_WIDTH_64,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_ADDRESS_WIDTH_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_ADDRESS_WIDTH_MAX_VALUE)
|
||||
} ZydisAddressWidth;
|
||||
|
@ -127,54 +127,54 @@ typedef enum ZydisAddressWidth_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisElementType` enum.
|
||||
* Defines the `ZydisElementType` enum.
|
||||
*/
|
||||
typedef enum ZydisElementType_
|
||||
{
|
||||
ZYDIS_ELEMENT_TYPE_INVALID,
|
||||
/**
|
||||
* @brief A struct type.
|
||||
* A struct type.
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_STRUCT,
|
||||
/**
|
||||
* @brief Unsigned integer value.
|
||||
* Unsigned integer value.
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_UINT,
|
||||
/**
|
||||
* @brief Signed integer value.
|
||||
* Signed integer value.
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_INT,
|
||||
/**
|
||||
* @brief 16-bit floating point value (`half`).
|
||||
* 16-bit floating point value (`half`).
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_FLOAT16,
|
||||
/**
|
||||
* @brief 32-bit floating point value (`single`).
|
||||
* 32-bit floating point value (`single`).
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_FLOAT32,
|
||||
/**
|
||||
* @brief 64-bit floating point value (`double`).
|
||||
* 64-bit floating point value (`double`).
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_FLOAT64,
|
||||
/**
|
||||
* @brief 80-bit floating point value (`extended`).
|
||||
* 80-bit floating point value (`extended`).
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_FLOAT80,
|
||||
/**
|
||||
* @brief Binary coded decimal value.
|
||||
* Binary coded decimal value.
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_LONGBCD,
|
||||
/**
|
||||
* @brief A condition code (e.g. used by `CMPPD`, `VCMPPD`, ...).
|
||||
* A condition code (e.g. used by `CMPPD`, `VCMPPD`, ...).
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_CC,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_MAX_VALUE = ZYDIS_ELEMENT_TYPE_CC,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_ELEMENT_TYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_ELEMENT_TYPE_MAX_VALUE)
|
||||
} ZydisElementType;
|
||||
|
@ -184,7 +184,7 @@ typedef enum ZydisElementType_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisElementSize` datatype.
|
||||
* Defines the `ZydisElementSize` datatype.
|
||||
*/
|
||||
typedef ZyanU16 ZydisElementSize;
|
||||
|
||||
|
@ -193,37 +193,37 @@ typedef ZyanU16 ZydisElementSize;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisOperandType` enum.
|
||||
* Defines the `ZydisOperandType` enum.
|
||||
*/
|
||||
typedef enum ZydisOperandType_
|
||||
{
|
||||
/**
|
||||
* @brief The operand is not used.
|
||||
* The operand is not used.
|
||||
*/
|
||||
ZYDIS_OPERAND_TYPE_UNUSED,
|
||||
/**
|
||||
* @brief The operand is a register operand.
|
||||
* The operand is a register operand.
|
||||
*/
|
||||
ZYDIS_OPERAND_TYPE_REGISTER,
|
||||
/**
|
||||
* @brief The operand is a memory operand.
|
||||
* The operand is a memory operand.
|
||||
*/
|
||||
ZYDIS_OPERAND_TYPE_MEMORY,
|
||||
/**
|
||||
* @brief The operand is a pointer operand with a segment:offset lvalue.
|
||||
* The operand is a pointer operand with a segment:offset lvalue.
|
||||
*/
|
||||
ZYDIS_OPERAND_TYPE_POINTER,
|
||||
/**
|
||||
* @brief The operand is an immediate operand.
|
||||
* The operand is an immediate operand.
|
||||
*/
|
||||
ZYDIS_OPERAND_TYPE_IMMEDIATE,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_OPERAND_TYPE_MAX_VALUE = ZYDIS_OPERAND_TYPE_IMMEDIATE,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_OPERAND_TYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_OPERAND_TYPE_MAX_VALUE)
|
||||
} ZydisOperandType;
|
||||
|
@ -233,7 +233,7 @@ typedef enum ZydisOperandType_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisOperandEncoding` enum.
|
||||
* Defines the `ZydisOperandEncoding` enum.
|
||||
*/
|
||||
typedef enum ZydisOperandEncoding_
|
||||
{
|
||||
|
@ -274,11 +274,11 @@ typedef enum ZydisOperandEncoding_
|
|||
ZYDIS_OPERAND_ENCODING_JIMM16_32_32,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_OPERAND_ENCODING_MAX_VALUE = ZYDIS_OPERAND_ENCODING_JIMM16_32_32,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_OPERAND_ENCODING_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_OPERAND_ENCODING_MAX_VALUE)
|
||||
} ZydisOperandEncoding;
|
||||
|
@ -288,30 +288,30 @@ typedef enum ZydisOperandEncoding_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisOperandVisibility` enum.
|
||||
* Defines the `ZydisOperandVisibility` enum.
|
||||
*/
|
||||
typedef enum ZydisOperandVisibility_
|
||||
{
|
||||
ZYDIS_OPERAND_VISIBILITY_INVALID,
|
||||
/**
|
||||
* @brief The operand is explicitly encoded in the instruction.
|
||||
* The operand is explicitly encoded in the instruction.
|
||||
*/
|
||||
ZYDIS_OPERAND_VISIBILITY_EXPLICIT,
|
||||
/**
|
||||
* @brief The operand is part of the opcode, but listed as an operand.
|
||||
* The operand is part of the opcode, but listed as an operand.
|
||||
*/
|
||||
ZYDIS_OPERAND_VISIBILITY_IMPLICIT,
|
||||
/**
|
||||
* @brief The operand is part of the opcode, and not typically listed as an operand.
|
||||
* The operand is part of the opcode, and not typically listed as an operand.
|
||||
*/
|
||||
ZYDIS_OPERAND_VISIBILITY_HIDDEN,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_OPERAND_VISIBILITY_MAX_VALUE = ZYDIS_OPERAND_VISIBILITY_HIDDEN,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_OPERAND_VISIBILITY_REQUIRED_BITS =
|
||||
ZYAN_BITS_TO_REPRESENT(ZYDIS_OPERAND_VISIBILITY_MAX_VALUE)
|
||||
|
@ -322,7 +322,7 @@ typedef enum ZydisOperandVisibility_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisOperandAction` enum.
|
||||
* Defines the `ZydisOperandAction` enum.
|
||||
*/
|
||||
typedef enum ZydisOperandAction_
|
||||
{
|
||||
|
@ -331,19 +331,19 @@ typedef enum ZydisOperandAction_
|
|||
/* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* @brief The operand is read by the instruction.
|
||||
* The operand is read by the instruction.
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_READ = 0x01,
|
||||
/**
|
||||
* @brief The operand is written by the instruction (must write).
|
||||
* The operand is written by the instruction (must write).
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_WRITE = 0x02,
|
||||
/**
|
||||
* @brief The operand is conditionally read by the instruction.
|
||||
* The operand is conditionally read by the instruction.
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_CONDREAD = 0x04,
|
||||
/**
|
||||
* @brief The operand is conditionally written by the instruction (may write).
|
||||
* The operand is conditionally written by the instruction (may write).
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_CONDWRITE = 0x08,
|
||||
|
||||
|
@ -352,47 +352,47 @@ typedef enum ZydisOperandAction_
|
|||
/* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* @brief The operand is read (must read) and written by the instruction (must write).
|
||||
* The operand is read (must read) and written by the instruction (must write).
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_READWRITE = ZYDIS_OPERAND_ACTION_READ | ZYDIS_OPERAND_ACTION_WRITE,
|
||||
/**
|
||||
* @brief The operand is conditionally read (may read) and conditionally written by the
|
||||
* instruction (may write).
|
||||
* The operand is conditionally read (may read) and conditionally written by
|
||||
* the instruction (may write).
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_CONDREAD_CONDWRITE =
|
||||
ZYDIS_OPERAND_ACTION_CONDREAD | ZYDIS_OPERAND_ACTION_CONDWRITE,
|
||||
/**
|
||||
* @brief The operand is read (must read) and conditionally written by the instruction
|
||||
* (may write).
|
||||
* The operand is read (must read) and conditionally written by the
|
||||
* instruction (may write).
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_READ_CONDWRITE =
|
||||
ZYDIS_OPERAND_ACTION_READ | ZYDIS_OPERAND_ACTION_CONDWRITE,
|
||||
/**
|
||||
* @brief The operand is written (must write) and conditionally read by the instruction
|
||||
* (may read).
|
||||
* The operand is written (must write) and conditionally read by the
|
||||
* instruction (may read).
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_CONDREAD_WRITE =
|
||||
ZYDIS_OPERAND_ACTION_CONDREAD | ZYDIS_OPERAND_ACTION_WRITE,
|
||||
|
||||
/**
|
||||
* @brief Mask combining all reading access flags.
|
||||
* Mask combining all reading access flags.
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_MASK_READ = ZYDIS_OPERAND_ACTION_READ | ZYDIS_OPERAND_ACTION_CONDREAD,
|
||||
/**
|
||||
* @brief Mask combining all writing access flags.
|
||||
* Mask combining all writing access flags.
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_MASK_WRITE = ZYDIS_OPERAND_ACTION_WRITE | ZYDIS_OPERAND_ACTION_CONDWRITE,
|
||||
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this bitset.
|
||||
* The minimum number of bits required to represent all values of this bitset.
|
||||
*/
|
||||
ZYDIS_OPERAND_ACTION_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_OPERAND_ACTION_CONDWRITE)
|
||||
} ZydisOperandAction;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisOperandActions` data-type.
|
||||
* Defines the `ZydisOperandActions` data-type.
|
||||
*/
|
||||
typedef ZyanU8 ZydisOperandActions;
|
||||
|
||||
|
@ -401,41 +401,41 @@ typedef ZyanU8 ZydisOperandActions;
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionEncoding` enum.
|
||||
* Defines the `ZydisInstructionEncoding` enum.
|
||||
*/
|
||||
typedef enum ZydisInstructionEncoding_
|
||||
{
|
||||
/**
|
||||
* @brief The instruction uses the legacy encoding.
|
||||
* The instruction uses the legacy encoding.
|
||||
*/
|
||||
ZYDIS_INSTRUCTION_ENCODING_LEGACY,
|
||||
/**
|
||||
* @brief The instruction uses the AMD 3DNow-encoding.
|
||||
* The instruction uses the AMD 3DNow-encoding.
|
||||
*/
|
||||
ZYDIS_INSTRUCTION_ENCODING_3DNOW,
|
||||
/**
|
||||
* @brief The instruction uses the AMD XOP-encoding.
|
||||
* The instruction uses the AMD XOP-encoding.
|
||||
*/
|
||||
ZYDIS_INSTRUCTION_ENCODING_XOP,
|
||||
/**
|
||||
* @brief The instruction uses the VEX-encoding.
|
||||
* The instruction uses the VEX-encoding.
|
||||
*/
|
||||
ZYDIS_INSTRUCTION_ENCODING_VEX,
|
||||
/**
|
||||
* @brief The instruction uses the EVEX-encoding.
|
||||
* The instruction uses the EVEX-encoding.
|
||||
*/
|
||||
ZYDIS_INSTRUCTION_ENCODING_EVEX,
|
||||
/**
|
||||
* @brief The instruction uses the MVEX-encoding.
|
||||
* The instruction uses the MVEX-encoding.
|
||||
*/
|
||||
ZYDIS_INSTRUCTION_ENCODING_MVEX,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_INSTRUCTION_ENCODING_MAX_VALUE = ZYDIS_INSTRUCTION_ENCODING_MVEX,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_INSTRUCTION_ENCODING_REQUIRED_BITS =
|
||||
ZYAN_BITS_TO_REPRESENT(ZYDIS_INSTRUCTION_ENCODING_MAX_VALUE)
|
||||
|
@ -446,7 +446,7 @@ typedef enum ZydisInstructionEncoding_
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisOpcodeMap` enum.
|
||||
* Defines the `ZydisOpcodeMap` enum.
|
||||
*/
|
||||
typedef enum ZydisOpcodeMap_
|
||||
{
|
||||
|
@ -454,17 +454,21 @@ typedef enum ZydisOpcodeMap_
|
|||
ZYDIS_OPCODE_MAP_0F,
|
||||
ZYDIS_OPCODE_MAP_0F38,
|
||||
ZYDIS_OPCODE_MAP_0F3A,
|
||||
ZYDIS_OPCODE_MAP_MAP4, // not used
|
||||
ZYDIS_OPCODE_MAP_MAP5,
|
||||
ZYDIS_OPCODE_MAP_MAP6,
|
||||
ZYDIS_OPCODE_MAP_MAP7, // not used
|
||||
ZYDIS_OPCODE_MAP_0F0F,
|
||||
ZYDIS_OPCODE_MAP_XOP8,
|
||||
ZYDIS_OPCODE_MAP_XOP9,
|
||||
ZYDIS_OPCODE_MAP_XOPA,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_OPCODE_MAP_MAX_VALUE = ZYDIS_OPCODE_MAP_XOPA,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_OPCODE_MAP_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_OPCODE_MAP_MAX_VALUE)
|
||||
} ZydisOpcodeMap;
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Defines the immutable and storage-efficient `ZydisShortString` struct, which is used to
|
||||
* store strings in the generated tables.
|
||||
* Defines the immutable and storage-efficient `ZydisShortString` struct, which
|
||||
* is used to store strings in the generated tables.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_SHORTSTRING_H
|
||||
|
@ -48,7 +48,7 @@ extern "C" {
|
|||
#pragma pack(push, 1)
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisShortString` struct.
|
||||
* Defines the `ZydisShortString` struct.
|
||||
*
|
||||
* This compact struct is mainly used for internal string-tables to save up some bytes.
|
||||
*
|
||||
|
@ -58,11 +58,11 @@ extern "C" {
|
|||
typedef struct ZydisShortString_
|
||||
{
|
||||
/**
|
||||
* @brief The buffer that contains the actual (null-terminated) string.
|
||||
* The buffer that contains the actual (null-terminated) string.
|
||||
*/
|
||||
const char* data;
|
||||
/**
|
||||
* @brief The length (number of characters) of the string (without 0-termination).
|
||||
* The length (number of characters) of the string (without 0-termination).
|
||||
*/
|
||||
ZyanU8 size;
|
||||
} ZydisShortString;
|
||||
|
@ -74,7 +74,7 @@ typedef struct ZydisShortString_
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Declares a `ZydisShortString` from a static C-style string.
|
||||
* Declares a `ZydisShortString` from a static C-style string.
|
||||
*
|
||||
* @param string The C-string constant.
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Status code definitions and check macros.
|
||||
* Status code definitions and check macros.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_STATUS_H
|
||||
|
@ -47,9 +47,9 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief The zydis module id.
|
||||
* The zydis module id.
|
||||
*/
|
||||
#define ZYAN_MODULE_ZYDIS 0x002
|
||||
#define ZYAN_MODULE_ZYDIS 0x002u
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Status codes */
|
||||
|
@ -60,82 +60,82 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief An attempt was made to read data from an input data-source that has no more data
|
||||
* available.
|
||||
* An attempt was made to read data from an input data-source that has no more
|
||||
* data available.
|
||||
*/
|
||||
#define ZYDIS_STATUS_NO_MORE_DATA \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x00)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x00u)
|
||||
|
||||
/**
|
||||
* @brief An general error occured while decoding the current instruction. The instruction
|
||||
* might be undefined.
|
||||
* An general error occured while decoding the current instruction. The
|
||||
* instruction might be undefined.
|
||||
*/
|
||||
#define ZYDIS_STATUS_DECODING_ERROR \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x01)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
|
||||
|
||||
/**
|
||||
* @brief The instruction exceeded the maximum length of 15 bytes.
|
||||
* The instruction exceeded the maximum length of 15 bytes.
|
||||
*/
|
||||
#define ZYDIS_STATUS_INSTRUCTION_TOO_LONG \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x02)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x02u)
|
||||
|
||||
/**
|
||||
* @brief The instruction encoded an invalid register.
|
||||
* The instruction encoded an invalid register.
|
||||
*/
|
||||
#define ZYDIS_STATUS_BAD_REGISTER \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x03)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
|
||||
|
||||
/**
|
||||
* @brief A lock-prefix (F0) was found while decoding an instruction that does not support
|
||||
* locking.
|
||||
* A lock-prefix (F0) was found while decoding an instruction that does not
|
||||
* support locking.
|
||||
*/
|
||||
#define ZYDIS_STATUS_ILLEGAL_LOCK \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x04)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x04u)
|
||||
|
||||
/**
|
||||
* @brief A legacy-prefix (F2, F3, 66) was found while decoding a XOP/VEX/EVEX/MVEX
|
||||
* instruction.
|
||||
* A legacy-prefix (F2, F3, 66) was found while decoding a XOP/VEX/EVEX/MVEX
|
||||
* instruction.
|
||||
*/
|
||||
#define ZYDIS_STATUS_ILLEGAL_LEGACY_PFX \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x05)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x05u)
|
||||
|
||||
/**
|
||||
* @brief A rex-prefix was found while decoding a XOP/VEX/EVEX/MVEX instruction.
|
||||
* A rex-prefix was found while decoding a XOP/VEX/EVEX/MVEX instruction.
|
||||
*/
|
||||
#define ZYDIS_STATUS_ILLEGAL_REX \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x06)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x06u)
|
||||
|
||||
/**
|
||||
* @brief An invalid opcode-map value was found while decoding a XOP/VEX/EVEX/MVEX-prefix.
|
||||
* An invalid opcode-map value was found while decoding a XOP/VEX/EVEX/MVEX-prefix.
|
||||
*/
|
||||
#define ZYDIS_STATUS_INVALID_MAP \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x07)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
|
||||
|
||||
/**
|
||||
* @brief An error occured while decoding the EVEX-prefix.
|
||||
* An error occured while decoding the EVEX-prefix.
|
||||
*/
|
||||
#define ZYDIS_STATUS_MALFORMED_EVEX \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x08)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x08u)
|
||||
|
||||
/**
|
||||
* @brief An error occured while decoding the MVEX-prefix.
|
||||
* An error occured while decoding the MVEX-prefix.
|
||||
*/
|
||||
#define ZYDIS_STATUS_MALFORMED_MVEX \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x09)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x09u)
|
||||
|
||||
/**
|
||||
* @brief An invalid write-mask was specified for an EVEX/MVEX instruction.
|
||||
* An invalid write-mask was specified for an EVEX/MVEX instruction.
|
||||
*/
|
||||
#define ZYDIS_STATUS_INVALID_MASK \
|
||||
ZYAN_MAKE_STATUS(1, ZYAN_MODULE_ZYDIS, 0x0A)
|
||||
ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Au)
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Formatter */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returning this status code in some specified formatter callbacks will cause the
|
||||
* formatter to omit the corresponding token.
|
||||
* Returning this status code in some specified formatter callbacks will cause
|
||||
* the formatter to omit the corresponding token.
|
||||
*
|
||||
* Valid callbacks:
|
||||
* - `ZYDIS_FORMATTER_FUNC_PRE_OPERAND`
|
||||
|
@ -146,7 +146,7 @@ extern "C" {
|
|||
* - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM`
|
||||
*/
|
||||
#define ZYDIS_STATUS_SKIP_TOKEN \
|
||||
ZYAN_MAKE_STATUS(0, ZYAN_MODULE_ZYDIS, 0x0B)
|
||||
ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYDIS, 0x0Bu)
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
/* Address calculation */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
// Signed integer overflow is expected behavior in this function, for wrapping around the
|
||||
// instruction pointer on jumps right at the end of the address space.
|
||||
ZYAN_NO_SANITIZE("signed-integer-overflow")
|
||||
ZyanStatus ZydisCalcAbsoluteAddress(const ZydisDecodedInstruction* instruction,
|
||||
const ZydisDecodedOperand* operand, ZyanU64 runtime_address, ZyanU64* result_address)
|
||||
{
|
||||
|
@ -93,7 +96,12 @@ ZyanStatus ZydisCalcAbsoluteAddress(const ZydisDecodedInstruction* instruction,
|
|||
case ZYDIS_MACHINE_MODE_REAL_16:
|
||||
case ZYDIS_MACHINE_MODE_LONG_COMPAT_32:
|
||||
case ZYDIS_MACHINE_MODE_LEGACY_32:
|
||||
if (operand->size == 16)
|
||||
// `XBEGIN` is a special case as it doesn't truncate computed address
|
||||
// This behavior is documented by Intel (SDM Vol. 2C):
|
||||
// Use of the 16-bit operand size does not cause this address to be truncated to
|
||||
// 16 bits, unlike a near jump to a relative offset.
|
||||
if ((instruction->operand_width == 16) &&
|
||||
(instruction->mnemonic != ZYDIS_MNEMONIC_XBEGIN))
|
||||
{
|
||||
*result_address &= 0xFFFF;
|
||||
}
|
||||
|
@ -187,11 +195,12 @@ ZyanStatus ZydisGetAccessedFlagsByAction(const ZydisDecodedInstruction* instruct
|
|||
ZyanStatus ZydisGetAccessedFlagsRead(const ZydisDecodedInstruction* instruction,
|
||||
ZydisCPUFlags* flags)
|
||||
{
|
||||
ZYAN_CHECK(ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_TESTED, flags));
|
||||
ZydisCPUFlags temp;
|
||||
ZYAN_CHECK(ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED,
|
||||
&temp));
|
||||
*flags |= temp;
|
||||
if (!instruction || !flags)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
*flags = instruction->cpu_flags_read;
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -199,17 +208,12 @@ ZyanStatus ZydisGetAccessedFlagsRead(const ZydisDecodedInstruction* instruction,
|
|||
ZyanStatus ZydisGetAccessedFlagsWritten(const ZydisDecodedInstruction* instruction,
|
||||
ZydisCPUFlags* flags)
|
||||
{
|
||||
ZYAN_CHECK(ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_TESTED_MODIFIED,
|
||||
flags));
|
||||
ZydisCPUFlags temp;
|
||||
ZYAN_CHECK(ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_MODIFIED, &temp));
|
||||
*flags |= temp;
|
||||
ZYAN_CHECK(ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_SET_0, &temp));
|
||||
*flags |= temp;
|
||||
ZYAN_CHECK(ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_SET_1, &temp));
|
||||
*flags |= temp;
|
||||
ZYAN_CHECK(ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_UNDEFINED, &temp));
|
||||
*flags |= temp;
|
||||
if (!instruction || !flags)
|
||||
{
|
||||
return ZYAN_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
*flags = instruction->cpu_flags_written;
|
||||
|
||||
return ZYAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Other utility functions.
|
||||
* Other utility functions.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_UTILS_H
|
||||
|
@ -57,87 +57,87 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionSegment` struct.
|
||||
* Defines the `ZydisInstructionSegment` struct.
|
||||
*/
|
||||
typedef enum ZydisInstructionSegment_
|
||||
{
|
||||
ZYDIS_INSTR_SEGMENT_NONE,
|
||||
/**
|
||||
* @brief The legacy prefixes (including ignored `REX` prefixes).
|
||||
* The legacy prefixes (including ignored `REX` prefixes).
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_PREFIXES,
|
||||
/**
|
||||
* @brief The effective `REX` prefix byte.
|
||||
* The effective `REX` prefix byte.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_REX,
|
||||
/**
|
||||
* @brief The `XOP` prefix bytes.
|
||||
* The `XOP` prefix bytes.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_XOP,
|
||||
/**
|
||||
* @brief The `VEX` prefix bytes.
|
||||
* The `VEX` prefix bytes.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_VEX,
|
||||
/**
|
||||
* @brief The `EVEX` prefix bytes.
|
||||
* The `EVEX` prefix bytes.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_EVEX,
|
||||
/**
|
||||
* @brief The `MVEX` prefix bytes.
|
||||
* The `MVEX` prefix bytes.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_MVEX,
|
||||
/**
|
||||
* @brief The opcode bytes.
|
||||
* The opcode bytes.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_OPCODE,
|
||||
/**
|
||||
* @brief The `ModRM` byte.
|
||||
* The `ModRM` byte.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_MODRM,
|
||||
/**
|
||||
* @brief The `SIB` byte.
|
||||
* The `SIB` byte.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_SIB,
|
||||
/**
|
||||
* @brief The displacement bytes.
|
||||
* The displacement bytes.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_DISPLACEMENT,
|
||||
/**
|
||||
* @brief The immediate bytes.
|
||||
* The immediate bytes.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_IMMEDIATE,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_MAX_VALUE = ZYDIS_INSTR_SEGMENT_IMMEDIATE,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_INSTR_SEGMENT_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_INSTR_SEGMENT_MAX_VALUE)
|
||||
} ZydisInstructionSegment;
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisInstructionSegments` struct.
|
||||
* Defines the `ZydisInstructionSegments` struct.
|
||||
*/
|
||||
typedef struct ZydisInstructionSegments_
|
||||
{
|
||||
/**
|
||||
* @brief The number of logical instruction segments.
|
||||
* The number of logical instruction segments.
|
||||
*/
|
||||
ZyanU8 count;
|
||||
struct
|
||||
{
|
||||
/**
|
||||
* @brief The type of the segment.
|
||||
* The type of the segment.
|
||||
*/
|
||||
ZydisInstructionSegment type;
|
||||
/**
|
||||
* @brief The offset of the segment relative to the start of the instruction (in bytes).
|
||||
* The offset of the segment relative to the start of the instruction (in bytes).
|
||||
*/
|
||||
ZyanU8 offset;
|
||||
/**
|
||||
* @brief The size of the segment, in bytes.
|
||||
* The size of the segment, in bytes.
|
||||
*/
|
||||
ZyanU8 size;
|
||||
} segments[ZYDIS_MAX_INSTRUCTION_SEGMENT_COUNT];
|
||||
|
@ -149,7 +149,7 @@ typedef struct ZydisInstructionSegments_
|
|||
|
||||
/**
|
||||
* @addtogroup utils Utils
|
||||
* @brief Miscellaneous utility functions. Address translation and other helpers.
|
||||
* Miscellaneous utility functions. Address translation and other helpers.
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -160,7 +160,7 @@ typedef struct ZydisInstructionSegments_
|
|||
// TODO: Provide a function that works in minimal-mode and does not require a operand parameter
|
||||
|
||||
/**
|
||||
* @brief Calculates the absolute address value for the given instruction operand.
|
||||
* Calculates the absolute address value for the given instruction operand.
|
||||
*
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
* @param operand A pointer to the `ZydisDecodedOperand` struct.
|
||||
|
@ -179,7 +179,7 @@ ZYDIS_EXPORT ZyanStatus ZydisCalcAbsoluteAddress(const ZydisDecodedInstruction*
|
|||
const ZydisDecodedOperand* operand, ZyanU64 runtime_address, ZyanU64* result_address);
|
||||
|
||||
/**
|
||||
* @brief Calculates the absolute address value for the given instruction operand.
|
||||
* Calculates the absolute address value for the given instruction operand.
|
||||
*
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
* @param operand A pointer to the `ZydisDecodedOperand` struct.
|
||||
|
@ -204,7 +204,7 @@ ZYDIS_EXPORT ZyanStatus ZydisCalcAbsoluteAddressEx(const ZydisDecodedInstruction
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns a mask of accessed CPU-flags matching the given `action`.
|
||||
* Returns a mask of accessed CPU-flags matching the given `action`.
|
||||
*
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
* @param action The CPU-flag action.
|
||||
|
@ -216,35 +216,41 @@ ZYDIS_EXPORT ZyanStatus ZydisGetAccessedFlagsByAction(const ZydisDecodedInstruct
|
|||
ZydisCPUFlagAction action, ZydisCPUFlags* flags);
|
||||
|
||||
/**
|
||||
* @brief Returns a mask of accessed CPU-flags that are read (tested) by the current instruction.
|
||||
* Returns a mask of accessed CPU-flags that are read (tested) by the current instruction.
|
||||
*
|
||||
* DEPRECATED. This function will be removed in the next major release. Please refer to the
|
||||
* `cpu_flags_read` or `fpu_flags_read` fields of the `ZydisDecodedInstruction` instead.
|
||||
*
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
* @param flags Receives the flag mask.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYDIS_EXPORT ZyanStatus ZydisGetAccessedFlagsRead(const ZydisDecodedInstruction* instruction,
|
||||
ZydisCPUFlags* flags);
|
||||
ZYDIS_DEPRECATED_EXPORT ZyanStatus ZydisGetAccessedFlagsRead(
|
||||
const ZydisDecodedInstruction* instruction, ZydisCPUFlags* flags);
|
||||
|
||||
/**
|
||||
* @brief Returns a mask of accessed CPU-flags that are written (modified, undefined) by the
|
||||
* current instruction.
|
||||
* Returns a mask of accessed CPU-flags that are written (modified, undefined) by the current
|
||||
* instruction.
|
||||
*
|
||||
* DEPRECATED. This function will be removed in the next major release. Please refer to the
|
||||
* `cpu_flags_written` or `fpu_flags_written` fields of the `ZydisDecodedInstruction` instead.
|
||||
*
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
* @param flags Receives the flag mask.
|
||||
*
|
||||
* @return A zyan status code.
|
||||
*/
|
||||
ZYDIS_EXPORT ZyanStatus ZydisGetAccessedFlagsWritten(const ZydisDecodedInstruction* instruction,
|
||||
ZydisCPUFlags* flags);
|
||||
ZYDIS_DEPRECATED_EXPORT ZyanStatus ZydisGetAccessedFlagsWritten(
|
||||
const ZydisDecodedInstruction* instruction, ZydisCPUFlags* flags);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Instruction segments */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Returns offsets and sizes of all logical instruction segments (e.g. `OPCODE`,
|
||||
* `MODRM`, ...).
|
||||
* Returns offsets and sizes of all logical instruction segments (e.g. `OPCODE`,
|
||||
* `MODRM`, ...).
|
||||
*
|
||||
* @param instruction A pointer to the `ZydisDecodedInstruction` struct.
|
||||
* @param segments Receives the instruction segments information.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* @brief Master include file, including everything else.
|
||||
* Master include file, including everything else.
|
||||
*/
|
||||
|
||||
#ifndef ZYDIS_H
|
||||
|
@ -64,37 +64,37 @@ extern "C" {
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief A macro that defines the zydis version.
|
||||
* A macro that defines the zydis version.
|
||||
*/
|
||||
#define ZYDIS_VERSION (ZyanU64)0x0003000000000000
|
||||
#define ZYDIS_VERSION (ZyanU64)0x0003000200010000
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Helper macros */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Extracts the major-part of the zydis version.
|
||||
* Extracts the major-part of the zydis version.
|
||||
*
|
||||
* @param version The zydis version value
|
||||
*/
|
||||
#define ZYDIS_VERSION_MAJOR(version) (ZyanU16)(((version) & 0xFFFF000000000000) >> 48)
|
||||
|
||||
/**
|
||||
* @brief Extracts the minor-part of the zydis version.
|
||||
* Extracts the minor-part of the zydis version.
|
||||
*
|
||||
* @param version The zydis version value
|
||||
*/
|
||||
#define ZYDIS_VERSION_MINOR(version) (ZyanU16)(((version) & 0x0000FFFF00000000) >> 32)
|
||||
|
||||
/**
|
||||
* @brief Extracts the patch-part of the zydis version.
|
||||
* Extracts the patch-part of the zydis version.
|
||||
*
|
||||
* @param version The zydis version value
|
||||
*/
|
||||
#define ZYDIS_VERSION_PATCH(version) (ZyanU16)(((version) & 0x00000000FFFF0000) >> 16)
|
||||
|
||||
/**
|
||||
* @brief Extracts the build-part of the zydis version.
|
||||
* Extracts the build-part of the zydis version.
|
||||
*
|
||||
* @param version The zydis version value
|
||||
*/
|
||||
|
@ -107,7 +107,7 @@ extern "C" {
|
|||
/* ============================================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Defines the `ZydisFeature` enum.
|
||||
* Defines the `ZydisFeature` enum.
|
||||
*/
|
||||
typedef enum ZydisFeature_
|
||||
{
|
||||
|
@ -117,11 +117,11 @@ typedef enum ZydisFeature_
|
|||
ZYDIS_FEATURE_KNC,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
* Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_FEATURE_MAX_VALUE = ZYDIS_FEATURE_KNC,
|
||||
/**
|
||||
* @brief The minimum number of bits required to represent all values of this enum.
|
||||
* The minimum number of bits required to represent all values of this enum.
|
||||
*/
|
||||
ZYDIS_FEATURE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_FEATURE_MAX_VALUE)
|
||||
} ZydisFeature;
|
||||
|
@ -132,12 +132,12 @@ typedef enum ZydisFeature_
|
|||
|
||||
/**
|
||||
* @addtogroup version Version
|
||||
* @brief Functions for checking the library version and build options.
|
||||
* Functions for checking the library version and build options.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Returns the zydis version.
|
||||
* Returns the zydis version.
|
||||
*
|
||||
* @return The zydis version.
|
||||
*
|
||||
|
@ -147,7 +147,7 @@ typedef enum ZydisFeature_
|
|||
ZYDIS_EXPORT ZyanU64 ZydisGetVersion(void);
|
||||
|
||||
/**
|
||||
* @brief Checks, if the specified feature is enabled in the current zydis library instance.
|
||||
* Checks, if the specified feature is enabled in the current zydis library instance.
|
||||
*
|
||||
* @param feature The feature.
|
||||
*
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#define ZYDIS_EXPORT_H
|
||||
|
||||
#define ZYDIS_EXPORT
|
||||
#define ZYDIS_DEPRECATED_EXPORT
|
||||
#define ZYDIS_NO_EXPORT
|
||||
#define ZYDIS_NO_DEPRECATED
|
||||
|
||||
#endif /* ZYDIS_EXPORT_H */
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
4d4fe4c293c5438f32688b14b29017ae3f48369e
|
||||
4022f22f9280650082a9480519c86a6e2afde2f3
|
||||
|
|
|
@ -15,6 +15,7 @@ if CONFIG['JS_CODEGEN_X64'] or CONFIG['JS_CODEGEN_X86']:
|
|||
SOURCES += [
|
||||
'Zycore/Allocator.c',
|
||||
'Zycore/API/Memory.c',
|
||||
'Zycore/API/Process.c',
|
||||
'Zycore/ArgParse.c',
|
||||
'Zycore/Bitset.c',
|
||||
'Zycore/Format.c',
|
||||
|
|
Загрузка…
Ссылка в новой задаче