Added some undocumented `PREFETCH` instructions

This commit is contained in:
flobernd 2017-11-16 18:47:42 +01:00
parent 626d0bc238
commit e314c71db3
7 changed files with 197 additions and 197 deletions

View File

@ -33,10 +33,10 @@
* the condition encoded in the immediate operand).
*/
#include <stdlib.h>
#include <inttypes.h>
#include <Zydis/Zydis.h>
#include "FormatHelper.h"
#include <stdlib.h>
/* ============================================================================================== */
/* Static data */

View File

@ -588,7 +588,7 @@ enum ZydisMnemonics
ZYDIS_MNEMONIC_POPFD,
ZYDIS_MNEMONIC_POPFQ,
ZYDIS_MNEMONIC_POR,
ZYDIS_MNEMONIC_PREFETCH_EXCLUSIVE,
ZYDIS_MNEMONIC_PREFETCH,
ZYDIS_MNEMONIC_PREFETCHNTA,
ZYDIS_MNEMONIC_PREFETCHT0,
ZYDIS_MNEMONIC_PREFETCHT1,

View File

@ -50,7 +50,7 @@ typedef uint32_t ZydisStatus;
/**
* @brief Values that represent a zydis status-codes.
*/
enum ZydisStatusCode
enum ZydisStatusCodes
{
/* ------------------------------------------------------------------------------------------ */
/* General */

File diff suppressed because one or more lines are too long

View File

@ -580,7 +580,7 @@ static const char* zydisMnemonicStrings[] =
"popfd",
"popfq",
"por",
"prefetch_exclusive",
"prefetch",
"prefetchnta",
"prefetcht0",
"prefetcht1",

View File

@ -1284,13 +1284,12 @@ const ZydisInstructionDefinitionDEFAULT instructionDefinitionsDEFAULT[] =
{ ZYDIS_MNEMONIC_POR, 2, 0xC82, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_LOGICAL, ZYDIS_ISA_SET_MMX, ZYDIS_ISA_EXT_PENTIUMMMX, ZYDIS_EXCEPTION_CLASS_NONE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_TRUE },
{ ZYDIS_MN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, ZYDIS_CATEGORY_PREFETCHWT1, ZYDIS_ISA_SET_PREFETCHWT1, ZYDIS_ISA_EXT_PREFETCHWT1, ZYDIS_EXCEPTION_CLASS_NONE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_TRUE },
{ ZYDIS_MNEMONIC_PSADBW, 2, 0xC7F, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_MMX, ZYDIS_ISA_SET_MMX, ZYDIS_ISA_EXT_PENTIUMMMX, ZYDIS_EXCEPTION_CLASS_NONE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE },
{ ZYDIS_MNEMONIC_PSADBW, 2, 0xC82, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_MMX, ZYDIS_ISA_SET_MMX, ZYDIS_ISA_EXT_PENTIUMMMX, ZYDIS_EXCEPTION_CLASS_NONE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_FALSE, ZYDIS_TRUE },

View File

@ -26,7 +26,8 @@
/**
* @file
* @brief TODO
* @brief Disassembles a given hex-buffer and prints detailed information about the decoded
* instruction, the operands and additional attributes.
*/
#include <stdlib.h>
@ -578,7 +579,7 @@ int main(int argc, char** argv)
if (argc < 3)
{
fputs("Usage: ZydisInfo -[16|32|64] [hexbytes]\n", stderr);
fputs("Usage: ZydisInfo -[real|16|32|64] [hexbytes]\n", stderr);
return ZYDIS_STATUS_INVALID_PARAMETER;
}