Disassemble CASEx assembler instructions
Jan-Benedict Glaw
jbglaw@microdata-pos.de
Mon Mar 28 22:54:00 GMT 2005
Hi!
IIRC, the HP PA-RISC architecture also has a "case" instruction,
like VAX has one, too. How could this be menaingful disassembled?
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. Behing the initial CASEx instruction, there are a number
of displacements (which were currently disassembled as instructions).
As it seems, not a lot of ISAs actually know this type of instruction,
so there's no generic code to handle the displacement table. These
ideas come to mind:
- 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.
- 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.
The easy method of at least getting the disassembly of the remainder
of the function correct would be at least to implement the first
solution, which is additionally quite easy to implement.
Comments?
MfG, JBG
--
AWEK microdata GmbH -- Am Wellbach 4 -- 33609 Bielefeld
More information about the Binutils
mailing list