drcachesim offline trace has wrong size for 2-byte nop
We recently hit a case where the x86 nop 0x66 0x90
is recorded into an offline trace and the post-processing stores 1 as its instruction fetch size, instead of 2. I tracked it down to #3271 (closed): raw2trace uses decode_from_copy() and decodes 0x66 0x90
into an OP_nop instruction, but because of the re-relativization worries decode_from_copy() marks the raw bits as invalid. Thus, raw2trace's call to instr_length() does a re-encode which simply encodes an OP_nop, resulting in 0x90 and a length of 1. Xref #3339 and other issues: another case of an encoding feature the IR does not store.
Rather than splitting the opcode or storing sthg about a prefix (we do have a requires-prefix feature -- but it's at the opcode level) I'm thinking we should just fix #3271 (closed), and #731 (closed) while we're at it. That then leaves any other issues of keeping the 0x66
as something much lower priority along the lines of #3339.