Adds a new field to memref_instr_t: encoding_is_new. This indicates whether the encoding bytes for an instruction fetch are new, either due to changed application code or just the start of a new chunk. This lets tools know when to invalidate any cached decoding information.
Updates the opcode_mix and view tools to use this to invalidate their caches.
Adds a test of modified code to the tool.drcacheoff.gencode test. Changes the test to use opcode_mix to test its cache invalidation. Adds a new icache_sync() routine to tools.h for help modifying code on AArchXX.
I verified that with the bug pointed out at https://github.com/DynamoRIO/dynamorio/pull/5662#discussion_r982816383 the test catches the stale opcodes used by opcode_mix.
While testing on AArch32 I hit some issues with the ISA mode in the encoding file which will be submitted separately.
Issue: #5520 (closed)