Hello all,
I work with the libre-soc team in the testing area. Recently I have started
on writing an interface that uses qemu as another means to verify our
results from our own simulations against qemu.
The basic workflow I have set up is:
1. Take a test (which are usually one or two instructions, along with a
supplied list of registers)
2. Compile it as a bin (no loader, nothing but the compiled instructions),
launch qemu along with gdb, set registers, PC, etc. via gdb
3. Step the instructions, extract registers with gdb and compare them to our
own results
This works fairly well for int registers and from what I can tell so far the
CR. However, and I must apologize if this is somewhat beyond the scope of
what qemu can do since I'm basically treating it as a finite state machine
for this...on tests that use or would cause a change in the XER: so, ca, ov
are ignored.
Launching as (built from latest master):
qemu-system-ppc64 -machine powernv9 -cpu power9 -nographic -s -S -m
size=1024 -kernel test_path.bin
Instruction of test:
sraw 3, 1, 2 : 7c 23 16 30 (big endian)
r1 = 0x82345678
r2 = 8
Upon execution r3 is set correctly to 0xffffffffff823456, however ca is not
set within the XER when it should be.