This guarantees the bitfield is 5 bits, so if someone in the future
decides to shift bits around in the struct it wont break Ballistic.
Signed-off-by: Ronald Caesar <github43132@proton.me>
Stores operand bit positions and types in the decoder metadata. This
makes it way easier to emit IR instructions.
Signed-off-by: Ronald Caesar <github43132@proton.me>
Instead of using strcmp() on each decoded intruction's mnemonic to
translate it, we embedd an IR opcode into the struct. This is a very
barebones implementation and does not cover the entire ARM instruction
set. ARM instructions that does not have an IR opcode equivalent will be
marked with `OPCODE_TRAP` and should be implemented in the future.
Signed-off-by: Ronald Caesar <github43132@proton.me>
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>