[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ppc64 XER potentially ignored/not setting
From: |
Kyle Lehman |
Subject: |
Re: ppc64 XER potentially ignored/not setting |
Date: |
Tue, 16 Nov 2021 10:35:14 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 |
On 11/16/21 02:26, Thomas Huth wrote:
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...
Thomas
Upon further review, turns out this is mostly user error on my part.
When I built the latest qemu, I started immediately manually debugging
it with standard human readable GDB to see if it solved the issue. So I
did my steps in the test, looked at register 'xer' and noticed it still
sat at 0. Which where my original post comes from.
In the mean time, I then moved to implement more features with my
automated testing which uses the machine interface format of GDB. There
I noticed register x 69 (XER) was indeed being modified. Great!
This was confusing, but at least I narrowed something down. This was
until I was back into manual GDB side of things, did a register dump and
noticed 'xer' was listed there twice. One had 0, the other held a value.
So, in short, I was looking at the duplicated xer set to 0 instead of
the "real" one within GDB. Embarrassing to say the least that I didn't
notice it sooner, but in my defense the old noggin sometimes gets into a
haze staring at these things.
Emulation side of things appears fine, I ran our test cases that put XER
through its paces and the results tie out perfectly.
To recap:
1) XER emulation fine (for our test cases)
2) Register setting/getting from x 69 using GDB MI works fine
3) xer shows up twice in normal GDB mode, with one that appears attached
to nothing. Setting xer in this mode (set $xer=whatever) does in fact
get picked up properly within emulation
Thank you for all the effort. Definitely not an easy ISA to emulate and
can make your head spin sometimes.
Kyle