flobernd
57ccc70415
Optimized detection of bad register values
2018-01-11 22:30:23 +01:00
flobernd
7fb7eea11f
Bugfixes and table changes
...
- Fixed `SSE4A` ISA-set and ISA-ext
- Added missing `VEX`-encoded `GFNI` instructions
- Added check for invalid `GATHER`/`SCATTER` registers
2018-01-11 02:17:17 +01:00
flobernd
203dee3bfb
Bugfixes and table changes
...
- Fixed decoding of `XOP` instructions
- Fixed handling of illegal `LOCK` prefixes for `XOP/VEX/EVEX/MVEX` instructions
- Significantly improved detection of bad register values
- Added SSE4a instructions (`EXTRQ`, `INSERTQ`, `MOVNTSD` and `MOVNTSS`)
- Added `VPOPCNTD`/`VPOPCNTQ` instructions with 128- and 256-bit vector-length
- Fixed exception-class of some `GFNI` instructions
- Fixed `RDRAND` and `RDSEED` instructions
- Fixed `SYSRET` instruction
2018-01-10 23:04:57 +01:00
flobernd
fb519fe933
Internal refactorings and performance optimizations
2018-01-10 17:02:11 +01:00
flobernd
38c99667c4
Minor table changes
...
- Fixed `LWPINS` and `LWPVAL` instructions
- Added `PCONFIG` instruction
2017-12-20 23:36:59 +01:00
Joel Höner
31c369d3f1
Merge branch 'feature/zydis-string' into develop
...
# Conflicts:
# include/Zydis/Formatter.h
# src/Formatter.c
2017-12-03 22:47:01 +01:00
flobernd
dff821402b
Refactored `ZydisFormatter`
...
- Added `ZYDIS_FORMATTER_HOOK_PRE_OPERAND`, `ZYDIS_FORMATTER_HOOK_POST_OPERAND` and `ZYDIS_FORMATTER_HOOK_PRINT_REGISTER`
- Renamed `ZYDIS_FORMATTER_HOOK_PRINT_DISPLACEMENT` to `ZYDIS_FORMATTER_HOOK_PRINT_DISP`
- Renamed `ZYDIS_FORMATTER_HOOK_PRINT_IMMEDIATE` to `ZYDIS_FORMATTER_HOOK_PRINT_IMM`
- Renamed `ZYDIS_FORMATTER_HOOK_PRINT_OPERANDSIZE` to `ZYDIS_FORMATTER_HOOK_PRINT_MEMSIZE`
- Removed `ZYDIS_FORMATTER_HOOK_PRINT_SEGMENT`
- Renamed some enums and types
- Revised documentation
- Fixed examples and tools
2017-12-03 22:38:20 +01:00
flobernd
e145402d2e
Added `ZydisUPointer` and `ZydisIPointer` types
2017-12-03 22:38:20 +01:00
flobernd
451d7fb1a8
Fixed and refactored some enums
...
- Fixed `ZydisRegister` enum and string-table
- Renamed `ZYDIS_XXX_MAX_BITS` in `ZYDIS_XXX_MIN_BITS`
2017-12-03 22:38:20 +01:00
flobernd
1d6c296c5f
Renamed `ZydisStringAppendStaticEx` to `ZydisStringAppendExStatic`
2017-12-03 22:38:20 +01:00
flobernd
39facdf5fe
Reworked `ZydisString`
2017-12-03 22:38:20 +01:00
Joel Höner
346b7fec10
Moved internal headers
2017-12-03 22:38:20 +01:00
Joel Höner
618557a814
Minor documentation tweaks
2017-12-03 22:38:20 +01:00
flobernd
07c325b367
Minor bugfixes
2017-12-03 22:38:20 +01:00
flobernd
a1d58c9ee7
Replaced `ZYDIS_FORMATTER_HOOK_PRINT_OPERAND_SEPARATOR` by `ZYDIS_FORMATTER_HOOK_PRE_OPERAND`/`ZYDIS_FORMATTER_HOOK_POST_OPERAND`
2017-12-02 19:42:30 +01:00
th0rex
022a4e7423
Add hook for operand seperator to formatter
2017-12-02 18:29:16 +01:00
flobernd
02030c3b92
Various changes and refactorings
...
- Moved types and functions from `FormatHelper.h/c` to `String.h/c`
- Added `ZydisMnemonicGetStringEx` function that returns the mnemonic-string as `ZydisString` struct
- Added `ZYDIS_UNUSED_PARAMETER` macro
- Fixed omitting of operands in custom formatter-hooks
- Fixed `FormatterHooks` example
- Refactored some code
2017-12-02 06:36:12 +01:00
Joel Höner
fa12ccb64b
Switch to length aware string
2017-12-01 20:40:56 +01:00
flobernd
930c4df970
Removed `ZydisDecodedInstruction.instrPointer`
...
The instruction-pointer was always pointing to the next instruction (which is inconsistent for branch instructions). We can't always tell IF an instruction is going to branch (for the conditional ones), so we decided to completely remove it.
You can always manually combine `instrAddress` and `length` to calculate this value.
2017-12-01 20:21:25 +01:00
Joel Höner
a2cc8615ba
Various minor no-libc fixes
2017-11-27 00:06:09 +01:00
Joel Höner
486add62ed
Added static assert + verify int type sizes
2017-11-26 05:33:37 +01:00
Joel Höner
56f47f4863
Added support for compiling on ARM target
2017-11-26 04:38:32 +01:00
Joel Höner
a835185da2
Clang and GCC support in no-libc mode
2017-11-26 04:00:55 +01:00
Joel Höner
c4f5af64d0
Added own `NULL`
2017-11-25 03:18:08 +01:00
Joel Höner
cf24ee010a
Introduced custom integer types
2017-11-25 01:47:02 +01:00
Joel Höner
066e7f359d
Removed old feature check flags
2017-11-25 00:41:27 +01:00
flobernd
4195e9b0b8
Some decoder and formatter improvements
...
- Added `const` specifiers to some local variables
- Added KNC compatibility-mode (`ZYDIS_DECODER_MODE_KNC`) to improve decoding of ambiguous KNC/KNL+ mask-instructions
2017-11-16 22:18:20 +01:00
flobernd
e314c71db3
Added some undocumented `PREFETCH` instructions
2017-11-16 18:47:42 +01:00
flobernd
626d0bc238
Minor bugfixes
2017-11-14 07:33:15 +01:00
flobernd
df101d0fe0
Decoder improvements
...
- Instructions which are only valid in protected-mode are now rejected, if `ZYDIS_MACHINE_MODE_REAL_16` is used
- The `scale` of memory-operands is now correctly set to `1` in 16-bit mode, if an index register was specified
2017-11-13 19:43:19 +01:00
flobernd
5c634f71ad
Added formatter properties to set a custom hex-prefix/suffix
2017-11-13 13:52:02 +01:00
flobernd
9ccc096232
Minor table-changes to mirror the latest changes of the XED datatables
2017-11-07 22:18:51 +01:00
flobernd
adbfb9cd66
Added formatter properties to control padding of hexadecimal values
...
- Renamed `ZydisFormatterSetAttribute` to `ZydisFormatterSetProperty`
- Renamed some formatter enums
- Added `ZYDIS_FORMATTER_PROP_ADDR_PADDING`
- Added `ZYDIS_FORMATTER_PROP_DISP_PADDING`
- Added `ZYDIS_FORMATTER_PROP_IMM_PADDING`
2017-11-06 21:35:13 +01:00
flobernd
cbf06b1bf3
Minor interface changes
...
- Reverted last change
- Removed `ZydisFormatterInitEx`
- Added `ZydisFormatterSetAttribute`
2017-11-03 02:24:02 +01:00
Joel Höner
3a38b9ceb5
Revert "Minor interface changes"
...
This reverts commit 0ba5c95dac
.
2017-11-02 23:03:21 +01:00
flobernd
0ba5c95dac
Minor interface changes
...
- Removed `ZydisDecoderEnableMode`
- Added `ZydisDecoderInitEx` with an additional `flags` parameter that can be used to specify a mask of decoder-modes
2017-11-02 17:03:12 +01:00
flobernd
57f7ff8bcd
Implemented decoder-modes to support ISA-extensions that conflict with existing instructions
...
- Added decoder-modes
- `ZYDIS_DECODER_MODE_MINIMAL`
- `ZYDIS_DECODER_MODE_AMD_BRANCHES`
- `ZYDIS_DECODER_MODE_MPX`
- `ZYDIS_DECODER_MODE_CET`
- `ZYDIS_DECODER_MODE_LZCNT`
- `ZYDIS_DECODER_MODE_TZCNT`
- Removed `ZydisDecoderInitEx` and the possibility to pass a decoder-granularity (use `ZYDIS_DECODER_MODE_MINIMAL` instead)
2017-11-01 23:39:10 +01:00
flobernd
5ed561a0fc
Fixed `bndldx` and `bndstx` not accepting segment-overrides
2017-10-27 03:02:36 +02:00
flobernd
566ebf8566
Merge branch 'develop' of github.com:zyantific/zyan-disassembler-engine into develop
2017-10-26 20:11:01 +02:00
flobernd
38df6e0d1e
Improved support for MPX instructions
2017-10-26 20:10:51 +02:00
Joel Höner
95338c59bc
Added previously forgotten const qualifiers
...
- Also, fixed integer comparision warning in `ZydisPerfTest`
2017-10-24 17:21:09 +02:00
flobernd
2431b8f623
Adjusted maximum number of operands
2017-10-19 22:15:44 +02:00
flobernd
9fc44085d2
Added new ISA-extensions
...
- BITALG
- GFNI
- RDPID
- VAES
- VBMI2
- VNNI
- VPCLMULQDQ
2017-10-19 01:10:25 +02:00
Joel Höner
c77c9f2561
Move encoder to `feature/encoder` branch
...
- Won’t be ready until v2.1
2017-10-17 17:30:55 +02:00
flobernd
943993ae4a
Changed the way how user-data is passed to custom formatter-callbacks
...
* Removed `userData` from the `ZydisDecodedInstruction` struct
* Added `userData` as parameter to all formatter-callbacks
* Added `ZydisFormatterFormatInstructionEx` function with the additional `userData` paramter
* Updated the `FormatterHooks.c` demo
2017-10-14 18:37:59 +02:00
Duncan Ogilvie
d459b39bb7
Convert all functions in ZydisFormatter to take const arguments
2017-10-14 13:39:00 +02:00
flobernd
ded9d0e513
Minor refactorings
...
- `ZydisUtilsCalcAbsoluteTargetAddress` is now called `ZydisCalcAbsoluteAddress`
- `ZydisCalcAbsoluteAddress` does now handle `MEM` operands with absolute displacement values
2017-09-25 17:59:14 +02:00
flobernd
38975c8d3d
Minor refactorings
2017-09-23 19:53:48 +02:00
flobernd
04ae18bef2
Merge branch 'develop' of github.com:zyantific/zyan-disassembler-engine into develop
2017-09-23 19:46:37 +02:00
flobernd
2145c399b5
Formatter does now print the `far` modifier for the respective instructions
2017-09-23 19:46:27 +02:00