All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [RFC PATCH] disas/hppa: drop raw opcode dump
Date: Thu, 29 Feb 2024 08:11:02 -1000	[thread overview]
Message-ID: <fdde1d3b-6578-4ba8-9567-f2a79ae2ec3b@linaro.org> (raw)
In-Reply-To: <20240229140557.1749767-1-alex.bennee@linaro.org>

On 2/29/24 04:05, Alex Bennée wrote:
> The hppa disassembly is different from the others due to leading with
> the raw opcode data. This confuses plugins looking for instruction
> prefixes to match instructions. For plugins like execlog there is
> another mechanism for getting the instruction byte data.
> 
> For the sake of consistently just present the instruction assembly
> code.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   disas/hppa.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/disas/hppa.c b/disas/hppa.c
> index 22dce9b41bb..dd34cce211b 100644
> --- a/disas/hppa.c
> +++ b/disas/hppa.c
> @@ -1972,10 +1972,6 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
>   
>     insn = bfd_getb32 (buffer);
>   
> -  info->fprintf_func(info->stream, " %02x %02x %02x %02x   ",
> -                (insn >> 24) & 0xff, (insn >> 16) & 0xff,
> -                (insn >>  8) & 0xff, insn & 0xff);
> -

It's hardly the only one doing this.  Our capstone dumper does this, and glancing at some 
others riscv.c does as well.

When you say "the others", I think you mean "everything using capstone", which has uses a 
different print function entirely for plugins just to avoid the dump.


r~


      parent reply	other threads:[~2024-02-29 18:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 14:05 [RFC PATCH] disas/hppa: drop raw opcode dump Alex Bennée
2024-02-29 15:02 ` Helge Deller
2024-02-29 16:41   ` Alex Bennée
2024-02-29 18:11 ` Richard Henderson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fdde1d3b-6578-4ba8-9567-f2a79ae2ec3b@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.