Commit Graph

110 Commits

Author SHA1 Message Date
47a002cd79 chore: add macros for ModRM GPR Instruction parsing 2025-05-13 12:23:33 +09:00
c71ddb4419 fix: rename OperandSize to OperandWidth 2025-05-13 12:17:25 +09:00
a25e0a3890 ft: fixed modrm target calculation
While implementing some more mnemonics and testing
them, it was clear that modrm parsing was wrong.
Now reg to reg and immediates, together with
GPR1 interpretation should work as expected.

GPR1 interpretation can currently not be merged
into the modrm function, as with the current
abstraction the REG needs to select the correct
mnemonic, for which we need to also know the second
operand, which will only be parsed afterwards.
But this will be incorporated at some point, this
just marks the first working state.
2025-05-13 12:07:22 +09:00
51b28b3bac ft: introduce modrm macro for leaner matching
All instructions which use a modrm instruction
for memory reads from or into a register can
make use of this macro
2025-05-12 19:53:25 +09:00
317b5e5db4 fix: fix modrm parsing
Previously the wrong register was read in, now
the byte is deconstructed correctly
2025-05-12 15:38:20 +09:00
1dcd231f51 fix: fix bug in offset advancing with modrm bytes 2025-05-08 20:22:40 +09:00
df00f59b5a ft: implement disasm in own struct
This makes it easier to implement each opcode,
as the offset calculation and recovery of raw
read bytes is internalized.
2025-05-08 20:18:02 +09:00
1c7d3f3adc fix: cleanup structs into correct files 2025-05-08 10:05:09 +09:00
849895a437 ft: add modrm parsing 2025-05-07 22:46:58 +09:00
2af4578c8b ft: initial disasm of example data
This only contains two instructions of which I know
the correct output.
2025-05-07 15:48:44 +09:00