7 Commits

Author SHA1 Message Date
Ronald Caesar
5dada6c7a4 engine: add translation loop switch statement
Also made the decoder function name shorter.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-24 00:34:41 -04:00
Ronald Caesar
7da598c273 tests: raise max local candidates to 1024
The windows build is failing because max local candidates is too low.
This makes no sense cause the Linux and macOS builds run completely
fine. Another reason why a hate Windows.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-18 19:08:51 -04:00
Ronald Caesar
c4a7afa8f0 tests: remove qsort
generate_a64_table.py already sorts the buckets by priority so theres no
reason to do it again.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-18 18:53:58 -04:00
Ronald Caesar
a997752a50 tests: optimize decoder tests
Instead of iterating 0...2^32, we iterate by hash bucket.
Also done a lot of memory bandwidth optimizations.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-18 18:39:42 -04:00
Ronald Caesar
98992b54c3 tests: replace fuzzer with exaustive test
Tests the entire 32-bit instruction space (4.29B).

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-18 05:24:17 -04:00
Ronald Caesar
c24f4f6e80 tests: Add decoder fuzzer
I realized that a fuzzer made in python is way slower than a fuzzer in
C. So here you go.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-12-12 18:11:40 -04:00
Ronald Caesar
bd323a946e decoder/tests: Add small tests
This is just to test if the decoder even works. Ii will implement a
fuzzer to test the decoder against 10,000 randomly generated
instructions.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-12-12 18:11:38 -04:00