24 Commits

Author SHA1 Message Date
T0b1
9263c3d6b2 wasm support 2023-04-28 20:41:17 +02:00
Alexis Engelke
36019517cf parseinstrs: Print stats only if not subproject
Statistics are only interesting for development.
2022-12-28 12:28:22 +01:00
Ole André Vadla Ravnås
a05d52fdd0 windows: Add support for building with MSVC 2022-11-01 19:22:43 +01:00
Ole André Vadla Ravnås
e9d961e316 meson: Simplify run_command()
By moving to the new API in Meson 0.47. This also means we avoid a
deprecation warning.
2022-11-01 19:22:37 +01:00
Ole André Vadla Ravnås
ffb40fb51f meson: Require Meson >= 0.49
Needed for compiler.get_argument_syntax().
2022-11-01 19:22:31 +01: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
Ole André Vadla Ravnås
4b42ddb567 meson: Override provided dependency
For convenience when used as a subproject.
2022-01-05 10:06:37 +01:00
Alexis Engelke
204580f480 tests: Move to root directory 2021-09-22 13:16:58 +02:00
Alexis Engelke
a150822fe1 meson: Add -fstrict-aliasing if supported 2021-09-19 17:06:59 +02: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
db183ee6f9 meson: Check compiler options and Python version
Thanks to William Woodruff for pointing out that -Wcast-align=strict is
a GCC-only option, which causes build errors (instead of just
complaining about an unsupported warning option).
2021-01-05 20:21:44 +01:00
Alexis Engelke
e82c9e20db build: Simplify 2021-01-02 16:27:28 +01:00
Alexis Engelke
69ce124354 encode: Add library for x86-64 encoding 2020-11-09 09:46:38 +01:00
Alexis Engelke
9b6caeb2ae parseinstrs: Write mnemonics to separate file 2020-07-04 14:35:51 +02:00
Alexis Engelke
9987f47a50 meson: Fix warning about missing warning 2019-08-18 18:16:54 +02:00
Alexis Engelke
69691c9605 Generate pkg-config file 2019-06-16 09:48:18 +02:00
Alexis Engelke
9bdb71e6aa Install library and header files 2019-06-16 09:46:31 +02:00
Alexis Engelke
c59319b3bb Rename decode tables to fadec-decode-table.inc 2019-06-16 09:45:51 +02:00
Alexis Engelke
2933b0f106 Rename library to libfadec 2019-06-16 09:44:12 +02:00
Alexis Engelke
67ae0f8de8 Store 32-bit and 64-bit data in a single table 2019-02-23 16:33:01 +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
Alexis Engelke
a3f77dbf49 Initial commit 2018-04-08 13:45:13 +00:00