[PATCH] bios_emulator: fix garbled printing of disassembled SET* instructions
Yuri Zaporozhets
yuriz at qrv-systems.net
Wed Nov 27 00:29:53 CET 2024
When DEBUG_DECODE_F is enabled in bios_emulator, the printing of
SET{O,NO,B,NB,Z,NZ,BE,NBE,S,NS,P,TP,L,NL,LE,NLE} instructions
is not followed by newline and is, therefore, immediately followed
by the printed address of a new instruction. This garbles the output
and makes it very difficult to read.
This patch adds missing DECODE_PRINTF("\n") calls to print newlines.
Signed-off-by: Yuri Zaporozhets <yuriz at qrv-systems.net>
---
drivers/bios_emulator/x86emu/ops2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bios_emulator/x86emu/ops2.c b/drivers/bios_emulator/x86emu/ops2.c
index 43270102f7..1ff27b2af9 100644
--- a/drivers/bios_emulator/x86emu/ops2.c
+++ b/drivers/bios_emulator/x86emu/ops2.c
@@ -245,10 +245,12 @@ void x86emuOp2_set_byte(u8 op2)
FETCH_DECODE_MODRM(mod, rh, rl);
if (mod < 3) {
destoffset = decode_rmXX_address(mod, rl);
+ DECODE_PRINTF("\n");
TRACE_AND_STEP();
store_data_byte(destoffset, cond ? 0x01 : 0x00);
} else { /* register to register */
destreg = DECODE_RM_BYTE_REGISTER(rl);
+ DECODE_PRINTF("\n");
TRACE_AND_STEP();
*destreg = cond ? 0x01 : 0x00;
}
--
2.39.5
More information about the U-Boot
mailing list