6 Commits

Author SHA1 Message Date
T0b1
9263c3d6b2 wasm support 2023-04-28 20:41:17 +02:00
Alexis Engelke
6b8c2968c1 encode2: Add new encoder API, one func per instr.
This is an *experimental* (read: unstable) API which exposes encoding
functionality as one function per instruction. This makes the encoding
process itself significantly faster, at the cost of a much larger binary
size (~1 MiB of code, no data) and much higher compilation time.
2022-02-20 17:21:04 +01:00
Alexis Engelke
2fd83903cf meson,parseinstrs: Make decode and encode optional 2022-02-20 17:15:21 +01:00
Alexis Engelke
c050b34ff9 instrs: Add support for undocumented instructions
Undocumented instruction are not decoded by default.

- SALC: undocumented in any recent manual and unsupported by newer
  Intel CPUs. Including as listed by [1,2].
- Undocumented FPU instructions: see [2].

[1]: http://www.rcollins.org/secrets/opcodes/SALC.html
[2]: https://github.com/xoreaxeaxeax/sandsifter/issues/33
2021-01-10 15:04:37 +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
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