Commit graph

6 commits

Author SHA1 Message Date
Ronald Caesar
0d957968df
jit/interpreter: Organize ifdefs
Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-12-06 01:55:55 -04:00
Ronald Caesar
b9b62574bf
jit: Implement build-time generation of jit infrastructure
generate_jit_assets.py expands the automatated code generation to
include:

- Opcode enumerations in arm32_opcodes.h.
- Decoder lookup tables in arm32_table.c
- Computed-goto jump tables foe the interpreter in handler_table.inc.

Relocates arm32.inc to src/jit/common/a32_instructions.inc.

Implements the primary execution loop in
src/jit/interpreter/arm32/instruction.c. The code is messy and will be
rewritten in the future.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-12-06 00:31:46 -04:00
Ronald Caesar
e714dc47d0
jit/decoder: rename decoder script
Renames generate_decoder_tests.py to generate_jit_decoder_tests.py.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-12-06 00:16:18 -04:00
Ronald Caesar
d1e3919a8c
jit/decoder: Add generated arm32 tests
Introduces the first unit tests for the ARM32 JIT decoder. A new script
automatically generates a test case for every instruction in arm32.inc,
providing 100% of the isa.

This also includes a critical rework of the decoder's lookup table
generation logic. The previous hashing method was flawed, causing
build-time overflows and incorrect instruction matching (shadowing) for
patterns with wildcards. The new algorithm correctly populates the
lookup table.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-11-30 06:14:03 -04:00
Ronald Caesar
2b5131e56c
refactor: Humongous Commit
Major architectural refactorbto focus exclusively on JIT development.

JIT & Decoder Architecture
-    Implemented scripts/generate_jit_decoder_a32_table.py to parse
     instruction definitions at build-time rather than runtime.
-    Moves decoder lookup tables from RAM to ROM.

Scope Reduction:
-    Removed frontend, GUI, and rendering dependencies.
-    delete src/frontend, src/target, and associated design docs.

Most importantly, this commit starts the transition of this codebase
from C++ to C. I cant stand creating C++ code, and since no one else
is contributing to this project this change shouldnt matter.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-11-29 14:53:02 -04:00
Ronald Caesar
6bdfd6fcea
Big Commit
The changes affects multiple places in the repo and this one of the rare
instances where I cant be bothered writing a comprehensive commit. Look
at the diff for changes.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-09-27 09:16:49 -04:00