qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Testing 7.1.0-rc2, qemu-ppc does not give valid disassembly
@ 2022-08-11 13:31 Pierre Muller
  2022-08-11 15:46 ` Cédric Le Goater
  2022-08-11 17:11 ` Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Pierre Muller @ 2022-08-11 13:31 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers, Laurent Vivier,
	John Paul Adrian Glaubitz

   Hello,

   I don't know if this is the right place to submit this report,
but I have a problem with my attempt to check the 7.1.0 release candidate
for linux user powerpc CPU.

   I am testing a simple executable, compiled with Free Pacal compiler,
but also linked to libc.

This is what I obtain with the new rc:

~/gnu/qemu/build-qemu-7.1.0-rc1/qemu-ppc -L ~/sys-root/powerpc-linux -d in_asm tprintf
----------------
IN: _start
0x3ffda784:
OBJD-T: 7c230b78388000003821fff0908100004bfe756d

----------------
IN: _dl_start
0x3ffc1d00:
OBJD-T: 9421fd407c0802a6429f0005

----------------
IN: _dl_start
0x3ffc1d0c:
OBJD-T: 93c102b8938102b092e1029c930102a07fc802a6932102a4934102a8936102ac
OBJD-T: 900102c493a102b493e102bc7c7c1b783fde00043bded2d07d4d42a67d2c42a6
OBJD-T: 7d0d42a67c0a40004082fff0

----------------
IN: _dl_start
0x3ffc1d58:
OBJD-T: 9141026838e00013f00004d7

With qemu-ppc version 7.0.0, I get this:
----------------
IN: _start
0x3ffda784:  7c230b78  mr       r3, r1
0x3ffda788:  38800000  li       r4, 0
0x3ffda78c:  3821fff0  addi     r1, r1, -0x10
0x3ffda790:  90810000  stw      r4, 0(r1)
0x3ffda794:  4bfe756d  bl       0x3ffc1d00

----------------
IN: _dl_start
0x3ffc1d00:  9421fd40  stwu     r1, -0x2c0(r1)
0x3ffc1d04:  7c0802a6  mflr     r0
0x3ffc1d08:  429f0005  bdnzl    0x3ffc1d0c

Which is way better!

   I did find that this is related to the fact that
upon configuration, meson finds no capstone library,
while disassembly of powerpc CPU has been moved to use of
capstone in this commit:


commit 333f944c15e7a6f5503f92d80529a368519d6638
Author: Thomas Huth <thuth@redhat.com>
Date:   Thu May 5 19:36:19 2022 +0200

      disas: Remove old libopcode ppc disassembler

      Capstone should be superior to the old libopcode disassembler,
      so we can drop the old file nowadays.

      Message-Id: <20220505173619.488350-1-thuth@redhat.com>
      Reviewed-by: Cédric Le Goater <clg@kaod.org>
      Signed-off-by: Thomas Huth <thuth@redhat.com>


Even when trying to compile the git checkout,
which contains capstone as a sub-module, in capstone sub-directory,
I always get capstone support set to NO by meson configuration.

configure --help says:

155:  capstone        Whether and how to find the capstone library

   Is there a way to tell configure to use the submodule?
Why doesn't it use the sub-module if pkg-config says that there
is not system capstone library installed?


Any comment most welcome,


Pierre



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-12  8:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11 13:31 [RFC] Testing 7.1.0-rc2, qemu-ppc does not give valid disassembly Pierre Muller
2022-08-11 15:46 ` Cédric Le Goater
2022-08-11 17:11 ` Peter Maydell
2022-08-11 21:26   ` Pierre Muller
2022-08-12  8:07     ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).