Peter Maydell писал 2015-09-02 19:39:
On 2 September 2015 at 14:50, Sergey Smolov <smo...@ispras.ru> wrote:
02.09.2015 16:55, Sergey Smolov пишет:
It seems that QEMU skips some internal instructions when generates
"in_asm" log. How to eliminate this?
It might help if you said what you thought was missing.
-- PMM
I mean that in this example QEMU does not write to log "intermediate"
SUBS instructions which appear in loop-unrolling process.
For me it woulb be ok if QEMU generate the following in_asm log:
[log]
IN:
0x0000000000000000: 94000001 bl #+0x4 (addr 0x4)
----------------
IN:
0x0000000000000004: d2800140 mov x0, #0xa
----------------
IN:
0x0000000000000008: f1000400 subs x0, x0, #0x1 (1)
----------------
IN:
0x000000000000000c: 54000040 b.eq #+0x8 (addr 0x14)
----------------
IN:
0x0000000000000008: f1000400 subs x0, x0, #0x1 (1)
----------------
IN:
0x000000000000000c: 54000040 b.eq #+0x8 (addr 0x14)
----------------
IN:
0x0000000000000008: f1000400 subs x0, x0, #0x1 (1)
----------------
IN:
0x000000000000000c: 54000040 b.eq #+0x8 (addr 0x14)
...
<repeat SUBS and B.EQ 8 times, if we enable also "cpu" logging mode here
we will see that X1 register value decrements on each iteration>
...
----------------
IN:
0x0000000000000010: 17fffffd b #-0xc (addr 0x4)
[/log]
In terms of functional programming languages (like C), my idea is to
generate for the following program:
for (i = 0; i < 2; i++) {
func(i);
}
the log like:
func(0)
func(1)
but QEMU generates log that contains exactly one call of "func".
Sergey Smolov