Commit Graph

11 Commits

Author SHA1 Message Date
Ronald Caesar
0b0f4bab98 engine: add __restrict__ compiler attribute
Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-13 18:28:39 -04:00
Ronald Caesar
35c88dd939 ir: add initial ir translation module
Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-12 19:08:14 -04:00
Ronald Caesar
a15ed49f25 ir: move ir emitter header to src/
I see no reason to make this header public. This is used by Ballistic
only.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-12 17:30:04 -04:00
Ronald Caesar
4818664671 engine: add alignment compiler attribute
Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-12 14:00:19 -04:00
Ronald Caesar
3ae7e33cd7 engine: add hints for cpu branch predictor
Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-12 12:15:09 -04:00
Ronald Caesar
d54ade0c9f engine: reorganize compiler attribute docs
Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-12 10:18:25 -04:00
Ronald Caesar
e671b6a4f1 ir: add compiler hints for cold functions
Also marked more functions as hot.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-12 09:19:27 -04:00
Ronald Caesar
0ca446238d ir: Add compiler hints to hot functions
Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-12 00:13:19 -04:00
Ronald Caesar
126323943b ir: add bit width parameter to emit_instructions()
At first I wondered how will we know the bitfield of the ssa variable
we're creating? Should we hardcode the bit width in the opcode and
create a large switch statement or hash table? To keep things simple
I just added a new bit width parameter to emit_instruction() and it
will be the frontend's responsibility to find the correct bitwidth.
This should better for x86 lowering.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-11 23:41:47 -04:00
Ronald Caesar
07aa3173de engine: move public headers to include folder
Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-10 18:30:45 -04:00
Ronald Caesar
4aa8335612 decoder: Make decoder API public
The decoder API is now suitable to be made public. decoder.h is the sole
entry point for the decoder and it has been moved to `include/`

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