Commit Graph

13 Commits

Author SHA1 Message Date
Alexis Engelke
83988828ec Add some test cases for ModRM decoding 2019-02-24 10:10:02 +01:00
Alexis Engelke
dfd70eef39 Fix bug with VMOV[DQ] operand width in 32-bit mode 2019-02-24 10:09:18 +01:00
Alexis Engelke
3abf29d63e Major rework of API and improved documentation 2019-01-23 20:03:40 +01:00
Alexis Engelke
20f6e8c073 Fix handling of 66h prefix on jumps
It turns out that in x86-64 mode, address and operand size overrides are
ignored by the processor. (Tested that on a real machine.)

Even libopcodes gets this wrong...
2019-01-14 19:53:46 +01:00
Alexis Engelke
a799024066 Specify address via parameter
This allows to decode instructions where the address of the buffer is
not the address of the instruction.
2019-01-14 19:52:03 +01:00
Alexis Engelke
55f6fda583 Add some test cases for prefix ordering 2019-01-13 20:39:57 +01:00
Alexis Engelke
8fdfe53822 Output more available information in formatter
The formatter now includes the following information:

- Segment overrides
- Address-size overrides
- REP/REPNZ prefixes
- LOCK prefix
- High-byte registers (determined using presence of REX prefix)
2019-01-13 20:38:15 +01:00
Alexis Engelke
ed53b4a54d Support 32 bit and 64 bit decoding with one binary
It is possible to configure the build process such that decoding of 32
bit and 64 bit instructions can be chosen at runtime using an additional
parameter of the decode function. The header file is now entirely
architecture-independent and no longer required any previous defines.

Decoding x86-64 still requires a 64-bit pointer size.
2019-01-13 11:58:59 +01:00
Alexis Engelke
ec7d27302e Add some small benchmarks 2019-01-13 08:55:11 +01:00
Alexis Engelke
6b34f55855 Port test runner to python 2019-01-13 08:47:23 +01:00
Alexis Engelke
05493d4206 Refactor test driver to measure decoding time 2019-01-12 21:00:38 +01:00
Alexis Engelke
ca54ca7422 Add compile-time option for architecture mode
This allows to decode x86-32 machine code on a 64-bit platform (but
not vice versa). As a side-effect, we also get rid of pointer-size
detection for architecture selection.
2018-12-25 17:06:47 +01:00
Alexis Engelke
a3f77dbf49 Initial commit 2018-04-08 13:45:13 +00:00