qemu-mips strange jump !!!
This is my first post, so sorry for any error ...
I'm developing a DVB-S emulator based on qemu-mips.
I'm adding all the device, once a time, but I notice a strange problem that crashes my emulator.
It seems to do bad jumps!
In brief ... I run this command *./bin/-qemu-system-mips -L . mips_bios.bin -d int,exec,op,in_asm *and it genereates this log
IN:
0x80071fc4: lui at,0x8007 0x80071fc8: lw a1,0xC094(at) 0x80071fcc: lui a0,0x8007 0x80071fd0: addiu a0,a0,0xD060 0x80071fd4: jal 0x8006d76c <- this is the right address 0x80071fd8: nop
OP:0x0000: set_T0 0x800700000x0001: store_T0_gpr_gpr10x0002: load_gpr_T0_gpr10x0003: set_T1 0xffffc0940x0004: addr_add0x0005: lw_kernel0x0006: store_T0_gpr_gpr50x0007: set_T0 0x800700000x0008: store_T0_gpr_gpr40x0009: set_T1 0xffffd0600x000a: add0x000b: store_T0_gpr_gpr40x000c: set_T0 0x80071fdc0x000d: store_T0_gpr_gpr310x000e: save_pc 0x8006d76c <- this is the right address 0x000f: reset_T00x0010: exit_tb0x0011: end
IN:
0x8006d968: andi t9,t9,0xdf <- but this is a wrong jump !!! 0x8006d96c: j 0x8006d90c 0x8006d970: ori t9,t9,0x20
OP:0x0000: load_gpr_T0_gpr250x0001: set_T1 0xdf0x0002: and0x0003: store_T0_gpr_gpr250x0004: set_T1 0x200x0005: or0x0006: store_T0_gpr_gpr250x0007: goto_tb0 0x7578780x0008: save_pc 0x8006d90c0x0009: set_T0 0x7578780x000a: exit_tb0x000b
The mips instruction
0x80071fd4: jal 0x8006D76C
is correctly translated to
0x0008: save_pc 0x8006d90c
but then the execution-flow jumps to
0x8006d968: andi t9,t9,0xdf
I don't think it is correct!
Thanks for any suggestion.
---
AlexIT
Quoted 18 lines · Alessandro Montano
This is my first post, so sorry for any error ...
I'm developing a DVB-S emulator based on qemu-mips.
I'm adding all the device, once a time, but I notice a strange problem that crashes my emulator.It seems to do bad jumps!
In brief ... I run this command *./bin/-qemu-system-mips -L . mips_bios.bin -d int,exec,op,in_asm *and it genereates this log
IN:
0x80071fc4: lui at,0x8007 0x80071fc8: lw a1,0xC094(at) 0x80071fcc: lui a0,0x8007 0x80071fd0: addiu a0,a0,0xD060 0x80071fd4: jal 0x8006d76c <- this is the right address 0x80071fd8: nop
[...]
Quoted 4 lines
IN:
0x8006d968: andi t9,t9,0xdf <- but this is a wrong jump !!! 0x8006d96c: j 0x8006d90c 0x8006d970: ori t9,t9,0x20
You can't rely on logs to see the flow of a program. What may happen in the logs you're showing is that the code @0x8006d76c may have been previously translated and so it isn't shown in the logs.
I don't think what you're showing us is the real problem :)
Laurent
2008/12/27 Laurent Desnogues <[email protected]>:
Quoted 19 lines · Alessandro Montano
Quoted 11 lines
This is my first post, so sorry for any error ...
I'm developing a DVB-S emulator based on qemu-mips.
I'm adding all the device, once a time, but I notice a strange problem that crashes my emulator.It seems to do bad jumps!
In brief ... I run this command *./bin/-qemu-system-mips -L . mips_bios.bin -d int,exec,op,in_asm *and it genereates this log
Quoted 7 lines
IN:
0x80071fc4: lui at,0x8007 0x80071fc8: lw a1,0xC094(at) 0x80071fcc: lui a0,0x8007 0x80071fd0: addiu a0,a0,0xD060 0x80071fd4: jal 0x8006d76c <- this is the right address 0x80071fd8: nop
Quoted 7 lines
[...]
Quoted 4 lines
IN:
0x8006d968: andi t9,t9,0xdf <- but this is a wrong jump !!! 0x8006d96c: j 0x8006d90c 0x8006d970: ori t9,t9,0x20You can't rely on logs to see the flow of a program.
Not with "in_asm" alone, but "exec" should show the flow of execution, except DEBUG_EXEC is undefined by default. Maybe this should generate a runtime warning.
Cheers
2008/12/27 andrzej zaborowski <[email protected]>:
Quoted 26 lines
2008/12/27 Laurent Desnogues <[email protected]>:
Quoted 25 lines · Alessandro Montano
Quoted 18 lines
This is my first post, so sorry for any error ...
I'm developing a DVB-S emulator based on qemu-mips.
I'm adding all the device, once a time, but I notice a strange problem that crashes my emulator.It seems to do bad jumps!
In brief ... I run this command *./bin/-qemu-system-mips -L . mips_bios.bin -d int,exec,op,in_asm *and it genereates this log
IN:
0x80071fc4: lui at,0x8007 0x80071fc8: lw a1,0xC094(at) 0x80071fcc: lui a0,0x8007 0x80071fd0: addiu a0,a0,0xD060 0x80071fd4: jal 0x8006d76c <- this is the right address 0x80071fd8: nop[...]
Quoted 4 lines
IN:
0x8006d968: andi t9,t9,0xdf <- but this is a wrong jump !!! 0x8006d96c: j 0x8006d90c 0x8006d970: ori t9,t9,0x20
Quoted 4 lines
Quoted 1 line
You can't rely on logs to see the flow of a program.
Not with "
in_asm" alone, but "exec" should show the flow of execution, exceptDEBUG_EXECis undefined by default.
Actually no, Laurent pointed out that even this will not show what I would expect when TBs are chained.
Cheers