From 87dc48adcce4e80aa98a2867edacc023579fc4c4 Mon Sep 17 00:00:00 2001 From: iximeow Date: Thu, 19 Feb 2026 02:14:57 +0000 Subject: add behavior information for x86_64 instructions this is a squash of a few months' hacking, including but not limited to what eventually got extracted into https://git.iximeow.net/asmlinator/about/ the path here is generally not historically interesting, and the vast majority of this diff is very particular static data tables (BehaviorDigests and implicit operand lists) `src/long_mode/behavior.rs` will more or less be directly adapted into versions for x86-32 and x86-16, similar to the instruction decoders. --- Cargo.toml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 0fa7449..481cc0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,8 +17,15 @@ yaxpeax-arch = { version = "0.3.1", default-features = false, features = [] } "serde_derive" = { version = "1.0", optional = true } "cfg-if" = "1.0.0" +# if yaxpeax-x86 ever pulls this into your dep tree: sorry! please report that! +# this is only used for verifying library structures are kept in sync. it +# should only be pulled in with the _debug_internal_asserts feature which you +# should not be using! +strum = { version = "0.28.0", features = ["derive"], optional = true } + [dev-dependencies] -rand = "0.8.4" +rand = { version = "0.10.0", features = ["thread_rng"] } +asmlinator = { version = "2.0.0" } [[test]] name = "test" @@ -37,7 +44,7 @@ opt-level = 3 lto = true [features] -default = ["std", "colors", "use-serde", "fmt"] +default = ["std", "colors", "use-serde", "fmt", "behavior"] # opt-in for some apis that are really much nicer with String std = ["alloc", "yaxpeax-arch/std"] @@ -51,10 +58,21 @@ alloc = ["yaxpeax-arch/alloc"] # feature for formatting instructions and their components fmt = [] +# feature for additional instruction behavior information +# +# as of writing this includes an additional ~6kb of combined code and data +# per-decoder. much like `fmt`, this is mostly useful to ensure that unused +# data truly is not included in a build. +behavior = [] + use-serde = ["yaxpeax-arch/use-serde", "serde", "serde_derive"] colors = ["yaxpeax-arch/colors"] +# feature for library surface areas that are *NOT STABLE*. these will change in +# semver-incompatible ways across any releases. +unstable = [] + # This enables some capstone benchmarks over the same # instruction bytes used to bench this code. capstone_bench = [] @@ -65,3 +83,6 @@ profiling = [] # do not use this. it is for development and library debugging only. _debug_internal_disasm_stats = [] + +# do not use this. it is for development and library testing only. +_debug_internal_asserts = ["strum"] -- cgit v1.1