This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Disassemble CASEx assembler instructions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]