[RFC PATCH 0/2] Make the core disassembler functions target-independent

Thomas Huth posted 2 patches 11 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230508133745.109463-1-thuth@redhat.com
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Laurent Vivier <laurent@vivier.eu>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
meson.build            |  4 +-
disas/disas-internal.h | 20 +++++++++
include/disas/disas.h  | 21 +++------
include/hw/elf_ops.h   |  2 +-
bsd-user/elfload.c     |  2 +-
disas.c                | 98 ++++++++----------------------------------
disas/disas-mon.c      | 65 ++++++++++++++++++++++++++++
linux-user/elfload.c   |  2 +-
disas/meson.build      |  2 +
9 files changed, 116 insertions(+), 100 deletions(-)
create mode 100644 disas/disas-internal.h
create mode 100644 disas/disas-mon.c
[RFC PATCH 0/2] Make the core disassembler functions target-independent
Posted by Thomas Huth 11 months, 3 weeks ago
Move disas.c into the target-independent source set, so that we
only have to compile this code once instead multiple times (one
time for each target).

Marked as RFC since we have to replace the target_ulongs here
with hwaddr, and the TARGET_FMT_lx with HWADDR_FMT_plx, which is
a little bit ugly ... what's your opinion?

Thomas Huth (2):
  disas: Move softmmu specific code to separate file
  disas: Move disas.c into the target-independent source set

 meson.build            |  4 +-
 disas/disas-internal.h | 20 +++++++++
 include/disas/disas.h  | 21 +++------
 include/hw/elf_ops.h   |  2 +-
 bsd-user/elfload.c     |  2 +-
 disas.c                | 98 ++++++++----------------------------------
 disas/disas-mon.c      | 65 ++++++++++++++++++++++++++++
 linux-user/elfload.c   |  2 +-
 disas/meson.build      |  2 +
 9 files changed, 116 insertions(+), 100 deletions(-)
 create mode 100644 disas/disas-internal.h
 create mode 100644 disas/disas-mon.c

-- 
2.31.1
Re: [RFC PATCH 0/2] Make the core disassembler functions target-independent
Posted by Richard Henderson 11 months, 3 weeks ago
On 5/8/23 14:37, Thomas Huth wrote:
> Move disas.c into the target-independent source set, so that we
> only have to compile this code once instead multiple times (one
> time for each target).
> 
> Marked as RFC since we have to replace the target_ulongs here
> with hwaddr, and the TARGET_FMT_lx with HWADDR_FMT_plx, which is
> a little bit ugly ... what's your opinion?
> 
> Thomas Huth (2):
>    disas: Move softmmu specific code to separate file
>    disas: Move disas.c into the target-independent source set

Patches 79-83 from

https://patchew.org/QEMU/20230503072331.1747057-1-richard.henderson@linaro.org/

do the same thing, using uint64_t instead of hwaddr (it's not).


r~
Re: [RFC PATCH 0/2] Make the core disassembler functions target-independent
Posted by Richard Henderson 11 months, 3 weeks ago
On 5/8/23 15:04, Richard Henderson wrote:
> On 5/8/23 14:37, Thomas Huth wrote:
>> Move disas.c into the target-independent source set, so that we
>> only have to compile this code once instead multiple times (one
>> time for each target).
>>
>> Marked as RFC since we have to replace the target_ulongs here
>> with hwaddr, and the TARGET_FMT_lx with HWADDR_FMT_plx, which is
>> a little bit ugly ... what's your opinion?
>>
>> Thomas Huth (2):
>>    disas: Move softmmu specific code to separate file
>>    disas: Move disas.c into the target-independent source set
> 
> Patches 79-83 from
> 
> https://patchew.org/QEMU/20230503072331.1747057-1-richard.henderson@linaro.org/
> 
> do the same thing, using uint64_t instead of hwaddr (it's not).

I've just realized that only the choice of hwaddr/uint64_t overlap; I failed to take this 
all of the way to building disas once.

I will integrate our two sets.


r~


Re: [RFC PATCH 0/2] Make the core disassembler functions target-independent
Posted by Thomas Huth 11 months, 3 weeks ago
On 08/05/2023 16.04, Richard Henderson wrote:
> On 5/8/23 14:37, Thomas Huth wrote:
>> Move disas.c into the target-independent source set, so that we
>> only have to compile this code once instead multiple times (one
>> time for each target).
>>
>> Marked as RFC since we have to replace the target_ulongs here
>> with hwaddr, and the TARGET_FMT_lx with HWADDR_FMT_plx, which is
>> a little bit ugly ... what's your opinion?
>>
>> Thomas Huth (2):
>>    disas: Move softmmu specific code to separate file
>>    disas: Move disas.c into the target-independent source set
> 
> Patches 79-83 from
> 
> https://patchew.org/QEMU/20230503072331.1747057-1-richard.henderson@linaro.org/
> 
> do the same thing, using uint64_t instead of hwaddr (it's not).

Ah, great, so I can scratch this from my list :-)

But FYI, you missed to update bsd-user/elfload.c in the patch that updates 
linux-user/elfload.c.

  Thomas