mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-06-17 04:16:48 -07:00
94cca0e48f
The B (unconditional branch) instruction encoding used integer division (/) instead of bitwise OR (|) to combine the opcode with the branch offset. This produced incorrect machine code for every branch target other than zero. Also add bal_assembler_reset() to match the reset API provided by every other module in Ballistic (bal_x86_assembler, sliding window, tier1 compiler). The function zeroes the instruction buffer and resets offset and status. Wrap the hot function in BAL_UNLIKELY. Signed-off-by: mcrib884 <farukkaya229@outlook.com>