|
| 1 | +# PiStorm AArch64 JIT: Architecture Unification |
| 2 | + |
| 3 | +This documents the corrective unification applied to the JIT path. |
| 4 | + |
| 5 | +## Single Architecture (Now) |
| 6 | + |
| 7 | +- One translator interface: `jit_translate_context_t` |
| 8 | +- One translator dispatch shape: `int (*jit_translator_fn)(jit_translate_context_t *ctx)` |
| 9 | +- One emitter API surface in header declarations |
| 10 | +- One emitter implementation in `jit_emit_aarch64.c` |
| 11 | +- One active translator implementation path in `jit_block.c` |
| 12 | + |
| 13 | +## Removed Conflicts |
| 14 | + |
| 15 | +The unused standalone translator units using incompatible emitter contracts were removed: |
| 16 | + |
| 17 | +- `jit_translate_add.c` |
| 18 | +- `jit_translate_addq_subq.c` |
| 19 | +- `jit_translate_branch.c` |
| 20 | +- `jit_translate_cmp.c` |
| 21 | +- `jit_translate_control.c` |
| 22 | +- `jit_translate_logic.c` |
| 23 | +- `jit_translate_misc.c` |
| 24 | +- `jit_translate_move.c` |
| 25 | +- `jit_translate_movec.c` |
| 26 | +- `jit_translate_moveq.c` |
| 27 | +- `jit_translate_sub.c` |
| 28 | + |
| 29 | +## Correctness Fixes Included |
| 30 | + |
| 31 | +- `JSR` and `JMP` now set `PC = EA` (no dereference of EA memory). |
| 32 | +- `MOVEC` decode now uses: |
| 33 | + - register field: extension bits `[15:12]` |
| 34 | + - control-register id: extension bits `[11:0]` |
| 35 | + - direction: opcode bit 0 (`4E7A`: `CR->Rn`, `4E7B`: `Rn->CR`) |
| 36 | +- MOVEC now advances PC by 4 bytes when handled. |
| 37 | + |
| 38 | +## Scope |
| 39 | + |
| 40 | +- This change is structural and semantic-corrective only. |
| 41 | +- No optimization work was introduced. |
0 commit comments