diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-07-27 17:17:56 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-07-27 17:17:56 -0400 |
| commit | bb912b081ed339e4a5419bd3d2ffd7465f2f72d3 (patch) | |
| tree | 7f34b3af1a72672de1d12c8e23dda419c398dce3 /docs/lifecycle/jit.md | |
| parent | 003119b9f285e5610f56186bce845441409265ae (diff) | |
bottom up redesign
Diffstat (limited to 'docs/lifecycle/jit.md')
| -rw-r--r-- | docs/lifecycle/jit.md | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/docs/lifecycle/jit.md b/docs/lifecycle/jit.md deleted file mode 100644 index 3ef73e0..0000000 --- a/docs/lifecycle/jit.md +++ /dev/null @@ -1,80 +0,0 @@ -# Jit - ---- - -Convert Ir Into X64 (X86_64) - -## Limitations - -### No Segmentation Registers - -### No X87 Support - -### No access to the upper 8 bits of the lower 16 bits of registers AX, BX, CX, DX - -## Required Implicit Registers - -Instructions that implicitly modify a register now require the register as an argument - -# Operation - -Each instruction is written with varardic c functions with `TYPE`, `DATA` syntax - -## TYPE - -### General Registers Width - -### General Register Addresses Width - -### General Register Scale - -### General Register Id - -### General Register Memory Offset - -### XMM Registers - -### MM Registers - -### Immediate Value - -### Relative Address - -### Label - -## DATA - -## Object Definitions - -```c -kpl_x64_lable(label) - -kpl_x64_inst(INSTRUCTION, [TYPE, VALUE]..., END) - -kpl_x64_inst_pfx(PREFIX, INSTRUCTION, [TYPE, VALUE]..., END) -``` - -# Ir Matching - -Use tree with sub trees to match Ir operations to JIT functions - -1. Match Name -2. Match Args until None or End -3. Run JIT Fn - -## Object Definitions - -```c -typedef struct _kpl_ir_match { - int32_t tree_weight; - union { - kpl_ir_name ir_name; - kpl_type_header type_header; - } match; - union { - struct _kpl_ir_match *children; - void *jit_fn; // TODO - } next; - struct _kpl_ir_match *tree_left *tree_right; -} kpl_ir_match; -``` |
