A method of translating binary code instructions from a source format to a
target format for processing by a target processor includes converting a
source instruction into a source intermediate data structure having a
plurality of members, mapping the members in the source intermediate data
structure to corresponding members in a target intermediate data
structure according to a template, and converting the target intermediate
data structure into a target instruction.