public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@bitrange.com>
To: Jan-Benedict Glaw <jbglaw@microdata-pos.de>
Cc: binutils@sources.redhat.com
Subject: Re: Disassemble CASEx assembler instructions
Date: Tue, 29 Mar 2005 15:44:00 -0000	[thread overview]
Message-ID: <Pine.BSF.4.58.0503290802450.58197@dair.pair.com> (raw)
In-Reply-To: <20050328123613.A17534@microdata-pos.de>

On Mon, 28 Mar 2005, Jan-Benedict Glaw wrote:
> Well, the PA-RISC backend seems to not recognize it (of I haven't
> really found the code...), but the VAX backend does -- quite
> suboptimal.

See also opcodes/cris-dis.c.  Though that case-handling is quite
buggy, I'm afraid.

> 	- Let the backend recognize that this is a CASEx opcode and
> 	  return (as number of bytes disassembled) the CASEx opcode
> 	  plus the size of the whole displacement table. This would
> 	  basically dump the whole table in hex and disassembly would
> 	  be correct after the table.

Doesn't this automatically happen if you add the size of
the table when you disassemble the CASEx insn?

> 	- Implement higher-level knowledge of what's about to be
> 	  disassembled. Then the backend could signal that there's
> 	  a table of /n/ displacements of type /t/, which the backend
> 	  in turn could disassemble displacement-for-displacement.

If this is done, it needs to handle different equations for the
contents of the table: size of each item, counting from the
start of the table or the offset, whether relative or absolute.
Perhaps best handled by the target passing a function pointer.

brgds, H-P

  reply	other threads:[~2005-03-29 13:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-28 22:54 Jan-Benedict Glaw
2005-03-29 15:44 ` Hans-Peter Nilsson [this message]
2005-03-29 15:45   ` Hans-Peter Nilsson
2005-03-29 15:51   ` Jan-Benedict Glaw

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=Pine.BSF.4.58.0503290802450.58197@dair.pair.com \
    --to=hp@bitrange.com \
    --cc=binutils@sources.redhat.com \
    --cc=jbglaw@microdata-pos.de \
    /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 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 read-only IMAP folder(s) and NNTP newsgroup(s).