[libre-riscv-dev] [Bug 368] Need one example unit test of how to run some assembly code "qemu vs simulator" rather than "qemu vs hardware"

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Jun 7 23:39:53 BST 2020


--- Comment #2 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Michael Nolan from comment #1)
> Ok, I did this quite a while ago, testing against my crappy handwritten
> python simulator. I'll give testing against the pseudocode simulator
> tomorrow a go.

that would be superb.

> Beware, from what I remember only general purpose registers work. qemu-gdb
> seemed to have a bug (or maybe it's qemu? idk) where you couldn't read out
> XER, CR, and friends directly from gdb.

hmmm... we could cheat, in a similar way to how gdb itself works: substitute
some instructions, actually execute mfcrf and mfmsr etc. directly putting
the result into a register, read *that*, then restore them afterwards.

or, it could just be that python-gdb doesn't have the capability added yet.

at least however if we can check int registers, then another hack-way to
do it would be to actually add, into the assembly listing being emulated,
the instruction to copy out to RT.  it's a bad hack.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-riscv-dev mailing list