[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ppc64 XER potentially ignored/not setting

From: Thomas Huth
Subject: Re: ppc64 XER potentially ignored/not setting
Date: Tue, 16 Nov 2021 08:26:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 30/10/2021 19.19, Kyle Lehman wrote:
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.

Could you reproduce the issue with a stand alone binary, too? ... it would be interesting to know whether the problem is in the GDB interface or in the emulation part...


There is another test that is a little more involved, which will actually use the XER only *if* I execute the instruction twice by setting the PC back to it again.  I can provide that if needed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]