Clean up targets and data payloads.
In particular:
* Fix target calculation to be properly relative when encoding.
* Add data payload variants of DecodedInstruction, and en/decode using them.
* Remove the uninterpreted data member from the base DecodedInstruction.
This change introduces the concept of an "address map" that is built
up while reading or writing code, which is used when en/decoding
switch data payload instructions, so that they can decode targets into
absolute addresses and encode targets into relative addresses. The
deal is that the relative addresses encoded in these payload
instructions are relative to the address of the dependant switch
instruction and not the address of the payload instruction.
Change-Id: I43cb014f1af75a31bbf0b757e4854a9dc865eab7
19 files changed