This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Disassemble CASEx assembler instructions
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Jan-Benedict Glaw <jbglaw at microdata-pos dot de>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 29 Mar 2005 08:16:38 -0500 (EST)
- Subject: Re: Disassemble CASEx assembler instructions
- References: <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