The OpenRISC 1000 disassembler is part of the wider
binutils utility set and is found in the
opcodes
sub-directory. It provides two versions of
the disassembly function, print_insn_big_or32
and
print_insn_little_or32
for use with big-endian
and little-endian implementations of the architecture in
or32-dis.c
The instruction decode uses a finite state automaton (FSA) in
or32-opc.c
. This is constructed at start-up by
the function build_automata
from a table
describing the instruction set. This function is invoked from the
_initialize_or1k_tdep
function immediately after
the OpenRISC 1000 architecture has been defined.
The disassembler takes advantage of any symbol table information to replace branch and jump targets by symbolic names where possible.